MetaEngine

eu.metaengine由 metaengine.eu 發布v1.5.0更新於 Oct 24, 2026

Code generation from JSON recipes, linked type graphs, and API schemas across 11 languages.

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

MetaEngine 可依 JSON 配方、型別圖或 API 結構描述,以 11 種語言產生原始碼檔案,並寫入本機專案。

可以做什麼
從精簡 JSON 配方、完整原生型別圖或本機規格檔產生程式碼,寫入指定輸出目錄,支援試執行與略過既有檔案。從 OpenAPI 文件、GraphQL SDL、Protocol Buffers 定義與 SQL DDL 產生具型別的用戶端。為助理載入產生規則與語言說明。支援 TypeScript、Python、Go、C#、Java、Kotlin、Groovy、Scala、Swift、PHP 與 Rust 模型,以及 Angular、React、Spring、Ktor、Reqwest 等用戶端。
適用情境
適合讓助理依精簡、可版控的規格,跨多種語言建立模型、服務、轉接器或具型別的 API 用戶端,尤其在結構重複、可用範本或欄位對應減少樣板程式碼時。
執行需求
需要 Node.js 18 或更新版本,以及支援 stdio 的 MCP 用戶端。不需帳號或 API 金鑰。選用環境變數 METAENGINE_API_URL 可覆寫預設的託管 API 位址。需要能連線至託管 MetaEngine API 的網路,試執行也不例外。
安裝前請注意
產生內容(包括你主動加入的原始碼或 customCode)會傳送至託管的 MetaEngine API 處理。產生的檔案會寫入本機輸出目錄;skipExisting 預設為 true,設為 false 會覆寫既有檔案。每次請求最多計入 250 個型別。產生的程式碼仍需在你的專案中審查與編譯。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MetaEngine,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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:

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

For Claude Code:

bash
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:

json
{  "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.

來源:README.md,提交 140f94e

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.5.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分