Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/aferreiraguido/javascript-mcp-server/agents-mdgit clone --depth 1 https://github.com/aferreiraguido/javascript-mcp-serverWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.04428 | $0.04428 |
| Opus 5 | $0.02214 | $0.02214 |
| Sonnet 5 | $0.00886 | $0.00886 |
| Haiku 4.5 | $0.00443 | $0.00443 |
Grade A, and why
javascript-mcp-server AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Commands
npm run build— compiles TypeScript todist/npm start— starts the stdio server (node dist/index.js)npm run dist:bundle— generatesrelease/javascript-mcp-server.cjs(single-file, ~26 MB) with all deps embedded (Node ≥ 20, no npm). Marks the optional template-engines of@vue/compiler-sfc(consolidate: twig/ejs/pug/handlebars…, lazy require in try/catch) as external — seescripts/bundle.mjs.release/is in.gitignore; regenerate after every change.npm run typecheck/npm run lint— type checking (tsc --noEmit)npm test— smoke tests (tsx test/smoke.test.ts, node:test + InMemoryTransport)npm run test:snapshots— verifies the golden markdown snapshotsnpm run test:snapshots:update— regenerates the snapshots (only if the output change is INTENTIONAL)npm run test:stress— performance/incremental-cache tests over a synthetic project of 240+ files (test/stress.test.ts, generates the fixture in tmpdir)
Conventions
module: NodeNexttype: relative imports use the.jsextension (e.g.from './analysis.js'), never.ts.- Regexes passed to
String.prototype.matchAllMUST carry the/gflag, or Node throws an error. - Each framework lives in
src/ast/<framework>.ts(Vue, Nuxt, Angular, React/Next, Svelte, Node) and exposes functions that return markdown strings. The domain modules (security.ts,debt.ts,cross.ts,types.ts) add heuristic/structural cross-framework tools. Tools are registered insrc/index.ts. - Do not use an LLM to interpret the framework: everything is static parsing + typed resolution; the AI only queries.
- Tool arguments are read from
Record<string, unknown>; the SDK validates the schema at runtime. Do not rely on the typing of the callback'sargs(useanyinwithProject).
Pipeline architecture (to onboard new servers)
- Loading (
load_js_project→ProjectManager.load,src/project-manager.ts): walk ofJS_TS_EXT+VUE_EXT(collectFiles, excludesnode_modules). If the project is already in the map, it only does an incrementalrefresh. - Framework detection (
detectFramework, project-manager.ts:112): only frompackage.json(deps + devDeps) and directory structure, with fixed priority — Nuxt → Next → Svelte/SvelteKit → React (confirmed with.tsx/.jsx) → NestJS → Angular → Vue (weighs real SFCs outside test/fixtures) → Fastify → Express/Koa → plain Node. Returns{ kind, confidence }. - ts-morph project: if there is a
tsconfig.jsonit is used; otherwise, defaultcompilerOptions(ES2022, ESNext,strict,allowJs: true— essential for semantic resolution over.js). Each.ts/.js/.mjs/.cjsis added as a source file; non-parseable ones are ignored (try/catch). - Incremental cache (
fileSignatures, signaturesize:mtimeMsper file): repeatedrefresh_js_project/loadre-read only the changed files (add/update/remove) and detect framework change viapackage.json. Vue SFCs use the same criterion (readSfcCached, ~300 entries). - Tool registration (
src/index.ts):srv.registerTool(name, { description, inputSchema }, callback). The callback is wrapped withwithProject(cb)(src/index.ts:77), which resolves theProjectInfoby name/alias and wraps the string intoResult. Schemas usez.object(...)with the baseprojectSchema({ name: z.string() }) + optional parameters. - Layers:
src/ast/<framework>.ts(Vue, Nuxt, Angular, React/Next, Svelte, Node) exposes functions that return markdown strings; the domain modules (security.ts,debt.ts,cross.ts,types.ts) add heuristic/structural cross-framework tools;src/analysis.tsconcentrates the language tools (bug-hunt, xref, call graph, typecheck);src/markdown.tsformatting helpers. No layer uses an LLM: static parsing + typed resolution. - Performance: tools that need a ts-morph project request it with
requireTsProject(built lazily, only if needed). Never re-walk the tree: usecollectFiles/collectVueFiles/collectAngularFiles.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 76 lines · 4,428 tokens per session scan A 1f6c665a6a2c
javascript-mcp-server AGENTS.md is an instructions file published in the GitHub repository aferreiraguido/javascript-mcp-server (1 stars, last pushed 19d ago), licensed MIT. It adds 4,428 tokens to every session, about $0.0221 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.