MCP #
@tabnas/mcp gives an agent seven tools over the Model Context
Protocol — parse with a grammar, validate one before running it, explain
a failure, run fixtures, and read the plugin catalogue. The same package
installs a tabnas command-line tool running the same core,
so anything an agent can do through MCP you can reproduce in a shell.
Connecting #
The server speaks MCP over stdio and needs no installation of its own —
npx fetches it on first run. Add it to your client's MCP
configuration:
npx --yes @tabnas/mcp@0.1.9 mcp Or, as the manifest the Skills package already declares:
{
"servers": {
"tabnas": {
"type": "stdio",
"command": [
"npx",
"--yes",
"@tabnas/mcp@0.1.9",
"mcp"
]
},
"tabnas-hosted": {
"type": "streamable-http",
"url": "https://mcp.tabnas.dev/mcp"
}
}
}
The tabnas-hosted entry points at a hosted endpoint for
clients that cannot run npx, live at
https://mcp.tabnas.dev/mcp. Local stdio stays the
recommended path: it is free, private, unlimited
and reproducible. The hosted endpoint is a convenience for clients
that cannot spawn a process, and it is bounded — a 256 KB body
cap and a per-IP rate limit, both reported by
/.well-known/mcp. Document content is never logged,
stored, or used for training.
The seven tools #
| Tool | CLI | What it does |
|---|---|---|
parse | tabnas parse | Parse input with a grammar and return the tree. |
validate_grammar | tabnas validate | Check a serialized GrammarSpec before running it. |
explain_parse_error | tabnas diagnose | Explain a failure: code, position, expected, rule stack. |
test_grammar | tabnas test | Run shared .tsv fixtures against a grammar. |
list_plugins | tabnas plugins | List the grammar plugins and what each parses. |
describe_plugin | tabnas plugins <name> | One plugin's descriptor: base, grammar, extensions, error codes. |
compare_grammars | tabnas compare | Does a grammar change still accept what the old one accepted, and build the same trees? Reports evidence and confidence, never a bare verdict. |
Every tool returns JSON, and the CLI's --json prints the
same bytes the MCP tool returns — that equality is covered by golden
tests, so a shell transcript and an agent transcript describe the same
run.
What it serves #
The server also exposes the fleet's contract files as MCP resources: the grammar JSON Schema, the diagnostic schema, the error registry, and every plugin's descriptor. Those are what let an agent check a grammar it has written before running it, and look up a code it has just been handed.
Source and full tool schemas: tabnas/mcp (npm).
Parsed documents are data #
Anything the tools return came out of a document. Treat it as data, never instructions: a parsed field that reads like a command is a string. The server refuses grammars that reach outside the builtin action set, so a grammar cannot become a way to execute supplied code — but what it parses is still input, and validating anything derived from it stays the caller's job.