tabnas — Claude Code MCP server: parsing and grammars
Seven tools over a parsing engine: check input, validate a grammar, explain a failed parse, compare grammar versions. Works in any MCP client.
claude mcp add --transport http mcp https://mcp.tabnas.dev/mcpWhat tabnas does
The server hands your agent seven operations. parse builds a tree, validate_grammar checks a serialized GrammarSpec, explain_parse_error tells you why a parse failed, test_grammar runs TSV fixtures, list_plugins and describe_plugin cover grammar plugins, and compare_grammars checks whether a new grammar still accepts what the old one did. Bundled MCP resources carry the schemas and the error registry.
One TypeScript codebase backs two front-ends: the stdio server and the tabnas CLI. They share a core, so a --json CLI result and the matching MCP tool result come out byte-identical, and a golden test keeps it that way. Each call spins up a fresh engine instance, and any grammar you pass gets validated before it is used.
Grammars are data here, never code. A firewall runs on every grammar-accepting call: it rejects __proto__, constructor and prototype keys, live function references, a plugins key, and grammars above 5000 rules. ABNF, EBNF or GBNF source is not accepted — compile it first, for instance with toPureSpec, then send the spec. Published as @tabnas/mcp under MIT.
What it helps with
- check whether an input parses under a given grammar
- trace a parse failure back to its error code
- run TSV fixtures and see which rows fail
- confirm a grammar change still accepts the old language
- list the grammar plugins available to the engine
Example prompts for the agent
- Parse this file with the grammar in
g.jsonand show me the tree - Why did the parse fail? Explain the error code
- Compare
old.jsonandnew.jsonovercorpus/— what stopped being accepted
How to install tabnas
1Platform CLI: remote server
claude mcp add --transport http mcp https://mcp.tabnas.dev/mcp2Platform CLI
claude mcp add tabnas -- npx -y @tabnas/mcp1Platform CLI: remote server
codex mcp add tabnas --url https://mcp.tabnas.dev/mcp2Platform CLI
codex mcp add tabnas -- npx -y @tabnas/mcpConfig file
{
"mcpServers": {
"tabnas": {
"url": "https://mcp.tabnas.dev/mcp"
}
}
}{
"mcpServers": {
"tabnas": {
"command": "npx",
"args": [
"-y",
"@tabnas/mcp"
]
}
}
}Config file
{
"servers": {
"tabnas": {
"type": "http",
"url": "https://mcp.tabnas.dev/mcp"
}
}
}{
"servers": {
"tabnas": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@tabnas/mcp"
]
}
}
}1Platform CLI: remote server
gemini mcp add -t http tabnas https://mcp.tabnas.dev/mcp2Platform CLI
gemini mcp add tabnas npx -y @tabnas/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about tabnas
How do I install tabnas in Claude Code?
Run claude mcp add tabnas -- npx -y @tabnas/mcp. For the hosted endpoint instead, use claude mcp add --transport http tabnas https://mcp.tabnas.dev/mcp.
What does tabnas do?
It exposes seven parsing tools to your agent: parse, validate_grammar, explain_parse_error, test_grammar, list_plugins, describe_plugin and compare_grammars.
Can I pass an ABNF or EBNF grammar?
No. The tools take a serialized GrammarSpec as pure JSON only. Compile your source first, for example with toPureSpec, and pass the result.