MetaEngine

v1.7.0
eu.metaengine/mcp-server Checked 6 hours ago Published 13 hours ago

Code generation in 12 languages across MCP tools, including Dart Dio for OpenAPI.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

generate_code Generate Multi-Language Code

Generate source files from a structured type graph for TypeScript, Python, Go, C#, Java, Kotlin, Groovy, Scala, Swift, PHP, and Rust. Use explicit templateRefs to link target-language customCode to generated types and imports. For compact field maps and repeated patterns, use generate_from_recipe. # MetaEngine MCP — generation guide MetaEngine generates source files from structured type definitions and target-language code. Type and model generation supports TypeScript, Python, Go, C#, Java, Kotlin, Groovy, Scala, Swift, PHP, and Rust. ## Choose a tool - `generate_from_recipe`: compact p…

load_spec_from_file Load Code Spec from File

Read an existing generate_code JSON payload from a local file and run the same generation flow. Use generate_from_recipe for compact field maps and reusable JSON templates. outputPath, skipExisting, and dryRun arguments override values in the file.

ParameterTypeDescription
specFilePath *stringPath to the JSON spec file (absolute or relative to current directory)
dryRunbooleanPreview mode - returns generated code without writing files. Overrides dryRun in spec file if provided.
outputPathstringOutput directory path where files will be written. Overrides outputPath in spec file if provided.
skipExistingbooleanSkip writing files that already exist. Overrides skipExisting in spec file if provided.

generate_from_recipe Generate from a JSON Recipe

Expand a compact, versioned JSON recipe locally into the existing generation payload, then generate through the MetaEngine API. Use field maps, explicit type references, and named templates with parameter rows to describe repeated structures. Target-language customCode and templateRefs retain the existing type graph and import resolution. Recipe expansion executes no scripts. Supply exactly one of recipe or recipeFilePath. Validation and expansion finish before any API request or generated-file write.

ParameterTypeDescription
dryRunbooleanReturn generated source without writing files; hosted generation still occurs.
outputPathstringOutput directory override, relative to the MCP server working directory.
recipeobjectVersion 1 recipe. Compact properties: {id: 'string', 'note?': 'string', owner: {ref: 'user'}}. Definitions use id (defaults to name) or native typeIdentifier. Other native spec fields, including custo…
recipeFilePathstringLocal recipe JSON file. Relative input paths resolve against this file's directory.
skipExistingbooleanSkip existing files; defaults to true.

metaengine_initialize Get Documentation & Patterns

Returns essential MetaEngine patterns and documentation resources. This helper tool provides AI assistants with critical MetaEngine concepts: - The fundamental principle of generating related types in ONE call - Properties vs customCode distinction - Template references and type referencing patterns - Language-specific best practices Returns links to comprehensive documentation with patterns and examples. Call this when you need guidance or are generating code for the first time.

ParameterTypeDescription
languagestringOptional: The primary language you'll be generating code for. If specified, returns language-specific patterns.

generate_openapi Generate HTTP Client from OpenAPI

Generate HTTP clients from OpenAPI specifications for 11 frameworks: Angular, React, TypeScript Fetch, Go net/http, Java Spring, Python httpx, C# HttpClient, Kotlin Ktor, Rust Reqwest, Swift URLSession, and Dart Dio. Provide an inline OpenAPI spec (YAML/JSON) or a URL, choose a framework, and get fully typed, production-ready HTTP client code with models, services, and error handling.

generate_graphql Generate HTTP Client from GraphQL

Generates a fully typed HTTP client from a GraphQL SDL schema. Supports Angular, React, TypeScript Fetch, Go, Java Spring, C#, Kotlin, Python, Rust, and Swift. Enable `fragments` to emit reusable named GraphQL fragments for object-type selections.

generate_protobuf Generate HTTP Client from Protobuf

Generates a fully typed HTTP client from Protocol Buffers (.proto) definitions. Supports Angular, React, TypeScript Fetch, Go, Java Spring, C#, Kotlin, Python, Rust, and Swift.

ParameterTypeDescription
framework *stringTarget framework for code generation
protoSource *stringProtocol Buffers (.proto) definition content
angularOptionsobjectAngular-specific options
basicAuthobjectBasic authentication configuration
bearerAuthobjectBearer authentication configuration
csharpOptionsobjectC#-specific options
customHeadersarrayCustom HTTP headers
documentationbooleanGenerate documentation comments from proto comments
dryRunbooleanPreview mode - returns generated code without writing files to disk
errorHandlingobjectError handling configuration
fetchOptionsobjectTypeScript Fetch-specific options
goOptionsobjectGo-specific options
javaSpringOptionsobjectJava Spring-specific options
kotlinOptionsobjectKotlin-specific options
optionsObjectThresholdnumberMin params before grouping into options object
outputPathstringOutput directory path where files will be written
pythonOptionsobjectPython httpx-specific options
reactOptionsobjectReact-specific options
retriesobjectRetry configuration
rustOptionsobjectRust-specific options
skipExistingbooleanSkip writing files that already exist
swiftOptionsobjectSwift-specific options
timeoutobjectTimeout configuration

generate_sql Generate Models from SQL DDL

Generates typed model classes from SQL DDL (CREATE TABLE statements). Supports TypeScript, C#, Go, Python, Java, Kotlin, Groovy, Scala, Swift, PHP, and Rust.

ParameterTypeDescription
ddlSource *stringSQL DDL source code (CREATE TABLE statements)
language *stringTarget programming language
csharpOptionsobjectC#-specific options
dryRunbooleanPreview mode - returns generated code without writing files to disk
generateInterfacesbooleanEmit interface-style output (interface/protocol/trait) instead of the default modern-idiomatic concrete shape (record/data class/case class/struct).
generateNavigationPropertiesbooleanGenerate navigation properties for foreign key relationships
generateValidationAnnotationsbooleanGenerate validation annotations from column constraints
goOptionsobjectGo-specific options
groovyOptionsobjectGroovy-specific options
initializePropertiesbooleanInitialize model properties with default values
javaOptionsobjectJava-specific options
jsonAsstringHow JSON columns are typed: e.g. 'string' (raw), 'object' (parsed). Language-specific defaults apply if omitted.
kotlinOptionsobjectKotlin-specific options
outputPathstringOutput directory path where files will be written
phpOptionsobjectPHP-specific options
precisionSafeDecimalsbooleanEmit decimal/numeric columns as precision-safe types (e.g. string in JS) instead of float, preserving full precision.
pythonOptionsobjectPython-specific options
rustOptionsobjectRust-specific options
scalaOptionsobjectScala-specific options
schemaPrefixstringPrepend the SQL schema name to generated type names (e.g. 'Auth_User' instead of 'User').
singularTypeNamesbooleanSingularize plural table names when emitting type names (e.g. table 'users' becomes type 'User').
skipExistingbooleanSkip writing files that already exist