npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@metaengine/mcp-server

v1.5.0

Published

MCP tools for code generation from compact JSON recipes, type graphs, and OpenAPI, GraphQL, Protobuf, or SQL schemas. Generate linked types and custom code with imports across 11 languages.

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

| Tool | Purpose | | --- | --- | | generate_from_recipe | Expand compact JSON fields, named templates, and local JSON input rows into the existing type graph, then generate files. | | generate_code | Generate from the complete native JSON type graph, including arbitrary target-language code with explicit references. | | load_spec_from_file | Read a native generate_code payload from a local JSON file. | | generate_openapi | Generate a typed client from an OpenAPI document supplied inline or by URL. | | generate_graphql | Generate a typed client from GraphQL SDL, with optional named fragments. | | generate_protobuf | Generate a typed client from Protocol Buffers definitions. | | generate_sql | Generate model types from SQL DDL. | | metaengine_initialize | Load 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. The development suite compares a 59-interface payload with its recipe equivalent; that comparison 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.

Links

License

MIT