MCP Server · Model Context Protocol native

Code generation,
handed to your agent.

MetaEngine ships a Model Context Protocol server that exposes every converter and batch type generator as a tool call. Connect it to Claude Desktop, Cursor, Cline, or any MCP-aware assistant — and let it turn "regenerate my billing client" into a real, typed, committed diff.

7
Tools exposed
4
Source specs
11
Languages
stdio · http
Transports
How it wires together
AI AGENTClaude · Cursornatural languagetool_callMETAENGINE MCPmcp-serverstdio · http · ssedispatchCONVERTERS4 sourcesopenapi · graphql · …emitPACKAGES3 on npmtyped · shipped
stdio — local pipe (default)·http — long-lived HTTP server·sse — server-sent events for streaming
What it does

Reachable from inside the agent loop.

MetaEngine's MCP server is a thin boundary on top of the same compiler pipeline that powers the Converters page. Anywhere you'd open the Playground or run the CLI, an agent can do the same call structurally and get back the same byte-reproducible output.

Runs on your machine

stdio by default; specs and source never leave the sandbox unless you opt in.

One contract per language

Switch target from typescript to python and the tool signature is identical. Agents learn the pattern once.

Byte-reproducible at a fixed engine version

Generation is deterministic. Agents can retry without drift.

Scope-gated tools

Auto-approve safe reads; require confirmation for writes. Standard MCP scope rules.

Works with any MCP client

Claude Desktop, Cursor, Cline, Continue, Zed — wherever the protocol is spoken.

Same registry as the rest of the platform

The converters surfaced through MCP are the same ones the Playground and CLI use. Versions stay in lockstep.

Tool catalog · 7 tools

Seven verbs over the converter registry.

Every capability MetaEngine has — loading a spec, initializing a context, running a converter — surfaces as one MCP tool. Agents compose them like any other function.

Install

One npx away.

Drop the server into your MCP client's config and restart. No API key, no account — every converter in the registry is immediately addressable.

One-liner
$ npx @metaengine/mcp-server add claude
The CLI edits your client config for you. Idempotent — safe to re-run.
~/.claude/claude.json
{
  "mcpServers": {
    "metaengine": {
      "command": "npx",
      "args": ["@metaengine/mcp-server@latest"],
      "env": {
        "METAENGINE_SCOPE": "openapi,graphql,protobuf,sql"
      }
    }
  }
}
Architecture

Four stages. Same compiler as the platform.

The MCP is a thin boundary. Heavy lifting is the same pipeline that powers the Converters page and the CLI — which is why output stays byte-reproducible across runs and across surfaces.

01
Agent emits tool_call
Your AI assistant — Claude, Cursor, Cline — picks a MetaEngine tool from its registered schema and your prompt.
02
MCP server resolves
The stdio / HTTP bridge routes the call to the right converter, validating args against the tool JSON schema.
03
Converter runs
Spec is parsed, normalized to MetaEngine IR, emitted through the language-specific target. Deterministic against a given engine version.
04
File tree returned
Output is streamed back as a structured file tree — path, bytes, language — ready to write, diff, or commit.
Runtime log — metaengine-mcp
[14:02:18.441]  INFO   mcp transport=stdio ready pid=42811
[14:02:18.442]  INFO   registry loaded · 7 tools · 4 source specs
[14:02:19.108]  REQ    tool.load_spec_from_file { path: "specs/billing.v3.yaml" }
[14:02:19.183]  OK     load_spec_from_file → 42 types · 68 ops · 74ms
[14:02:19.201]  REQ    tool.metaengine_initialize { target: "typescript" }
[14:02:19.214]  OK     metaengine_initialize → ctx#a14 ready
[14:02:19.215]  REQ    tool.generate_code { context: "ctx#a14" }
[14:02:19.527]  OK     generate_code → 71 files · 184.2KB · 312ms
[14:02:19.784]  INFO   idle · 0 in-flight · mem=34.1MB
Notes from a benchmark

I measured this myself
so you don't have to take my word for it.

A small open harness compares two Claude agents producing the same DDD codebase: one using the MetaEngine MCP, one using Claude's built-in Write tool, file by file. It captures the result-event totals from claude -p, compiles the output, and runs structural verification on every entity.

Numbers below are illustrations from one author, one machine, N=5 per cell — not benchmarks of MetaEngine. They give the design tenets above some empirical shape. The harness, prompts, and result events are MIT-licensed; reproducing on your own setup is the only thing that tells you whether the patterns hold for you.

Open the harness on GitHub
What seems structural

Shorter agent loops.

When the MCP returns the full file tree in one call, the agent's loop runs ~11–15× shorter than a Write-tool loop emitting one file per turn. cache_read accumulation drops correspondingly. The mechanism is loop topology, not the model — it reproduced across an Opus → Sonnet swap and across spec shape.

What seems structural

Invocation shape matters.

How the agent gets a spec to the tool changes its measured token cost. Embedding a large spec inline as JSON costs more output tokens than having the agent write a small Python transformer that produces the spec file at runtime, which the tool then reads from disk. ~70–77% output-token reduction across TS / Java / Python. The pattern only holds when the spec is computable from a smaller source.

What I'm not claiming

Not a benchmark of MetaEngine.

I'm not claiming a fixed % cheaper or faster. I'm not claiming MCP is objectively the right way to do codegen. The dollar figures depend on Anthropic's current billing of tool_use input bytes — that's an implementation detail of one provider at one point in time.

The harness lives in a separate repo. It includes the warmup brief, the spec, the prompts, the verification suite, and the auto-generated summary.md with caveats inline. If you reproduce, falsify, or measure something that contradicts this — open an issue. Disagreement is more useful to me than confirmation.

Add the server. Try it on a real spec.

The MCP is MIT, free, and ships with the same converters as the rest of the platform. The benchmark harness is also MIT, in a separate repo — fork it, run it, tell me what's wrong.