mcpField
M
MetaEngine

MetaEngine

Local
metaengine.euDeveloper Tools0Updated 7w ago

About MetaEngine

MetaEngine is an MCP server that generates related source files from JSON recipes, type graphs, and API schemas. It is for developers building models or typed clients, with linked type references and support for 11 languages.

Key features

  1. 01Generate files from compact JSON recipes
  2. 02Resolve related types across a generation batch
  3. 03Generate from OpenAPI, GraphQL, Protobuf, and SQL
  4. 04Create models in 11 programming languages
  5. 05Generate typed clients for listed frameworks
  6. 06Preview output or write files locally

Use cases

  1. 01Create related model files from a type graph
  2. 02Generate a typed client from an API schema
  3. 03Reuse templates and local JSON inputs in recipes

MCP support

The stdio MCP server provides tools for recipe and type-graph generation, schema-based client generation, and local spec-file loading. It sends expanded generation payloads to the hosted MetaEngine API, which returns source files.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"eu-metaengine": {
"command": "npx",
"args": [
"-y",
"@metaengine/mcp-server"
],
"env": {
"METAENGINE_API_URL": "<METAENGINE_API_URL>"
}
}
}
}
Run commandnpx -y @metaengine/mcp-server
Environment variables to set
METAENGINE_API_URLOverride the MetaEngine generation API endpoint (defaults to https://api.metaengine.eu)

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@metaengine/mcp-server1.5.0

Tools

8

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
enumsarrayNoEnum definitions
dryRunbooleanNoPreview mode - returns generated code without writing files to disk. When true, file contents are returned in the response for review.
classesarrayNoClass definitions (regular and generic class templates)
languageenumYesTarget programming languagetypescript | python | go | csharp | java | kotlin | groovy | scala | swift | php | rust
arrayTypesarrayNoArray type definitions - creates IArrayType references (NO files generated). Use for reusable array definitions.
initializebooleanNoWhether to initialize properties with default values
interfacesarrayNoInterface definitions (regular and generic interface templates)
outputPathstringNoOutput directory path where files will be written. Defaults to current directory.
customFilesarrayNoCustom files (utility files, type aliases, barrel exports) - generates files WITHOUT class wrapper. Perfect for type aliases and utility functions.
packageNamestringNoPackage/module/namespace name for generated code. Defaults depend on language: Go='github.com/metaengine/demo', Java/Kotlin/Groovy='com.metaengine.generated'. For C#: when omitted or empty, no namespace declaration is generated (ideal for GlobalUsings).
skipExistingbooleanNoSkip writing files that already exist (useful for stub pattern). When true, only new files are created.
dictionaryTypesarrayNoDictionary type definitions - creates IDictionaryType references (NO files generated). Supports all 4 combinations of primitive/custom for key/value.
typeScriptOptionsobjectNoTypeScript-only rendering options. Omit for legacy extensionless relative imports.
typeScriptOptions.relativeImportExtensionenumNoUse 'js' for Node16/NodeNext ESM source: generated .ts files import relative modules with runtime .js specifiers. 'none' preserves extensionless imports.none | js
concreteGenericClassesarrayNoConcrete generic implementations (Repository<User>) - creates inline type references, NO files generated
concreteGenericInterfacesarrayNoConcrete generic interface implementations (IRepository<User>) - creates inline type references, NO files generated
skipEnumMembersValidationbooleanNoSkip enum member validation in the generation engine.

Details

From the project README

MetaEngine MCP Server

npm version License: MIT

Generate related source files from a type graph, a compact JSON recipe, or an API schema through your MCP client.

MetaEngine combines structured classes, interfaces, enums, collections, and generics with target-language code supplied in customCode. Explicit references connect that code to the same type graph, so the generator can resolve names and imports across the batch. Use it for models, services, adapters, or other structures you describe; the format does not prescribe an application architecture.

Install

Node.js 18 or later is required. Add the server to your MCP client's configuration:

{
  "mcpServers": {
    "metaengine": {
      "command": "npx",
      "args": ["-y", "@metaengine/[email protected]"]
    }
  }
}

For Claude Code:

claude mcp add metaengine -- npx -y @metaengine/[email protected]

The hosted service requires no API key or account. MCP clients include Claude Code, Claude Desktop, Cursor, Cline, and others with stdio support.

Start with a recipe

Call generate_from_recipe with these arguments:

{
  "recipe": {
    "recipeVersion": 1,
    "language": "typescript",
    "typeScriptOptions": { "relativeImportExtension": "js" },
    "classes": [
      { "name": "Customer", "id": "customer", "properties": { "id": "string", "name": "string" } },
      { "name": "Order", "properties": { "customer": { "ref": "customer" }, "total": "number", "note?": "string" } }
    ]
  },
  "outputPath": "src/models"
}

The local MCP server expands the recipe into the existing generation payload, sends that payload to the MetaEngine API, and writes the returned files. Add named templates and parameter rows when structures repeat. Existing customCode, templateRefs, imports, decorators, inheritance, and generic definitions remain available.

A version-controlled recipe can be invoked with {"recipeFilePath":"specs/models.recipe.json"}. Reading a file avoids resending its contents in the tool call. Files still need to be authored or maintained.

Recipe grammar and examples · Generation guide · Language examples

Tools

ToolPurpose
generate_from_recipeExpand compact JSON fields, named templates, and local JSON input rows into the existing type graph, then generate files.
generate_codeGenerate from the complete native JSON type graph, including arbitrary target-language code with explicit references.
load_spec_from_fileRead a native generate_code payload from a local JSON file.
generate_openapiGenerate a typed client from an OpenAPI document supplied inline or by URL.
generate_graphqlGenerate a typed client from GraphQL SDL, with optional named fragments.
generate_protobufGenerate a typed client from Protocol Buffers definitions.
generate_sqlGenerate model types from SQL DDL.
metaengine_initializeLoad generation rules and language notes for the assistant.

Type and model generation supports TypeScript, Python, Go, C#, Java, Kotlin, Groovy, Scala, Swift, PHP, and Rust. Client generation targets Angular, React, TypeScript Fetch, Go net/http, Java Spring, Python httpx, C# HttpClient, Kotlin Ktor, Rust Reqwest, and Swift URLSession.

generate_code, load_spec_from_file, and generate_from_recipe share generation and file-writing behavior:

  • outputPath chooses the local output directory; the default is the MCP server's working directory.
  • skipExisting defaults to true. Set it to false to overwrite generated files.
  • dryRun: true returns generated file contents without writing them. Generation still calls the hosted API.
  • Related type references resolve within one batch. Include the complete graph in that call.
  • The hosted limit is 250 counted types per generation request. The exact count is described in the recipe guide.

For Node16/NodeNext TypeScript ESM, use typeScriptOptions: {"relativeImportExtension":"js"}. Other TypeScript output retains extensionless relative imports by default.

Where recipes help

Field maps remove repeated property metadata. Templates describe repeated structure once and bind explicit parameter values. Local JSON inputs can supply those values from a file you already maintain. The adapter executes no JavaScript from a recipe.

Savings depend on the amount of repetition, the chosen model and tokenizer, and the surrounding agent workflow. Custom business logic still needs to be written. A recorded development fixture compares a 59-interface recipe with its expanded payload; it measures JSON bytes, not model tokens or usage-limit guarantees.

The compact format keeps one readable path for common declarations and the existing native fields for advanced code. Native type expressions and customCode remain specific to their target language. Review and compile generated code in your project, including its dependencies and compiler settings.

Privacy and execution

The local MCP server runs over stdio and performs recipe expansion, declared local file reads, and generated-file writes. The hosted MetaEngine API performs ephemeral processing of the expanded generation payload and returns source files.

The server does not automatically scan or upload existing project source files. Source or customCode content explicitly included in a generation request is part of that request and is sent to the hosted MetaEngine API. Values read from recipe inputs are included only when the recipe uses them in the expanded payload.

Submitted generation content and generated file contents are not persisted or logged; anonymous operational metadata is retained. See the Privacy Policy and Terms for the processing and retention details.

Recorded agent workflows

A single MCP call can produce many files, reducing required tool operations. Model responses are a separate measure: in the recorded TypeScript runs Opus often issued one Write per response, while Sonnet usually batched the Writes. The corrected benchmark findings separate those counts and retain output-token totals and pass rates.

For reproducible measurements across languages, models, and spec shapes, see benchmark/ — a self-contained harness with the prompts, judging tools, and 15 canonical result folders. Numbers there are illustrations from one author's runs at N=5 per cell; reproduce in your own environment to see what holds for you.

Links

License

MIT

About this repository

This repository contains public documentation, examples, benchmarks, and issue tracking for MetaEngine MCP Server. The compiled npm package is available at @metaengine/mcp-server. The server implementation is maintained in a private repository.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.