mcp AGENTS.md

Project instructions for tabnas/mcp, a TypeScript MCP server and command-line tool with six operations for parsing, validating, testing, and describing plugins. MCP is a standard that lets AI clients call external tools.

In plain words
What is it for?
Use it when developing or reviewing tabnas/mcp, especially its parsing, grammar validation, error explanation, testing, plugin listing, and plugin description operations.
Why use it?
It explains the repository structure, design rules, and security boundary so changes remain consistent with the project's engine and validation behaviour.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/tabnas/mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/tabnas/mcp

Made for: Codex, OpenCode.

Per session 4,275 This file is loaded in full into every session.
When invoked 4,275 The same file — it is already loaded in full.
Security scan C 1 finding. Scan, not verified.
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 $0.04275 $0.04275
Opus 5 $0.02138 $0.02138
Sonnet 5 $0.00855 $0.00855
Haiku 4.5 $0.00428 $0.00428

Measured yesterday against content hash 94f11d0f65d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

mcp AGENTS.md scanned grade C with 1 finding 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 yesterday.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf node_modules/@tabnas/parser node_modules/@tabnas/support
AGENTS.md · 284 lines

How it starts

The opening of the file, as written. The whole thing — 284 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agents Guide — mcp

What this project is

The tabnas agent tooling, published as @tabnas/mcp: an MCP server (stdio) and the unified tabnas CLI, built as two thin front-ends over one core so they cannot disagree (admin ADR-10/11, Workstream C). Six operations only — parse, validate_grammar, explain_parse_error, test_grammar, list_plugins, describe_plugin — each a pure plain-JSON-in, plain-JSON-out function.

This repo is TypeScript-only. It is tooling over the engine, not a parity package: there is no Go port, no test/spec/ fixture contract of its own, and the engine's no-dependency rule does not apply here (@modelcontextprotocol/sdk and ajv are regular dependencies — structural grammar validation is runtime behaviour of validate_grammar, so Ajv is deliberately NOT a devDependency).

Repository map

Path What it is
ts/src/core.ts The six data operations. The ONLY place operation logic lives.
ts/src/compat.ts The seventh operation, grammar compatibility (plan Phase 5). Its own module because it is the only one that loads TWO grammars and runs them against each other; it reuses core's firewall, bounds and instance builder rather than a copy.
ts/src/mcp.ts MCP front-end: the surface from tools.ts, served over stdio only. Package main; importing it must never touch stdio (the transport starts only under require.main). Exports main() — the CLI's mcp subcommand starts the identical server through it.
ts/src/cli.ts The tabnas CLI front-end: argument plumbing, human rendering, exit codes. The mcp subcommand lazily requires mcp.ts and runs the stdio server (so the data-command fast paths never load the MCP SDK).
ts/src/tools.ts The tool + resource surface: TOOLS, RESOURCES, callTool. No transport. Both front-ends import it, so neither drags in the other's transport — the reason the Worker can exist at all.
ts/src/data.ts Accessors for the bundled data. Reads a static import, never the filesystem (the Worker has none).
ts/src/data-bundle.ts Generated, gitignored. data/ compiled into a module by tools/embed-data.js.
ts/src/grammar-validator.js Generated, gitignored. data/grammar.schema.json precompiled by Ajv (tools/build-validator.js), because Workers forbid new Function.
ts/tools/gen-data.js Regenerates data/ from sibling checkouts (../<repo>). npm run gen-data.
ts/tools/embed-data.js Build step: compiles data/ + the package version into ts/src/data-bundle.ts.
ts/tools/build-validator.js Build step: precompiles the grammar schema into ts/src/grammar-validator.js.
data/ Bundled, generated, committed copies of the fleet contract files: grammar.schema.json, diagnostic.schema.json, error-codes.json, DIVERGENCE.md, plugins.json. Never edit by hand.
ts/test/ node --test suites, CJS. golden.test.js is the front-end parity gate.
benchmark/ The AX benchmark (plan E1): ten agent tasks, their starting state, and a machine check per task. --self-test runs as part of npm test and measures the benchmark, not any agent. See benchmark/README.md.
ts/src/worker.ts The hosted endpoint (plan Phase 4): streamable-HTTP MCP at POST /mcp, plus /health and /.well-known/mcp. Transport ONLY — every parsing decision is the same core, so hosted and local cannot diverge. Its exports must all be functions (see below).
ts/src/budget.ts The hosted endpoint's limits and shape-only telemetry. Separate from worker.ts because workerd rejects a non-function named export on a Worker entrypoint.
wrangler.json The hosted Worker's deploy config (mcp.tabnas.dev). Separate from the website's Worker on purpose.
ci/ci.yml The staged CI workflow (see "CI").

Read the full file on GitHub · 284 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. yesterday First seen · 284 lines · 4,275 tokens per session scan C 94f11d0f65d5

Subscribe to this mod's changes

mcp AGENTS.md is an instructions file published in the GitHub repository tabnas/mcp (0 stars, last pushed 4d ago), licensed MIT. It adds 4,275 tokens to every session, about $0.0214 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

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.

openai/codex · 5,182 tokens

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

microsoft/vscode · 6,785 tokens

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.

vercel/next.js · 7,296 tokens

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

microsoft/vscode · 5,001 tokens

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.

github/spec-kit · 7,104 tokens

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.

langchain-ai/langchain · 4,345 tokens