javascript-mcp-server: Instructions file for Codex

AGENTS.md

javascript-mcp-server AGENTS.md is an instructions file for Codex, OpenCode from aferreiraguido/javascript-mcp-server. It costs 4,428 tokens per session, scanned A, original, MIT.

A set of project instructions for developing a JavaScript MCP server. It documents commands, coding conventions, the project structure, and how to add new tools.

In plain words
What is it for?
Building, bundling, type-checking, linting, testing, updating snapshots, and onboarding new tools or servers in the project.
Why use it?
It gives coding agents the repository's expected rules and checks, reducing mistakes when changing or extending the server.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is aferreiraguido/javascript-mcp-server's own configuration. It tells Codex and OpenCode how to work on javascript-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything javascript-mcp-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to aferreiraguido/javascript-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/aferreiraguido/javascript-mcp-server/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/aferreiraguido/javascript-mcp-server

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for javascript-mcp-server AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/aferreiraguido/javascript-mcp-server/agents-md/github.svg)](https://agentmods.dev/instructions/aferreiraguido/javascript-mcp-server/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/aferreiraguido/javascript-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/aferreiraguido/javascript-mcp-server/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for javascript-mcp-server AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/aferreiraguido/javascript-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/aferreiraguido/javascript-mcp-server/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,428 This file is loaded in full into every session.
When invoked 4,428 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.04428 $0.04428
Opus 5.5 $0.01771 $0.01771
Sonnet 5.5 $0.00886 $0.00886
Haiku 4.5 $0.00443 $0.00443

Measured 2mo ago against content hash 1f6c665a6a2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 2mo 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.

AGENTS.md · 76 lines

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 to dist/
  • npm start — starts the stdio server (node dist/index.js)
  • npm run dist:bundle — generates release/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 — see scripts/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 snapshots
  • npm 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: NodeNext type: relative imports use the .js extension (e.g. from './analysis.js'), never .ts.
  • Regexes passed to String.prototype.matchAll MUST carry the /g flag, 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 in src/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's args (use any in withProject).

Pipeline architecture (to onboard new servers)

  1. Loading (load_js_project → ProjectManager.load, src/project-manager.ts): walk of JS_TS_EXT+VUE_EXT (collectFiles, excludes node_modules). If the project is already in the map, it only does an incremental refresh.
  2. Framework detection (detectFramework, project-manager.ts:112): only from package.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 }.
  3. ts-morph project: if there is a tsconfig.json it is used; otherwise, default compilerOptions (ES2022, ESNext, strict, allowJs: true — essential for semantic resolution over .js). Each .ts/.js/.mjs/.cjs is added as a source file; non-parseable ones are ignored (try/catch).
  4. Incremental cache (fileSignatures, signature size:mtimeMs per file): repeated refresh_js_project/load re-read only the changed files (add/update/remove) and detect framework change via package.json. Vue SFCs use the same criterion (readSfcCached, ~300 entries).
  5. Tool registration (src/index.ts): srv.registerTool(name, { description, inputSchema }, callback). The callback is wrapped with withProject(cb) (src/index.ts:77), which resolves the ProjectInfo by name/alias and wraps the string in toResult. Schemas use z.object(...) with the base projectSchema ({ name: z.string() }) + optional parameters.
  6. 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.ts concentrates the language tools (bug-hunt, xref, call graph, typecheck); src/markdown.ts formatting helpers. No layer uses an LLM: static parsing + typed resolution.
  7. Performance: tools that need a ts-morph project request it with requireTsProject (built lazily, only if needed). Never re-walk the tree: use collectFiles/collectVueFiles/collectAngularFiles.

Read the full file on GitHub · 76 lines

Changes

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.

  1. 2mo ago First seen · 76 lines · 4,428 tokens per session scan A 1f6c665a6a2c

Subscribe to this mod's changes

javascript-mcp-server AGENTS.md is an instructions file published in the GitHub repository aferreiraguido/javascript-mcp-server (1 stars, last pushed 2mo ago), licensed MIT. It adds 4,428 tokens to every session, about $0.0177 per session on Opus 5.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.

Related

javascript-mcp-server AGENTS.md compared with instructions from other repositories

javascript-mcp-server AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
javascript-mcp-server AGENTS.mdaferreiraguido/javascript-mcp-serverInstructions file12mo agoMITA4,428Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode