@groundtruth-mcp/gt-mcp 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  <div align="center">
2
2
  <table><tr><td>
3
3
  <pre>
4
- ██████╗ ████████╗ ███╗ ███╗ ██████╗ ██████╗
4
+ ██████╗ ████████╗ ███╗ ███╗ ██████╗ ██████╗
5
5
  ██╔════╝ ╚══██╔══╝ ████╗ ████║ ██╔════╝ ██╔══██╗
6
6
  ██║ ███╗ ██║ ██╔████╔██║ ██║ ██████╔╝
7
- ██║ ██║ ██║ ██║╚██╔╝██║ ██║ ██╔═══╝
8
- ╚██████╔╝ ██║ ██║ ╚═╝ ██║ ╚██████╗ ██║
7
+ ██║ ██║ ██║ ██║╚██╔╝██║ ██║ ██╔═══╝
8
+ ╚██████╔╝ ██║ ██║ ╚═╝ ██║ ╚██████╗ ██║
9
9
  </pre>
10
10
  </td></tr></table>
11
11
  </div>
@@ -18,29 +18,20 @@
18
18
  <a href="./LICENSE"><img src="https://img.shields.io/badge/license-ELv2-orange" alt="Elastic License 2.0" /></a>
19
19
  <img src="https://img.shields.io/badge/libraries-422%2B-teal" alt="422+ curated libraries" />
20
20
  <img src="https://img.shields.io/badge/audit_patterns-100%2B-red" alt="100+ audit patterns" />
21
- <img src="https://img.shields.io/badge/tests-762-brightgreen" alt="762 tests" />
21
+ <img src="https://img.shields.io/badge/tests-672-brightgreen" alt="672 tests" />
22
22
  <img src="https://img.shields.io/badge/tools-12-blue" alt="12 tools" />
23
23
  <img src="https://img.shields.io/badge/node-%3E%3D24-green" alt="Node 24+" />
24
- <img src="https://img.shields.io/badge/status-active%20development-blue" alt="Active Development" />
25
24
  </p>
26
25
 
27
26
  <h4 align="center">Self-hosted MCP server. 422+ curated libraries. 100+ audit patterns. No rate limits. No API keys.<br/>Ships updates continuously — your MCP client picks them up on restart.</h4>
28
27
 
29
28
  ---
30
29
 
31
- ## The problem (it's you, but also the model)
30
+ ## The problem
32
31
 
33
- Your AI assistant just mass-produced seven files of deprecated code and you merged all of it because the formatting was nice and the variable names were clean. We've all been there. Some of us are still there. Some of us are in production there.
32
+ Your model doesn't know that React 19 killed `forwardRef`, that Next.js made `cookies()` async, or that Tailwind v4 nuked `@tailwind` directives. It writes deprecated patterns with full confidence. It hands you SQL injection dressed up as a query builder and uses `any` in TypeScript like it's a feature.
34
33
 
35
- Here's what happened: React shipped v19 and killed `forwardRef`. Next.js made `cookies()` async. Tailwind moved to v4 and nuked `@tailwind` directives. Your model didn't get the memo. It's still writing patterns from the before times with absolute confidence and zero hesitation.
36
-
37
- And the security stuff — that's the part that should keep you up at night but doesn't because you don't know about it yet. The model will hand you SQL injection dressed up as a query builder, pass user input to `innerHTML` like it's a feature, and use `any` in TypeScript with the same energy as someone who puts ketchup on steak. It learned from real code. Real code that real people got real fired over.
38
-
39
- Context7 is one solution. Cloud-hosted. Rate-limited. Covers about 500 libraries. Works great until you burn through the quota at 11pm debugging a production outage and it serves you a 429 while your Slack is lighting up.
40
-
41
- **GroundTruth runs on your machine.** No quota to hit. No cloud to go down. Fetches docs from the source — `llms.txt`, Jina Reader, GitHub — right when you ask. 422+ curated libraries, plus npm, PyPI, crates.io, and pkg.go.dev as fallback. Any public package. Any ecosystem.
42
-
43
- The audit tool reads your actual files, finds issues at exact `file:line` locations, and fetches the current fix from the real spec. Not a Medium article. Not a 2019 ESLint plugin. The OWASP cheat sheet that was updated last month.
34
+ **GroundTruth runs on your machine.** Fetches docs from the source `llms.txt`, Jina Reader, GitHub right when you ask. 422+ curated libraries, plus npm, PyPI, crates.io, and pkg.go.dev as fallback. The audit tool reads your actual files, finds issues at exact `file:line` locations, and fetches the current fix from the real spec.
44
35
 
45
36
  ---
46
37
 
@@ -73,122 +64,105 @@ Add to your MCP config (`claude_desktop_config.json`, `.cursor/mcp.json`, or `.v
73
64
  }
74
65
  ```
75
66
 
76
- No build step. No config file. Node.js 24+. Using `@latest` means npx pulls the newest version on every session start automatically — you always get the latest libraries, audit patterns, and fixes without doing anything.
77
-
78
- ### Automatic updates
79
-
80
- GroundTruth checks npm for new versions on every startup. If a newer version exists, you get a notification:
81
-
82
- - **stderr log** — visible in your MCP client's server output
83
- - **MCP logging message** — surfaces in clients that support MCP log notifications
84
- - **Tool response footer** — appended to every tool response until you restart with the latest version
85
-
86
- Since the install uses `npx -y @groundtruth-mcp/gt-mcp@latest`, restarting your MCP client (or starting a new session) is enough to get the update. No manual `npm update` needed.
67
+ No build step. No config file. Node.js 24+. Using `@latest` means npx pulls the newest version on every session start — you always get the latest libraries, audit patterns, and fixes without doing anything.
87
68
 
88
69
  ### Optional: GitHub token
89
70
 
90
- GroundTruth fetches README files, release notes, migration guides, and code examples from GitHub. Unauthenticated requests are rate-limited to 60/hr. If you build anything with more than a couple dependencies, you'll hit that by lunch.
71
+ GroundTruth fetches README files, release notes, migration guides, and code examples from GitHub. Unauthenticated requests are limited to 60/hr. A token with no extra scopes takes it to 5,000/hr.
91
72
 
92
73
  ```bash
93
74
  # Claude Code
94
75
  claude mcp add gt -e GT_GITHUB_TOKEN=ghp_yourtoken -- npx -y @groundtruth-mcp/gt-mcp@latest
95
76
 
96
- # Cursor / Claude Desktop / VS Code
97
- {
98
- "mcpServers": {
99
- "gt": {
100
- "command": "npx",
101
- "args": ["-y", "@groundtruth-mcp/gt-mcp@latest"],
102
- "env": { "GT_GITHUB_TOKEN": "ghp_yourtoken" }
103
- }
104
- }
105
- }
77
+ # Cursor / Claude Desktop / VS Code — add env to your config:
78
+ "env": { "GT_GITHUB_TOKEN": "ghp_yourtoken" }
106
79
  ```
107
80
 
108
- A token with no extra scopes (public repo read) is enough. Takes the limit from 60 to 5000 requests/hr. Takes about 30 seconds to set up. Worth it.
109
-
110
81
  ---
111
82
 
112
- ## Tools
83
+ ## What it does
113
84
 
114
- 12 tools. Each does one thing and stops there.
85
+ Twelve tools. Each does one thing.
115
86
 
116
87
  | Tool | What it does |
117
88
  |---|---|
118
- | `gt_resolve_library` | Find a library by name — gets the registry entry and docs URL. Falls back to npm, PyPI, crates.io, and pkg.go.dev |
119
- | `gt_get_docs` | Fetch live docs for a specific topic (not whatever was cached six months ago) |
120
- | `gt_best_practices` | Get patterns, anti-patterns, and config guidance for any library |
121
- | `gt_auto_scan` | Read `package.json` / `requirements.txt`, detect lockfile versions, fetch best practices for everything in it |
122
- | `gt_search` | Search OWASP, MDN, web.dev, W3C, official language docs, and AI provider docs |
123
- | `gt_audit` | Scan your source files — finds real issues at exact `file:line` with live fixes attached |
124
- | `gt_changelog` | Fetch release notes before you run `npm update` and regret it |
125
- | `gt_compat` | Check browser and runtime compatibility before Safari breaks your launch |
126
- | `gt_compare` | Compare 2-3 libraries side-by-side so you can finally pick one and move on |
127
- | `gt_examples` | Search GitHub for real-world code examples of any library or usage pattern |
89
+ | `gt_resolve_library` | Find a library by name. Falls back to npm, PyPI, crates.io, pkg.go.dev |
90
+ | `gt_get_docs` | Fetch live docs for a specific topic |
91
+ | `gt_best_practices` | Patterns, anti-patterns, and config guidance for any library |
92
+ | `gt_auto_scan` | Read your manifest, fetch best practices for every dependency |
93
+ | `gt_search` | Search OWASP, MDN, web.dev, W3C, AI provider docs, Google APIs |
94
+ | `gt_audit` | Scan source files — issues at exact `file:line` with live fixes |
95
+ | `gt_changelog` | Release notes before you upgrade |
96
+ | `gt_compat` | Browser and runtime compatibility via MDN + caniuse |
97
+ | `gt_compare` | Compare 2-3 libraries side-by-side |
98
+ | `gt_examples` | Real-world code examples from GitHub |
99
+ | `gt_migration` | Migration guides and breaking changes |
100
+ | `gt_batch_resolve` | Resolve up to 20 libraries in one call |
128
101
 
129
102
  ---
130
103
 
131
- ## `gt_audit` the one that finds what you missed
132
-
133
- Walks your project, pinpoints issues at exact `file:line` locations, then fetches current fix guidance from official sources for every issue type it finds. A code reviewer who read the spec this morning and has no feelings about telling you your SQL is injectable.
104
+ ## How to use it
134
105
 
135
- ### How it works
136
-
137
- 1. Reads all `.ts`, `.tsx`, `.js`, `.jsx`, `.css`, `.html`, `.py` files up to a configurable limit (default: 50, max: 200)
138
- 2. Skips test files, generated files, and commented-out lines (both `//` and `#`)
139
- 3. Runs 100+ patterns — sourced from OWASP cheat sheets, typescript-eslint rules, react.dev/reference/rules, web.dev, and the OWASP Python Security Cheat Sheet
140
- 4. For the top unique issue types, fetches current fix guidance from the authoritative source
141
- 5. Reports each finding with file path, line number, the problem, and a concrete fix
142
-
143
- ### Audit categories
106
+ You don't need to memorize tool names. Just talk to your AI assistant.
144
107
 
145
108
  ```
146
- gt_audit({ categories: ["all"] }) // default — all 18 categories
147
- gt_audit({ categories: ["security", "node"] }) // OWASP + Node.js anti-patterns
148
- gt_audit({ categories: ["python", "security"] }) // Python OWASP scan
149
- gt_audit({ categories: ["accessibility"] }) // WCAG AA scan
150
- gt_audit({ categories: ["typescript", "react"] }) // type safety + React rules
109
+ use gt for nextjs
110
+ use gt for drizzle migrations
111
+ gt audit
112
+ use gt to check WCAG focus indicators
113
+ use gt for OpenTelemetry setup
114
+ find all issues and fix with gt
115
+ use gt for Google Gemini API
116
+ use gt for Claude tool use
151
117
  ```
152
118
 
153
- | Category | Patterns | What it checks |
154
- |---|---|---|
155
- | `layout` | 6 | CLS-causing images, raw `<img>` vs next/image, 100vh on mobile, missing font-display, render-blocking scripts, CSS `@import` chains |
156
- | `performance` | 7 | Missing lazy loading, useEffect data fetching, barrel file tree-shaking, missing Suspense boundaries, `document.querySelector` in React, inline object/array props, missing fetchpriority on LCP image |
157
- | `accessibility` | 10 | Missing alt text (WCAG 1.1.1), onClick on div/span (WCAG 2.1.1), icon-only buttons without aria-label, inputs without labels, `outline: none`, positive tabIndex, `role="button"` on non-buttons, placeholder href, missing lang, prefers-reduced-motion |
158
- | `security` | 11 | XSS via innerHTML, SQL injection via template literals, command injection, SSRF via user-controlled URLs, path traversal in fs calls, `NEXT_PUBLIC_` secret exposure, hardcoded credentials, unvalidated Server Actions, implied eval, CORS wildcard, dynamic code execution |
159
- | `react` | 7 | forwardRef deprecated (React 19), useFormState renamed, array index as key, missing event listener cleanup, conditional hook calls (Rules of Hooks), component called as function, side effects at render scope |
160
- | `nextjs` | 6 | Sync `cookies()`/`headers()`/`params` without await (Next.js 16), `use client` on layout, Tailwind v3 directives, Route Handler without error handling, `middleware.ts` not renamed to `proxy.ts`, pages without metadata |
161
- | `typescript` | 7 | `any` type, non-null assertions, missing return types, `@ts-ignore`, floating Promises, `require()` instead of import, double assertion |
162
- | `node` | 5 | `console.log` in production, synchronous fs operations, unhandled callback errors, `process.exit()` without cleanup, plain HTTP fetch |
163
- | `python` | 11 | SQL injection via f-string/format(), `eval()`/`exec()` with dynamic input, `subprocess` with `shell=True`, `os.system()`, bare `except:` clauses, `pickle.loads()` from untrusted source, MD5/SHA1 for passwords, `requests verify=False`, mutable default arguments, `print()` in production, `open()` path traversal |
164
-
165
- ### Options
119
+ Or call tools directly:
166
120
 
167
121
  ```typescript
168
- gt_audit({
169
- projectPath: "./src", // defaults to cwd
170
- categories: ["security"], // or "all" (default)
171
- maxFiles: 100, // 1-200, default 50
172
- tokens: 6000, // max tokens per docs fetch, default 4000
173
- })
122
+ gt_resolve_library({ libraryName: "nestjs" })
123
+ gt_get_docs({ libraryId: "nestjs/nest", topic: "guards" })
124
+ gt_best_practices({ libraryId: "vercel/next.js", topic: "caching" })
125
+ gt_auto_scan({ projectPath: "." })
126
+ gt_search({ query: "OWASP SQL injection prevention" })
127
+ gt_audit({ projectPath: ".", categories: ["security", "accessibility"] })
128
+ gt_changelog({ libraryId: "vercel/next.js", version: "15" })
129
+ gt_compat({ feature: "CSS container queries", environments: ["safari"] })
130
+ gt_compare({ libraries: ["prisma", "drizzle-orm"], criteria: "TypeScript support" })
131
+ gt_examples({ library: "hono", pattern: "middleware" })
174
132
  ```
175
133
 
176
- ### Sample output
134
+ ---
135
+
136
+ ## `gt_audit` — the one that finds what you missed
137
+
138
+ Walks your project, runs 100+ patterns across 18 categories, pinpoints issues at `file:line`, then fetches fix guidance from the authoritative source.
177
139
 
178
140
  ```
179
- # Code audit report
180
- > Path: /projects/my-app
181
- > Files scanned: 47 | Issues: 23 | Unique types: 9
182
- > Categories: all
141
+ gt_audit({ categories: ["all"] }) // all 18 categories
142
+ gt_audit({ categories: ["security", "node"] }) // OWASP + Node.js
143
+ gt_audit({ categories: ["python", "security"] }) // Python OWASP scan
144
+ gt_audit({ categories: ["accessibility"] }) // WCAG AA
145
+ gt_audit({ categories: ["typescript", "react"] }) // type safety + React rules
146
+ ```
183
147
 
184
- ---
148
+ | Category | What it checks |
149
+ |---|---|
150
+ | `security` | XSS, SQL injection, command injection, SSRF, path traversal, hardcoded credentials, CORS wildcard |
151
+ | `accessibility` | Missing alt text, onClick on div, icon-only buttons, inputs without labels, `outline: none` |
152
+ | `react` | forwardRef (React 19), useFormState renamed, index as key, conditional hooks |
153
+ | `nextjs` | Sync cookies/headers/params (Next.js 16), Tailwind v3 directives, missing metadata |
154
+ | `typescript` | `any` type, non-null assertions, `@ts-ignore`, floating Promises |
155
+ | `performance` | Missing lazy loading, useEffect data fetching, missing Suspense boundaries |
156
+ | `layout` | CLS-causing images, 100vh on mobile, missing font-display |
157
+ | `node` | console.log in production, sync fs ops, unhandled callbacks |
158
+ | `python` | SQL injection via f-string, eval/exec, subprocess shell=True, pickle.loads |
159
+
160
+ Sample output:
185
161
 
162
+ ```
186
163
  ## [CRITICAL] SQL built via template literal
187
164
  Category: security | Severity: critical | Count: 2
188
165
 
189
- Building SQL queries with template literals exposes the app to injection when
190
- user input reaches the string.
191
-
192
166
  Fix: db.query('SELECT * FROM users WHERE id = $1', [userId])
193
167
 
194
168
  Files:
@@ -200,147 +174,41 @@ Live fix: OWASP SQL Injection Prevention Cheat Sheet
200
174
 
201
175
  ---
202
176
 
203
- ## `gt_changelog` — read this before running `npm update`
177
+ ## `gt_auto_scan` — best practices for your whole stack
204
178
 
205
- Fetches release notes for any library. Hits GitHub Releases API first, falls back to CHANGELOG.md, then the docs site changelog page. Pass a version filter to see just what changed in the version you're moving to not a wall of history going back to 2018.
179
+ Point it at your project root. It reads the manifest, figures out what you're using, and pulls best practices for each dependency.
206
180
 
207
181
  ```
208
- gt_changelog({ libraryId: "vercel/next.js" })
209
- gt_changelog({ libraryId: "facebook/react", version: "19" })
210
- gt_changelog({ libraryId: "prisma", version: "6.0.0" })
211
- ```
212
-
213
- ---
214
-
215
- ## `gt_compat` — does this actually work in Safari
216
-
217
- Checks whether a web API, CSS feature, or JavaScript syntax is safe to use in your target environments. Pulls live data from MDN and caniuse.com. Run this before you ship the feature, not after your QA person opens it on an iPhone.
218
-
219
- ```
220
- gt_compat({ feature: "CSS container queries" })
221
- gt_compat({ feature: "Array.at()" })
222
- gt_compat({ feature: "Web Bluetooth API" })
223
- gt_compat({ feature: "CSS :has() selector", environments: ["safari", "firefox"] })
224
- ```
225
-
226
- ---
227
-
228
- ## `gt_compare` — pick one already
229
-
230
- Side-by-side comparison of 2-3 libraries. Fetches live docs for each and filters to content relevant to your criteria. Useful for the "prisma vs drizzle" debate you've been having with yourself for three weeks while using neither.
231
-
232
- ```
233
- gt_compare({ libraries: ["prisma", "drizzle-orm"] })
234
- gt_compare({ libraries: ["trpc", "hono"], criteria: "TypeScript support" })
235
- gt_compare({ libraries: ["zod", "valibot", "yup"], criteria: "bundle size DX" })
236
- gt_compare({ libraries: ["react", "solid-js"], criteria: "performance rendering" })
237
- ```
238
-
239
- ---
240
-
241
- ## `gt_examples` — see how other people actually use it
242
-
243
- Searches GitHub for real-world usage examples of any library or pattern. Returns code snippets from popular open-source projects with file paths and repository attribution. Useful when the docs tell you what an API does but not how anyone actually uses it in production.
244
-
245
- ```
246
- gt_examples({ library: "drizzle-orm" })
247
- gt_examples({ library: "tanstack/query", pattern: "useMutation" })
248
- gt_examples({ library: "fastapi", pattern: "middleware", language: "python" })
249
- gt_examples({ library: "hono", pattern: "auth guard", maxResults: 10 })
182
+ gt_auto_scan({ projectPath: "." })
250
183
  ```
251
184
 
252
- Requires `GT_GITHUB_TOKEN` for higher rate limits. Without a token, GitHub Code Search allows 10 requests per minute.
185
+ Supports `package.json`, `requirements.txt`, `pyproject.toml`, `Cargo.toml`, `go.mod`, `pom.xml`, `build.gradle`, and `composer.json`.
253
186
 
254
187
  ---
255
188
 
256
189
  ## `gt_search` — anything that isn't a specific library
257
190
 
258
- For questions not tied to a particular package. Pulls from OWASP, MDN, web.dev, W3C, official language docs, AI provider docs, Google developer docs, and everything else in the topic map below. Good for when you know what you need but not which library page it lives on.
191
+ Covers security, accessibility, performance, web APIs, CSS, HTTP, AI providers, Google APIs, infrastructure, databases, and more.
259
192
 
260
193
  ```
261
194
  gt_search({ query: "WCAG 2.2 focus indicators" })
262
- gt_search({ query: "JWT vs session cookies" })
263
195
  gt_search({ query: "Core Web Vitals LCP optimization" })
264
- gt_search({ query: "gRPC vs REST tradeoffs" })
265
- gt_search({ query: "OpenTelemetry Node.js setup" })
266
- gt_search({ query: "RAG retrieval patterns" })
267
- gt_search({ query: "Google Gemini API function calling" })
268
196
  gt_search({ query: "Claude tool use best practices" })
269
- gt_search({ query: "OpenAI structured output" })
270
- gt_search({ query: "Firebase Firestore security rules" })
197
+ gt_search({ query: "Google Gemini API function calling" })
198
+ gt_search({ query: "JWT vs session cookies" })
199
+ gt_search({ query: "gRPC vs REST tradeoffs" })
271
200
  ```
272
201
 
273
- ### Covered topic areas
274
-
275
202
  | Area | Topics |
276
203
  |---|---|
277
- | Security | OWASP Top 10, SQL injection, XSS / CSP, CSRF, HSTS, authentication, CORS, JWT, OAuth 2.1, OIDC, WebAuthn / passkeys, SSRF, file upload security, clickjacking, path traversal, API security, supply chain / SBOM |
204
+ | Security | OWASP Top 10, SQL injection, XSS / CSP, CSRF, HSTS, CORS, JWT, OAuth 2.1, WebAuthn, SSRF, API security |
278
205
  | Accessibility | WCAG 2.2, WAI-ARIA, keyboard navigation |
279
- | Performance | Core Web Vitals, image optimization, web fonts, Speculation Rules API |
280
- | Web APIs | Fetch, Web Workers, Service Workers, WebSocket, WebRTC, IndexedDB, Web Crypto, Intersection Observer, ResizeObserver, Web Animations API, WebAssembly, AbortController, File System Access API |
281
- | CSS | Grid, Flexbox, Container Queries, Custom Properties, View Transitions, Cascade Layers, Nesting, :has(), Subgrid, Scroll-driven Animations, oklch / color-mix, @scope |
282
- | HTTP & protocols | Headers, caching, HTTP/2, HTTP/3, REST, OpenAPI, GraphQL, gRPC / Protocol Buffers, Server-Sent Events, JSON Schema |
283
- | Standards | JSON-LD / Structured Data, OpenTelemetry, Semantic Versioning, MCP Protocol, Intl API, i18n / Localization |
284
- | Google APIs | Gemini API, Maps API, Analytics 4, Ads API, Search Console, Sheets API, Drive API, Calendar API, OAuth / Identity, Tag Manager, reCAPTCHA, Lighthouse / PageSpeed, YouTube API, Gmail API, Workspace / Apps Script, Custom Search, Chrome Extensions, SEO guidelines, Fonts API |
285
- | Google Cloud | Cloud Run, Cloud Functions, Cloud Storage, BigQuery, Pub/Sub, Vertex AI, Vision API, Speech APIs, Translation, Natural Language, GKE, IAM |
286
- | Firebase | Firestore, Authentication, Cloud Functions, Hosting |
287
- | Anthropic / Claude | Claude API, tool use, prompt caching, vision, extended thinking, computer use, streaming, message batches, PDF support, citations, models, rate limits, Claude Code, Agent SDK |
288
- | OpenAI | Chat API, Responses API, function calling, structured output, embeddings, fine-tuning, vision, image generation, Whisper / STT, TTS, Realtime API, Batch API, moderation, Agents SDK, rate limits, production best practices |
289
- | AI providers | Mistral AI, Cohere, Groq, Replicate, Together AI, Hugging Face |
290
- | AI frameworks | LangChain, LangGraph, LlamaIndex, CrewAI, AutoGen |
291
- | AI concepts | Agents & tool calling, RAG, prompt engineering, vector search / embeddings, fine-tuning, AI safety, evaluation, multimodal AI, code generation, voice AI |
292
- | Vector databases | Pinecone, Chroma, Weaviate |
293
- | Infrastructure | Docker, Kubernetes, GitHub Actions, Terraform, Cloudflare Workers, monorepo patterns |
294
- | Databases | PostgreSQL, Redis, MongoDB |
295
- | Languages | Rust, Go, Python, Node.js, TypeScript |
296
- | Frameworks | NestJS, Elysia, Angular, Flutter, Payload CMS, Kysely, Pinia, React Native / Expo + full ecosystem, Material Design |
297
-
298
- ---
299
-
300
- ## `gt_auto_scan` — best practices for your whole stack at once
301
-
302
- Point it at your project root. It reads the manifest, figures out what you're actually using, and pulls best practices for each dependency. One call instead of twenty, zero arguments required if you're already in the project folder.
303
-
304
- ```
305
- gt_auto_scan({ projectPath: "." })
306
- ```
307
-
308
- Supports `package.json` (Node.js), `requirements.txt` / `pyproject.toml` (Python — pip, uv, hatch, rye, pdm, Poetry), `Cargo.toml` (Rust), `go.mod` (Go), `pom.xml` (Maven), `build.gradle` / `build.gradle.kts` (Gradle), and `composer.json` (PHP).
309
-
310
- ---
311
-
312
- ## Usage
313
-
314
- ### Natural language
315
-
316
- ```
317
- use gt for nextjs
318
- use gt for drizzle migrations
319
- gt audit
320
- use gt to check WCAG focus indicators
321
- use gt for OpenTelemetry setup
322
- find all issues and fix with gt
323
- use gt for gRPC
324
- use gt for Google Gemini API
325
- use gt for Claude tool use
326
- ```
327
-
328
- ### Direct tool calls
329
-
330
- ```typescript
331
- gt_resolve_library({ libraryName: "nestjs" })
332
- gt_get_docs({ libraryId: "nestjs/nest", topic: "guards" })
333
- gt_best_practices({ libraryId: "vercel/next.js", topic: "caching" })
334
- gt_auto_scan({ projectPath: "." })
335
- gt_search({ query: "OpenTelemetry Node.js distributed tracing" })
336
- gt_search({ query: "Google Gemini API function calling" })
337
- gt_search({ query: "Claude prompt caching" })
338
- gt_audit({ projectPath: ".", categories: ["security", "accessibility"] })
339
- gt_changelog({ libraryId: "vercel/next.js", version: "15" })
340
- gt_compat({ feature: "CSS container queries", environments: ["safari"] })
341
- gt_compare({ libraries: ["prisma", "drizzle-orm"], criteria: "TypeScript support" })
342
- gt_examples({ library: "hono", pattern: "middleware" })
343
- ```
206
+ | Performance | Core Web Vitals, image optimization, web fonts, Speculation Rules |
207
+ | Web APIs | Fetch, Workers, WebSocket, WebRTC, IndexedDB, Web Crypto, Intersection Observer |
208
+ | CSS | Grid, Flexbox, Container Queries, View Transitions, Cascade Layers, :has(), Subgrid |
209
+ | AI providers | Claude, OpenAI, Gemini, Mistral, Cohere, Groq, LangChain, LlamaIndex |
210
+ | Google | Maps, Analytics, Ads, Cloud, Firebase, Vertex AI, YouTube, Gmail, Sheets |
211
+ | Infrastructure | Docker, Kubernetes, GitHub Actions, Terraform, Cloudflare Workers |
344
212
 
345
213
  ---
346
214
 
@@ -350,55 +218,36 @@ gt_examples({ library: "hono", pattern: "middleware" })
350
218
 
351
219
  ## How docs are fetched
352
220
 
353
- For every library docs request, GroundTruth tries sources in this order and stops at the first one that returns useful content:
221
+ For every request, GroundTruth tries sources in order and stops at the first one that returns useful content:
354
222
 
355
- 1. **`llms.txt` / `llms-full.txt`** — context files published by the project maintainer specifically for LLM consumption. More reliable than scraping the docs site.
356
- 2. **Jina Reader** (`r.jina.ai`) — converts the official docs page to clean markdown. Handles JS-rendered sites that would return nothing via a plain fetch.
357
- 3. **GitHub README / releases** — latest release notes and README from the project repository.
358
- 4. **npm / PyPI / crates.io / pkg.go.dev** — fallback for packages outside the curated registry, with automatic `llms.txt` probing on discovered homepages.
223
+ 1. **`llms.txt` / `llms-full.txt`** — context files published by maintainers for LLM consumption
224
+ 2. **Jina Reader** — converts docs pages to clean markdown, handles JS-rendered sites
225
+ 3. **GitHub README / releases** — latest release notes and README
226
+ 4. **npm / PyPI / crates.io / pkg.go.dev** — fallback for packages outside the curated registry
359
227
 
360
228
  ---
361
229
 
362
- ## Library coverage — unlimited
230
+ ## Library coverage
363
231
 
364
- 422+ curated entries in the registry with 100% best-practices and URL pattern coverage, plus automatic fallback to npm, PyPI, crates.io, and pkg.go.dev. Any public package in any major ecosystem is resolvable — the registry gives you curated quality, the fallbacks give you universal reach.
232
+ 422+ curated entries with 100% best-practices and URL pattern coverage, plus automatic fallback to npm, PyPI, crates.io, and pkg.go.dev. Any public package in any major ecosystem is resolvable.
365
233
 
366
234
  | Ecosystem | Libraries |
367
235
  |---|---|
368
- | React / Next.js | React, Next.js, shadcn/ui, Radix UI, Tailwind CSS, Headless UI, Ariakit, Zag.js, Panda CSS |
369
- | State management | Zustand, Jotai, TanStack Query, SWR, Redux Toolkit, Valtio, MobX, XState, Pinia |
370
- | Backend (Node.js) | Express, Fastify, Hono, NestJS, Elysia, Nitro, tRPC |
236
+ | React / Next.js | React, Next.js, shadcn/ui, Radix UI, Tailwind CSS, Headless UI |
237
+ | State management | Zustand, Jotai, TanStack Query, SWR, Redux Toolkit, XState |
238
+ | Backend (Node.js) | Express, Fastify, Hono, NestJS, Elysia, tRPC |
371
239
  | Backend (Python) | FastAPI, Django, Flask, Pydantic |
372
- | Backend (Go) | Gin, Fiber, GORM, chi |
373
- | Backend (Rust) | Axum, Actix Web, sqlx, Tokio |
374
- | Database / ORM | Prisma, Drizzle, Kysely, TypeORM, Mongoose, Knex, Supabase, Neon, Turso, Electric SQL |
375
- | Vector databases | Pinecone, Chroma, Weaviate, Qdrant |
376
- | AI / LLM providers | Anthropic Claude API, OpenAI API, Google Gemini API, Mistral AI, Cohere, Groq, Replicate, Together AI, Fireworks AI |
377
- | AI SDKs (JS/TS) | Vercel AI SDK, Anthropic SDK, OpenAI SDK, Google Generative AI, LangChain.js, Transformers.js, Ollama, assistant-ui |
378
- | AI SDKs (Python) | Anthropic Python SDK, OpenAI Python SDK, Google Gemini Python SDK, LangChain, LlamaIndex, CrewAI, LangGraph, AutoGen, HuggingFace Transformers |
379
- | AI agents | Claude Code, Claude Agent SDK, OpenAI Agents SDK |
380
- | AI audio / voice | ElevenLabs, Deepgram, AssemblyAI |
381
- | AI image / video | Stability AI, fal.ai |
382
- | Google | Firebase, Google Cloud, Google Maps API, Google APIs Client, Vertex AI, Angular, Flutter, Material Design |
240
+ | Backend (Go / Rust) | Gin, Fiber, GORM, Axum, Actix Web, Tokio |
241
+ | Database / ORM | Prisma, Drizzle, Kysely, TypeORM, Supabase, Neon, Turso |
242
+ | AI / LLM | Claude API, OpenAI API, Gemini API, Vercel AI SDK, LangChain, LlamaIndex |
383
243
  | Testing | Vitest, Playwright, Jest, Testing Library, Cypress, MSW |
384
- | Auth | Clerk, NextAuth, Better Auth, Lucia, Passport.js |
385
- | Validation | Zod, Yup, Valibot, Effect |
386
- | Rich text | Tiptap, Lexical, CodeMirror, Slate.js |
387
- | Content | MDX, unified, Contentlayer, Fumadocs, gray-matter |
388
- | CMS | Payload CMS, Strapi, Contentful |
389
- | Email | Resend, Nodemailer |
390
- | Payments | Stripe |
391
- | Mobile | Expo, React Native, React Navigation, NativeWind, Reanimated, MMKV, FlashList, Skia, Moti |
392
- | Build tools | Vite, Turbopack, SWC, Rollup, Webpack, Biome, ESLint, Prettier, Turborepo, Nx |
393
- | Runtime | Node.js, Bun, Deno |
244
+ | Auth | Clerk, NextAuth, Better Auth, Lucia |
245
+ | Mobile | Expo, React Native, React Navigation, NativeWind |
246
+ | Build tools | Vite, Turbopack, SWC, Biome, ESLint, Turborepo |
394
247
  | Cloud | Vercel, Cloudflare Workers, AWS SDK, Firebase, Google Cloud |
395
- | Monitoring | Sentry, PostHog, OpenTelemetry, Pino |
396
- | Automation | n8n, Trigger.dev |
397
- | HTTP clients | Axios, ky |
398
- | Real-time | Socket.IO, PartyKit |
399
- | GraphQL clients | Apollo Client, urql |
400
- | ML / Deep learning | PyTorch, TensorFlow, HuggingFace Transformers |
401
- | Serverless | Upstash Redis |
248
+ | Monitoring | Sentry, PostHog, OpenTelemetry |
249
+
250
+ Full list in the [documentation](./docs/DOCUMENTATION.md).
402
251
 
403
252
  ---
404
253
 
@@ -413,77 +262,41 @@ Context7 is solid. Here's why I reach for this instead.
413
262
  | Transport | Stdio + Streamable HTTP | Stdio + Streamable HTTP |
414
263
  | Source priority | llms.txt -> Jina -> GitHub -> npm/PyPI | Vector DB with proprietary crawl pipeline |
415
264
  | Tools | 12 specialized tools | 2 tools |
416
- | Code audit | Yes — 100+ patterns, 18 categories, file:line, live fixes | No |
417
- | Freeform search | Yes — OWASP, MDN, AI docs, Google APIs, web standards | Library docs only |
418
- | Migration guides | Yes — MIGRATION.md, changelogs, upgrade docs | No |
419
- | Batch resolution | Yes resolve up to 20 libraries in one call | No |
420
- | Changelog lookup | Yes GitHub Releases, CHANGELOG.md, docs site | No |
421
- | Browser compatibility | Yes MDN + caniuse.com | No |
422
- | Library comparison | Yes — 2-3 libraries side-by-side, any criteria | No |
423
- | Code examples | Yes — GitHub Code Search for real-world usage | No |
424
- | Content quality score | Yes — 0-1 relevance score per response | No |
425
- | MCP Resources | Yes — browsable library registry + docs | No |
426
- | MCP Prompts | 8 workflow prompts | No |
427
- | Lockfile detection | Yes — reads exact versions from lockfiles | No |
428
- | Libraries | 422+ curated (100% best-practices coverage) + npm/PyPI/crates.io/Go fallback | Undisclosed (community-contributed, claims "thousands") |
429
- | Update notifications | Yes — notifies when new version available | No |
265
+ | Code audit | 100+ patterns, 18 categories, file:line, live fixes | No |
266
+ | Freeform search | OWASP, MDN, AI docs, Google APIs, web standards | Library docs only |
267
+ | Changelog, compat, compare, examples, migration | Yes | No |
268
+ | MCP Resources + Prompts | 2 resources, 8 prompts | No |
269
+ | Lockfile detection | Reads exact versions from lockfiles | No |
270
+ | Libraries | 422+ curated + npm/PyPI/crates.io/Go fallback | Undisclosed (claims "thousands") |
430
271
  | API key required | No | No |
431
272
 
432
- GroundTruth and Context7 solve the same problem differently. Context7 indexes documentation into a vector database and retrieves by semantic similarity — fast lookups, but with indexing lag on new releases. GroundTruth fetches from the source at query time, prioritizes `llms.txt` files, follows deep links across multiple pages, and scores content quality so your model knows when to retry. Neither is universally better — but when you hit a rate limit at 11pm debugging a production issue, "self-hosted with no quota" stops being a nice-to-have.
433
-
434
- ---
435
-
436
- ## Tests
437
-
438
- 762+ tests across 25+ files. Every audit pattern has a test. Every manifest parser has a test. Circuit breaker states, SWR cache behavior, deep-fetch assembly, quality scoring — all tested. If a pattern ships without a test, the CI pipeline says no before any human has to.
439
-
440
- ```bash
441
- npm test # run all tests
442
- npm run test:coverage # with V8 coverage report
443
- npm run typecheck # TypeScript strict check (no emit)
444
- ```
445
-
446
- | File | Coverage |
447
- |---|---|
448
- | `src/sources/registry.test.ts` | LIBRARY_REGISTRY integrity, `lookupById`, `lookupByAlias`, fuzzy search, field coverage (bestPracticesPaths, urlPatterns, llmsTxtUrl), alias uniqueness |
449
- | `src/tools/audit.test.ts` | `buildCommentMap`, all 100+ patterns — Python, security, TypeScript, React, Node |
450
- | `src/tools/auto-scan.test.ts` | All 8 manifest parsers using temp directories (package.json, requirements.txt, pyproject.toml, Cargo.toml, go.mod, pom.xml, composer.json, build.gradle) |
451
- | `src/utils/extract.test.ts` | Topic relevance ranking, truncation, document order preservation |
452
- | `src/utils/sanitize.test.ts` | Prompt injection stripping, `<script>`/`<style>` removal, navigation link cleanup |
453
- | `src/utils/lockfile.test.ts` | Lockfile version detection for package-lock, pnpm-lock, yarn.lock, Cargo.lock |
454
- | `src/tools/examples.test.ts` | GitHub Code Search, caching, rate limit handling, error states |
455
- | `src/utils/version-check.test.ts` | Version comparison, update notification formatting, pending update state |
456
-
457
- Tests run in CI on every push and pull request to `main`. See `.github/workflows/ci.yml`.
273
+ Context7 indexes docs into a vector database — fast lookups, but with indexing lag on new releases. GroundTruth fetches from the source at query time, prioritizes `llms.txt`, and scores content quality so your model knows when to retry.
458
274
 
459
275
  ---
460
276
 
461
277
  ## Environment variables
462
278
 
463
- All optional. GroundTruth works out of the box with zero configuration.
279
+ All optional. Works out of the box with zero configuration.
464
280
 
465
281
  | Variable | Purpose | Default |
466
282
  |---|---|---|
467
- | `GT_GITHUB_TOKEN` | GitHub API auth — raises rate limit from 60 to 5000 req/hr | none |
283
+ | `GT_GITHUB_TOKEN` | GitHub API auth — raises rate limit from 60 to 5,000 req/hr | none |
468
284
  | `GT_CACHE_DIR` | Disk cache location for persistent cross-session caching | `~/.gt-mcp-cache` |
469
285
  | `GT_CONCURRENCY` | Parallel fetch limit in `gt_auto_scan` | `6` |
470
286
 
471
287
  ---
472
288
 
473
- ## Requirements
289
+ ## Contributing
474
290
 
475
- - Node.js 24+
476
- - Claude Code, Cursor, VS Code (MCP extension), or Claude Desktop
291
+ The public registry lives in `src/sources/registry.ts`. Adding a library is a PR with `id`, `name`, `docsUrl`, and `llmsTxtUrl` if the project publishes one.
477
292
 
478
- That's it. No Docker. No config files. No environment variables unless you want the GitHub token.
293
+ Issues and requests: [github.com/rm-rf-prod/GroundTruth-MCP/issues](https://github.com/rm-rf-prod/GroundTruth-MCP/issues)
479
294
 
480
295
  ---
481
296
 
482
297
  ## Active development
483
298
 
484
- GroundTruth is under active development. New curated registry entries, audit patterns, search topics, and features are added regularly. The registry covers 422+ libraries with 100% bestPracticesPaths and urlPatterns coverage, 422+ curated best-practice URL entries, and 30 generic fallback path patterns. Automatic fallback to npm, PyPI, crates.io, and pkg.go.dev means any public package is resolvable out of the box.
485
-
486
- Recent additions include comprehensive coverage for Google Gemini API, Anthropic Claude API (tool use, prompt caching, vision, extended thinking, computer use, streaming, batches), OpenAI API (chat, responses, function calling, structured output, embeddings, fine-tuning, realtime, agents), and 20+ additional AI providers and frameworks.
299
+ GroundTruth is under active development. New curated registry entries, audit patterns, search topics, and features are added regularly. The registry covers 422+ libraries with 100% bestPracticesPaths and urlPatterns coverage. Automatic fallback to npm, PyPI, crates.io, and pkg.go.dev means any public package is resolvable out of the box.
487
300
 
488
301
  To stay updated:
489
302
  - **Star and watch** the [GitHub repo](https://github.com/rm-rf-prod/GroundTruth-MCP) for release notifications
@@ -492,19 +305,11 @@ To stay updated:
492
305
 
493
306
  ---
494
307
 
495
- ## Contributing
496
-
497
- The library registry lives in `src/sources/registry.ts`. Adding a library is a PR with `id`, `name`, `docsUrl`, and `llmsTxtUrl` if the project publishes one. If you've been frustrated by a library not being covered, that's the fix — it takes about five minutes.
498
-
499
- Issues and requests: [github.com/rm-rf-prod/GroundTruth-MCP/issues](https://github.com/rm-rf-prod/GroundTruth-MCP/issues)
500
-
501
- ---
502
-
503
308
  ## Full documentation
504
309
 
505
- Want the full technical breakdown? Architecture, every tool's input schema, every audit pattern, the fetch pipeline, caching internals, the obfuscation build, and how the registry works?
310
+ Tool schemas, audit pattern details, architecture, caching internals, and the complete library list:
506
311
 
507
- **[Read the full docs](./docs/DOCUMENTATION.md)** — everything in one place, for the people who actually read documentation before using a tool.
312
+ **[Read the full docs](./docs/DOCUMENTATION.md)**
508
313
 
509
314
  ---
510
315