Free • MIT Licensed Model Context Protocol

MetaEngine MCP Server

Turn one conversation into 50 consistent files. Claude architects, MetaEngine builds.

Structured code generation for AI assistants. Instead of generating files one by one, Claude describes type relationships once—MetaEngine produces all files instantly with perfect imports and consistency. 10 languages: TypeScript • Python • Go • C# • Java • Kotlin • Groovy • Scala • Swift • PHP

View on NPM
Installation
# No installation needed - use npx
# Add to ~/.claude/mcp.json:

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

What This Tool Does

More Output Per Conversation

File-by-File Generation
  • Generate file → fix imports → next file
  • Token overhead for each file's boilerplate
  • Context grows with every file
  • Patterns may drift across files
  • Minutes for large batches
Structured Generation
  • Describe relationships → all files at once
  • Compact spec instead of full text
  • Minimal context usage
  • Guaranteed consistency
  • Seconds for 50+ files

Result: Claude stays focused on architecture. Mechanical work is offloaded.

Built for AI Assistants

Designed for Claude Code and MCP-compatible AI assistants. You describe what you need, Claude decides when structured generation makes sense.

Scale Performance

At 50 files: 3.8x faster, 57% fewer tokens. The advantage grows with file count. Perfect for generating 20-100 interconnected files where consistency matters.

Deterministic Output

Type relationships are declared, not inferred. Same spec always produces the same files with correct imports and references.

10 Languages Supported

Same specification generates idiomatic code for any target language

TypeScript

Classes, interfaces, generics, decorators

Python

Type hints, dataclasses, Generic[T]

Go

Structs, interfaces, JSON tags

C#

Classes, nullable types, LINQ

Java

Interfaces, enums, Stream API

Kotlin

Data classes, null safety

Groovy

Dynamic typing, closures

Scala

Case classes, traits, functional

Swift

Structs, protocols, optionals

PHP

Classes, interfaces, type hints

Quick Start Guide

1 Add to MCP Configuration

Edit ~/.claude/mcp.json (Claude Code) or Claude Desktop config:

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

2 Talk to Claude in Natural Language

You:

"Create User, Order, and Product models with a UserService that includes CRUD operations and caching"

Claude:

✓ Generated 6 files instantly

• user.ts
• order.ts
• product.ts
• services/user-service.ts
...

3 Files Written, Imports Perfect

All files are written directly to your project with correct imports, proper inheritance, and full type safety. No manual file creation, no fixing imports, no syntax errors.

Real Performance Data

From actual testing: 50 C# files (entities, services, repositories, DTOs, validators)

When Claude Uses This Tool
  • ✅ Generating 20-100 interconnected files
  • ✅ Complex import management (deep namespaces)
  • ✅ Multi-language generation (same architecture)
  • ✅ Pattern multiplication (same structure × N entities)
  • ✅ Test coverage parity across language implementations
When Claude Generates Directly
  • ✅ Quick 1-15 file generations (faster directly)
  • ✅ Exploratory coding (structure evolving)
  • ✅ One-off scripts and utilities
  • ✅ Single language, simple imports
  • ✅ Rapid prototyping (flexibility over consistency)
3.8x

Faster at 50 files

(61s vs 233s)
57%

Fewer tokens

(9K vs 21K)
10

Languages

Same spec, instant generation

The tipping point: Around 20 files, MCP starts outperforming direct generation. Below that, Claude Code's direct generation is faster.

How It Works

Simple architecture, powerful results

1. You
natural language
2. Claude
constructs spec
3. MCP Server
local
4. MetaEngine API
free
5. Generated code
disk
1You - natural language
2Claude - constructs spec
3MCP Server - local
4MetaEngine API - free
5Generated code - disk
Privacy
  • • Code specs sent to API for generation
  • Never saved or logged
  • • Generated code stays on your machine
  • • MCP server is MIT licensed
Pricing
  • • Free (no API key needed)
  • • No signup required
  • • Unlimited requests

Real-World Workflows

You need to be smart and create workflows that fit your needs. Here are proven patterns:

Cross-Language Test Parity

Real example: Adding Go support to MetaEngine required 200+ tests with same coverage as TypeScript.

Workflow:

  1. Claude analyzes TypeScript tests (identify patterns)
  2. Generate Go tests in 2-3 batches (entities, operations, edge cases)
  3. Result: Test parity in minutes vs days of manual copy-paste-fix
Multi-Entity CRUD System

Generate complete CRUD for 10 entities with services, repositories, DTOs, and validators.

Workflow:

  1. Define domain models (User, Order, Product, etc.)
  2. Generate 50 files: entities + services + repos + DTOs + validators
  3. Result: Complete system in ~60 seconds with perfect consistency
Polyglot Architecture

Same domain model across TypeScript frontend, Python API, Go services, and C# data layer.

Workflow:

  1. Design domain model once
  2. Generate in TypeScript, Python, Go, C# (4 languages × 3 seconds each)
  3. Result: Consistent types across entire stack
Pattern Multiplication

Analyze one well-designed service, generate same pattern for 20 entities.

Workflow:

  1. Claude reads existing UserService (understand pattern)
  2. Generate ProductService, OrderService, etc. with same structure
  3. Result: Consistent service layer across entire domain
Cross-Language Type Conversion

Convert existing C# DTOs, Java POJOs, or Python dataclasses to any target language.

Workflow:

  1. Point Claude at existing types (e.g., "read the C# models in /Models")
  2. Generate equivalent types in target language with one MCP call
  3. Result: Perfect TypeScript/Go/Python types with proper imports

The Pattern: Analyze → Batch Generate → Maintain Consistency

1. Analyze

Claude reads existing code to understand patterns and structure

2. Batch Generate

Generate 20-100 files in 2-3 batches following identified patterns

3. Stay Consistent

All files follow same structure with perfect imports and namespaces

Built With Itself

MetaEngine uses its own MCP server to build new language support

When adding support for a new language (like Scala), we define the type mappings and patterns as JSON specs, then use the MCP server to generate the implementation. Architecture first, code generation as an afterthought.

JSON Spec (Input)
{
  "language": "csharp",
  "outputPath": "./src/domain",
  "classes": [
    {
      "name": "User",
      "typeIdentifier": "user",
      "path": "entities",
      "properties": [
        { "name": "id", "primitiveType": "String" },
        { "name": "email", "primitiveType": "String" },
        { "name": "orders", "typeIdentifier": "order-array" }
      ]
    }
  ],
  "arrayTypes": [
    { "typeIdentifier": "order-array", "elementTypeIdentifier": "order" }
  ]
}
Generated Code (Output)
// src/domain/entities/User.cs

using System.Collections.Generic;

namespace Domain.Entities
{
    public class User
    {
        public string Id { get; set; }

        public string Email { get; set; }

        public List<Order> Orders { get; set; }
    }
}

You can reproduce this yourself - just install the MCP server and ask Claude to generate similar structures.

Same spec generates idiomatic code in all 10 languages.

Technical Capabilities

Type System
  • Primitive types (String, Number, Boolean, Date, Any)
  • Complex type expressions (unions, tuples, Records)
  • Generic classes with constraints
  • Inheritance (abstract classes, base classes)
  • Interface implementation (multiple interfaces)
  • Arrays and dictionaries (nested support)
Code Features
  • Custom code blocks with template refs
  • Decorators/annotations (framework-specific)
  • Constructor parameters (auto-create properties)
  • Custom imports (external libraries)
  • Property initialization (optional defaults)
  • Documentation comments (JSDoc, docstrings)
Workflow
  • Batch generation (related types together)
  • Direct file writing (no copy-paste)
  • Dry run mode (preview without writing)
  • Skip existing files (incremental development)
  • Spec files (reusable templates)
  • Automatic directory creation
Performance
  • Instant generation (no waiting)
  • Scales to 100 types per request
  • Perfect for large codebases
  • Minimal token usage (saves cost)
  • No AI context bloat
  • Direct file writing

Documentation

Comprehensive guides included with the package

AI Assistant Guide

Complete reference for AI assistants with patterns, examples, and troubleshooting

AI_ASSISTANT_GUIDE.md
Quick Start

Quick reference and cheat sheet for common patterns and configurations

QUICK_START.md
Examples

Real-world usage patterns for all supported languages and frameworks

EXAMPLES.md

Find documentation in node_modules/@metaengine/mcp-server/ after installation

Frequently Asked Questions

No. You talk to Claude in natural language. Claude constructs the JSON specs automatically based on the documentation provided through MCP resources. You never see the JSON unless you want to save it as a reusable template.

Claude Code is excellent at generating code directly - and it's faster for small tasks (1-15 files). MCP is a specialized tool for when you need structured generation at scale (20-100 files). Claude focuses on understanding your intent and designing architecture; MetaEngine handles the mechanical details like namespaces, imports, and consistent patterns. Think of it as separation of concerns: Claude as architect, MetaEngine as builder.

The type specifications (JSON describing what to generate) are sent to the MetaEngine API for generation, but are never saved or logged. Your existing code never leaves your machine. The MCP server is MIT licensed and runs locally.

MetaEngine is free with no API key required. The goal is to demonstrate what's possible with semantic type-driven code generation and improve AI-assisted development for everyone.

Yes! MetaEngine implements the Model Context Protocol standard, so it works with any MCP-compatible AI assistant. Currently that includes Claude Desktop and Claude Code, with more tools adding MCP support regularly.

Currently: TypeScript, Python, Go, C#, Java, Kotlin, Groovy, Scala, Swift, and PHP. Each language gets idiomatic code (case classes in Scala, data classes in Python, structs in Swift, etc.).

For small tasks (1-15 files), Claude Code's direct generation is faster. Also skip MCP for: exploratory coding where structure is evolving, one-off scripts, rapid prototyping where you need flexibility over consistency. Claude will typically generate directly in these cases - and that's the right choice!

Claude automatically chooses based on your task. Generating a few files? Direct generation is faster. Need 30 files with consistent patterns? Claude will use the MCP tool. You can also explicitly request: "use MCP for this" or "generate these directly without MCP" if you have a preference.

Yes. MetaEngine implements the standard Model Context Protocol and works with both Claude Desktop and Claude Code. Installation is identical for both: add the MCP server configuration to your mcp.json file. The same npx command works across all platforms.

The package is @metaengine/mcp-server on NPM. You don't need to install it manually—use npx -y @metaengine/mcp-server in your MCP configuration, which runs the latest version automatically without local installation.

Yes. MetaEngine implements the open Model Context Protocol standard, so it works with any MCP-compatible AI assistant. While primarily used with Claude Code and Claude Desktop, any tool that supports MCP can use MetaEngine for code generation.

Ready to Give Claude This Tool?

Install MetaEngine MCP Server and let Claude use it when working on large-scale structured code

Free • MIT Licensed • A specialized tool for AI assistants