# MetaEngine

Turns a compact JSON recipe, a type graph or an API schema into a batch of linked source files in one of 11 languages. Handy when there are many models and clients to write.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: meta-engine
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/meta-engine/mcp-server
- Updated: 2026-09-15
- HTML: https://affpapa.org/en/nevibecode/mcp/metaengine

## What it does

The server takes a recipe of classes, properties, templates and cross-type references, expands it into the full payload and ships that to the MetaEngine API. The files that come back get written to disk. References resolve inside a single call, so the whole graph has to arrive at once. Keep a recipe in version control and point at it with `recipeFilePath` rather than pasting its contents into every call.

OpenAPI, GraphQL SDL, Protocol Buffers and SQL DDL each get their own tool and yield models or a typed client. `generate_code` accepts the complete native type graph and lets you attach code in the target language. Writing is controlled by `outputPath`, `skipExisting` (on unless you turn it off) and `dryRun`, which hands back file contents instead of touching disk. The hosted side takes 250 counted types per request, so a large graph goes out in pieces.

Node.js 18 or newer is required. Recipe expansion runs locally and executes no JavaScript, yet the expanded payload leaves for MetaEngine's servers, including any code you put into the request. Nothing from your project is scanned on its own. Compile and review the output in your own build either way.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `METAENGINE_API_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env METAENGINE_API_URL=<METAENGINE_API_URL> --transport stdio metaengine -- npx -y @metaengine/mcp-server
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add metaengine --env METAENGINE_API_URL=<METAENGINE_API_URL> -- npx -y @metaengine/mcp-server
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "metaengine": {
            "command": "npx",
            "args": [
                "-y",
                "@metaengine/mcp-server"
            ],
            "env": {
                "METAENGINE_API_URL": "<METAENGINE_API_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "metaengine": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@metaengine/mcp-server"
            ],
            "env": {
                "METAENGINE_API_URL": "<METAENGINE_API_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e METAENGINE_API_URL=<METAENGINE_API_URL> metaengine npx -y @metaengine/mcp-server
```
Replace <…> with your own values

## When to use it
- produce a batch of linked models from one JSON recipe
- get a typed client out of an OpenAPI document
- turn SQL DDL into model types without retyping them
- describe a repeated structure once as a template with parameters
- write output into chosen folders without clobbering existing files

## Example prompts
- Run `generate_from_recipe` on `specs/models.recipe.json` and write the files to `src/models`
- Generate a typed client from this OpenAPI document
- Build model types from this SQL schema, do a `dryRun` first

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
