Logo MCP Generator 3.1

MCP Generator 3.1

Cộng đồng
quotentiroler

Generate FastMCP 4.x Servers from OpenAPI Specs

Nhà phát hànhquotentiroler
Kho mãmcp-generator-4.x
Ngôn ngữPython
Bản fork
5
Sao
24
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépApache-2.0
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    MCP Generator 3.1 cung cấp các chức năng MCP cho các ứng dụng khách AI và tác nhân AI tương thích.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Mẫu cấu hình có thể sao chép ngay

    Dùng các đoạn cấu hình mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Mức độ quan tâm của cộng đồng đến kho mã

    24 sao và 5 bản fork từ kho mã được liên kết.

MCP Generator 4.x

🚀 OpenAPI to FastMCP 4 Server Generator

PyPI GitHub Release License: Apache 2.0 Python 3.11+ FastMCP 4 Docs

Transform any OpenAPI specification into a production-ready Model Context Protocol (MCP) server with enterprise-grade authentication, modular architecture, and comprehensive middleware support.


🎯 Overview

MCP Generator 4.x is an advanced code generator that automatically creates FastMCP 4 servers from OpenAPI 3.0.x/3.1.x specifications. It bridges REST APIs and AI agents by generating fully-functional MCP tools that AI assistants like Claude, ChatGPT, and others can use to interact with your APIs.

Supported OpenAPI Versions

  • ✅ OpenAPI 3.0.x - Fully supported (recommended)
  • ✅ OpenAPI 3.1.x - Fully supported
  • ✅ Swagger 2.0 - Fully supported

Note: Both JSON and YAML formats are supported. The generator includes a pure Python OpenAPI client generator — no Java or Node.js required.

🏆 Why MCP Generator 4.x?

FeatureMCP Generator 4.xTypical Generators
ArchitectureModular, composable sub-serversMonolithic single file
AuthenticationJWT validation with JWKS, OAuth2 flowsBasic token passing
Middleware SystemFull FastMCP 4 middleware stackLimited or none
ScalabilityOne module per API classAll operations in one file
Type SafetyFull Pydantic model supportBasic validation
TestingAuto-generated test suitesManual testing only
ObservabilityTiming, logging, error handling middlewareBasic logging
Tag DiscoveryAuto-discovers undeclared API tagsManual tag mapping
Event StoreResumable SSE with event persistenceSimple SSE
MCP AppsInteractive UI display tools (tables, charts, forms)None
Production Ready✅ Yes⚠️ Often prototypes

Competitive Comparison

How MCP Generator 4.x stacks up against every other OpenAPI-to-MCP project on GitHub (updated April 2026):

FeatureMCP Generator 4.x (Py, 18★)openapi-mcp-server (TS, 887★)mcp-link (Go, 602★)openapi-mcp-generator (TS, 566★)openapi-mcp (Go, 183★)openapi-mcp-codegen (Py, 35★)
ApproachCode generationRuntime search/proxyRuntime proxyCode generationRuntime proxy (Docker)Code generation
OpenAPI 3.0✅✅✅✅✅✅
OpenAPI 3.1✅✅✅✅✅✅
Swagger 2.0✅❌❌❌✅❌
Modular sub-servers✅❌❌❌❌❌
FastMCP 4 native✅❌N/A❌N/A❌
Streamable HTTP✅❌❌✅❌❌
JWT / JWKS auth✅❌❌❌❌❌
OAuth2 flows✅❌header injectionenv vars only❌header injection
Middleware stack✅ (timing, logging, cache, auth)❌❌❌❌❌
MCP Resources✅ (GET endpoints)❌❌❌❌❌
Event Store✅ (resumable)❌❌❌❌❌
Auto-generated tests✅❌❌❌❌✅ (eval suite)
MCP Apps (UI)✅ (tables, charts, forms)❌❌❌❌❌
A2A agent generation✅ (lightweight a2a-sdk)❌❌❌❌✅ (LangGraph)
LLM-enhanced docs✅ (OpenAPI Overlay 1.0)❌❌❌❌✅ (OpenAPI Overlay)
Docker output✅❌❌❌✅ (primary)✅
Tag auto-discovery✅❌❌❌❌❌
Server registry✅❌❌❌❌❌
Endpoint filteringtag-based❌path filtersx-mcp extensiontag/op filters❌
Schema validationPydantic❌❌Zod❌❌
Actively maintained✅ (Apr 2026)⚠️ (Feb 2026)❌ (Apr 2025)✅ (Mar 2026)⚠️ (Mar 2026)❌ (Nov 2025)

Note: mcpo (4,027★) solves the inverse problem — exposing MCP servers as OpenAPI endpoints — and is complementary rather than competitive.


✨ FastMCP 4 Features

MCP Generator 4.x leverages the FastMCP 4 capabilities:

FeatureDescription
Tool TagsAutomatic per-module tag grouping (@mcp.tool(tags=["pet"]))
Tool TimeoutsConfigurable per-tool timeout (default 30s)
SearchToolsBM25 text search over tool catalog (opt-in via fastmcp.json)
CodeModeExperimental meta-tool transform (opt-in via fastmcp.json)
ResponseLimitingMiddlewareUTF-8-safe truncation of oversized responses (1MB default)
PingMiddlewareHTTP keepalive for long-lived connections
MultiAuthCompose multiple token verifiers (JWT + OAuth2, etc.)
Component VersioningDeprecated OpenAPI endpoints annotated automatically
Dynamic VisibilityPer-session component toggling via scopes
OpenTelemetryTracing with MCP semantic conventions (Console/OTLP export)
validate_outputFastMCP output validation support

Target version

Generated servers target FastMCP 4 by default, which serves the sessionless 2026-07-28 protocol alongside handshake-era clients. Pass --fastmcp-target 3 to emit for the FastMCP 3 line, which upstream maintains for MCP SDK v1 users.

Three things differ in the emitted server:

ConcernTarget 4 (default)Target 3
Missing required parametersTool returns what it needs — elicitation cannot reach a client that negotiates the modern protocolctx.elicit() asks the client
API error recoveryError is raised on its own — server-side sampling is removed in 4.xctx.sample() asks the caller's model for a hint
HTTP clienthttpx2 — FastMCP 4 replaced httpx across its stackhttpx

Target 4 also floors pydantic at >=2.12, the MCP SDK v2 requirement: below it, installation fails resolution outright rather than upgrading.

All features are configurable via the generated fastmcp.json:

json
{
  "features": {
    "search_tools": { "enabled": false },
    "code_mode": { "enabled": false },
    "response_limiting": { "enabled": true, "max_size_bytes": 1048576 },
    "ping_middleware": { "enabled": true },
    "opentelemetry": { "enabled": false, "service_name": "my-api-mcp" }
  }
}

📦 Installation

Prerequisites

  • Python 3.11+: Required for modern type hints and features
  • OpenAPI Specification: Your API's OpenAPI 3.0.x or 3.1.x spec file (JSON or YAML)

Install from PyPI (Recommended)

bash
pip install mcp-generator

# Or with uv
uv pip install mcp-generator

# Verify installation
generate-mcp --help

Install from Source

bash
git clone https://github.com/quotentiroler/mcp-generator-4.x.git
cd mcp-generator-4.x
uv sync   # or: pip install -e .

# Verify installation
generate-mcp --help

🚀 Quick Start

1. Generate MCP Server from OpenAPI Spec

bash
# Using local file (default: ./openapi.json)
generate-mcp

# Using custom file
generate-mcp --file ./my-api-spec.yaml

# Download from URL
generate-mcp --url https://petstore3.swagger.io/api/v3/openapi.json

What happens:

  • ✅ Generates Python API client from OpenAPI spec
  • ✅ Auto-discovers undeclared tags from API paths (tag auto-discovery)
  • ✅ Creates modular MCP server modules
  • ✅ Generates authentication middleware
  • ✅ Creates OAuth2 provider
  • ✅ Writes package files and tests
  • ✅ Outputs to generated_mcp/ directory

Optional Features (Disabled by Default)

By default, the generator creates a minimal, production-ready server. Enable additional features as needed:

bash
# Enable persistent storage (for OAuth tokens, session state)
generate-mcp --enable-storage

# Enable response caching (reduces backend API calls)
generate-mcp --enable-storage --enable-caching

# Enable MCP resources (expose API data as resources)
generate-mcp --enable-resources

# Enable MCP Apps (interactive UI: tables, charts, forms, detail views)
generate-mcp --enable-apps

# Enable MCP Apps with API-specific display tools from response schemas
generate-mcp --enable-apps --generate-ui

# Enable all features
generate-mcp --enable-storage --enable-caching --enable-resources --enable-apps --generate-ui

# Apply an OpenAPI Overlay to enhance descriptions before generation
generate-mcp --overlay my-overlay.yaml

# Auto-generate an overlay from the spec (no manual file needed)
generate-mcp --auto-overlay

# Generate an A2A agent card and adapter alongside the MCP server
generate-mcp --enable-a2a

Available Features:

FlagDescriptionWhen to Use
--enable-storagePersistent storage backendOAuth refresh tokens, session data, user preferences
--enable-cachingResponse caching with TTLRate-limited APIs, expensive operations, slow endpoints
--enable-resourcesMCP resource templatesExpose API data for context/retrieval (GET endpoints)
--enable-appsMCP Apps with interactive UI display toolsRich tables, charts, forms, and detail views in MCP clients
--generate-uiAPI-specific display tools from response schemasAuto-generated UI per endpoint (requires --enable-apps)
--enable-a2aA2A agent card + adapterExpose your MCP server as an A2A-compatible agent
--overlay PATHApply an OpenAPI Overlay fileEnhance descriptions, add examples before generation
--fastmcp-target <3|4>FastMCP major the generated server targets (default: 4)Pin generated servers to the FastMCP 3 line instead
--auto-overlayAuto-generate an overlay from the specQuick enrichment without writing an overlay by hand

Note: --enable-caching requires --enable-storage as it uses the storage backend for cache persistence.

Why disabled by default?

  • Keeps generated code simple and focused
  • Fewer dependencies to manage
  • Easier to understand and customize
  • Most APIs work perfectly without these features

The generator will show which features are available at the end of generation with a copy-paste command to re-generate with features enabled.

💡 Tip: Run generate-mcp --help to see all available options and examples.

2. Register Your MCP Server

bash
# Register the generated server
register-mcp ./generated_mcp

# Verify registration
run-mcp --list

This adds your server to the local registry at ~/.mcp-generator/servers.json so you can easily run it by name.

3. Run Your MCP Server

bash
# Option 1: Run via registry (STDIO mode for local AI clients)
export API_TOKEN="your-api-token-here"  # On Windows: set API_TOKEN=...
run-mcp swagger_petstore_openapi

# Option 2: Run via registry (HTTP mode)
run-mcp swagger_petstore_openapi --mode http --port 8000

# Option 3: Run directly with Python
cd generated_mcp
python swagger_petstore_openapi_mcp_generated.py --transport stdio

# Option 4: Run with FastMCP CLI
cd generated_mcp
# Note: Use :create_server to properly compose the server
fastmcp run swagger_petstore_openapi_mcp_generated.py:create_server
# Or with fastmcp.json config:
fastmcp run fastmcp.json

4. Use with AI Clients

Claude Desktop (STDIO Mode)

Add to ~/.claude/claude_desktop_config.json:

json
{
  "mcpServers": {
    "my-api": {
      "command": "python",
      "args": ["/path/to/generated_mcp/swagger_petstore_openapi_mcp_generated.py"],
      "env": {
        "API_TOKEN": "your-api-token-here"
      }
    }
  }
}

🔍 Testing with MCP Inspector

The MCP Inspector is the official debugging tool for MCP servers. It provides both a visual UI and CLI mode for testing your generated servers.

Quick Start with Inspector

bash
# Generate your MCP server first
generate-mcp --file ./openapi.json

# Test with Inspector using FastMCP (recommended)
cd generated_mcp
fastmcp dev swagger_petstore_openapi_mcp_generated.py:create_server

# Or test directly with Python
npx @modelcontextprotocol/inspector python swagger_petstore_openapi_mcp_generated.py

# Or use environment variables
npx @modelcontextprotocol/inspector -e API_TOKEN=your-token python swagger_petstore_openapi_mcp_generated.py

Note: When using fastmcp dev or fastmcp run, always include :create_server to properly compose the modular server architecture.

The Inspector will:

  • 🚀 Start your MCP server
  • 🌐 Open a browser UI at http://localhost:6274
  • 🔗 Connect via proxy at http://localhost:6277
  • 🔑 Generate a secure session token

Inspector Features for Your Generated Servers

🛠️ Tool Testing

  • List all available tools generated from your OpenAPI spec
  • Interactive form-based parameter input
  • Real-time response visualization with JSON formatting
  • Test OAuth2 authentication flows

📦 Resource Exploration

  • Browse API resources hierarchically
  • View resource metadata and content
  • Test resource subscriptions

💬 Prompt Testing

  • Interactive prompt sampling
  • Streaming response visualization
  • Compare multiple prompt variations

📊 Debugging

  • Request/response history
  • Visualized error messages
  • Real-time server notifications
  • Network timing information

CLI Mode for Automation

Perfect for CI/CD and rapid development cycles:

bash
# List available tools
npx @modelcontextprotocol/inspector --cli python swagger_petstore_openapi_mcp_generated.py --method tools/list

# Call a specific tool
npx @modelcontextprotocol/inspector --cli python swagger_petstore_openapi_mcp_generated.py \
  --method tools/call \
  --tool-name create_pet \
  --tool-arg 'name=Fluffy' \
  --tool-arg 'status=available'

# Test with environment variables
npx @modelcontextprotocol/inspector --cli \
  -e API_TOKEN=your-token \
  python swagger_petstore_openapi_mcp_generated.py \
  --method tools/list

Testing HTTP/SSE Transports

If your generated server runs in HTTP mode:

bash
# Start your server in HTTP mode
cd generated_mcp
python swagger_petstore_openapi_mcp_generated.py --transport http --port 8000

# Connect Inspector to running server (SSE transport)
npx @modelcontextprotocol/inspector http://localhost:8000/sse

# Or use Streamable HTTP transport
npx @modelcontextprotocol/inspector http://localhost:8000/mcp --transport http

Export Configuration

The Inspector can export your server configuration for use in Claude Desktop or other MCP clients:

  1. Server Entry Button - Copies a single server config to clipboard
  2. Servers File Button - Copies complete mcp.json structure

Example exported config:

json
{
  "mcpServers": {
    "my-api": {
      "command": "python",
      "args": ["swagger_petstore_openapi_mcp_generated.py"],
      "env": {
        "API_TOKEN": "your-token"
      }
    }
  }
}

Development Workflow

Integrate Inspector into your development cycle:

bash
# 1. Generate server from OpenAPI spec
generate-mcp --file ./openapi.yaml

# 2. Test with Inspector UI (interactive development)
cd generated_mcp
npx @modelcontextprotocol/inspector -e API_TOKEN=test python *_mcp_generated.py

# 3. Automated testing (CI/CD)
npx @modelcontextprotocol/inspector --cli \
  -e API_TOKEN=test \
  python *_mcp_generated.py \
  --method tools/list > tools.json

# 4. Test specific tools
npx @modelcontextprotocol/inspector --cli \
  -e API_TOKEN=test \
  python *_mcp_generated.py \
  --method tools/call \
  --tool-name get_user \
  --tool-arg 'user_id=123'

Tips for Testing Generated Servers

  • JWT Validation: Use Inspector to test JWT authentication flows with --validate-tokens
  • OAuth2 Flows: Inspector supports bearer token auth for testing OAuth2
  • Scope Testing: Verify scope enforcement in your OAuth2 configuration
  • Error Handling: Inspector visualizes error responses and stack traces
  • Performance: Use Inspector's timing metrics to identify slow operations

For more details, see the Inspector documentation.


🎨 MCP Apps — Interactive UI Display Tools

MCP Apps bring rich, interactive UI to MCP tool responses. Instead of returning raw JSON, your tools render as tables, charts, forms, and detail views in supported MCP clients.

How It Works

  1. --enable-apps adds curated, API-agnostic display tools (show_table, show_detail, show_chart, show_form, show_comparison) that the LLM fills with data from any API response
  2. --generate-ui additionally introspects your OpenAPI response schemas and generates per-endpoint display tools (e.g., show_pet_table, show_pet_detail) with columns, badges, and data types pre-configured
bash
# Curated display tools only (works with any API)
generate-mcp --enable-apps

# + API-specific display tools auto-generated from response schemas
generate-mcp --enable-apps --generate-ui

Display Tool Types

ToolDescriptionUse Case
show_tableInteractive data table with sortable columnsList endpoints, search results
show_detailCard layout with key-value fields and badgesSingle-record views (user profile, order details)
show_chartLine, bar, area, and pie chartsAnalytics, metrics, time-series data
show_formInput form with validationCreate/update operations
show_comparisonSide-by-side comparison cardsComparing records or options

Requirements

MCP Apps requires prefab-ui (the FastMCP Apps rendering library):

bash
pip install "fastmcp[apps]"

If prefab-ui is not installed, display tools gracefully fall back to returning structured JSON — no runtime errors.


🧰 CLI reference

This project installs three CLI commands. Here's a quick cheatsheet.

generate-mcp

  • Description: Generate a FastMCP 4 server from an OpenAPI 3.0.x/3.1.x spec.
  • Options:
    • --file Path to spec file (default: ./openapi.json)
    • --url Download spec from URL (overrides --file)
    • --fastmcp-target <3|4> FastMCP major to target (default: 4)
  • Examples:
bash
# Use local file (default)
generate-mcp

# Custom file
generate-mcp --file ./my-api.yaml

# From URL
generate-mcp --url https://petstore3.swagger.io/api/v3/openapi.json

register-mcp

  • Description: Manage the local registry at ~/.mcp-generator/servers.json
  • Subcommands:
    • add Register a generated server (default when passing a path)
    • list Show all registered servers
      • --json Output as JSON for scripting/automation
    • remove Unregister a server by name
    • export Export server metadata as server.json for MCP Registry publishing
      • -o, --output Write to file (default: stdout)
  • Examples:
bash
# Add (explicit)
register-mcp add ./generated_mcp

# Add (implicit)
register-mcp ./generated_mcp

# List registered servers
register-mcp list

# List as JSON
register-mcp list --json

# Remove by name
register-mcp remove swagger_petstore_openapi

# Export server metadata for publishing
register-mcp export swagger_petstore_openapi -o server.json

run-mcp

  • Description: Run a registered server by name.
  • Flags:
    • --list List registered servers and exit
    • --mode/--transport stdio | http (default: stdio)
    • --host HTTP host (default: 0.0.0.0)
    • --port HTTP port (default: 8000)
    • --validate-tokens Enable JWT validation (HTTP mode)
  • Examples:
bash
# List servers
run-mcp --list

# Run via STDIO (Linux/macOS)
export API_TOKEN="your-api-token" && run-mcp swagger_petstore_openapi

# Run via STDIO (Windows PowerShell)
powershell
$env:API_TOKEN = "your-api-token"
run-mcp swagger_petstore_openapi

# Run via HTTP
run-mcp swagger_petstore_openapi --mode http --port 8000

# HTTP with JWT validation
run-mcp swagger_petstore_openapi --mode http --port 8000 --validate-tokens

Notes:

  • The registry file lives at ~/.mcp-generator/servers.json
  • run-mcp forwards these flags to the generated server’s entry point.
  • You can also run the generated script directly: python _mcp_generated.py

Internal registry (local)

Use register-mcp to quickly create a local internal registry of MCP servers you generate. Entries live in ~/.mcp-generator/servers.json; add/list/remove in seconds, and run-mcp lets you start servers by name. You can run multiple servers side‑by‑side (e.g., different HTTP ports) for a smooth developer workflow.

Publish to a self-hosted MCP Registry

You can run your own MCP Registry (open source) and publish your generated servers to it:

  • Deploy the official Registry service on your infra (Docker Compose/Kubernetes). Configure TLS, database (PostgreSQL), and a public base URL.
  • Configure authentication/ownership verification: either set up GitHub OAuth/OIDC in the Registry, or use DNS/HTTP challenges to prove domain ownership for your namespace.
  • Make your MCP server reachable over HTTP and provide valid server metadata (server.json) per the Registry schema.
  • Use the publisher CLI to point at your Registry’s base URL, authenticate, and publish your server. After validation, it becomes discoverable via your Registry’s API/UI.

Note: This project does not (yet) auto-publish. The local per-user registry (~/.mcp-generator/servers.json) is for development convenience; publishing to a central catalog is an optional, separate step.

OAuth2 Support

Automatically generates OAuth2 provider when OpenAPI spec contains OAuth2 security schemes.

Supported Flows:

  • Implicit flow
  • Authorization code flow
  • Client credentials flow
  • Password flow

Features:

  • Scope extraction and validation
  • Token introspection
  • JWKS-based JWT verification
  • Scope enforcement middleware

JWT Validation

When --validate-tokens is enabled:

  1. Token Extraction: Extracts JWT from Authorization header
  2. JWKS Discovery: Auto-discovers JWKS endpoint from OpenAPI spec or uses standard well-known path
  3. Signature Verification: Validates JWT signature using public key
  4. Claims Validation: Checks expiration, issuer, audience
  5. Scope Enforcement: Verifies required scopes for operations
  6. Identity Injection: Makes user identity available to tools

Configuration:

The JWKS URI, issuer, and audience are automatically extracted from your OpenAPI specification's security schemes during generation. If not specified in the OpenAPI spec, sensible defaults are used:

  • JWKS URI: {backend_url}/.well-known/jwks.json
  • Issuer: {backend_url}
  • Audience: backend-api

Simply enable JWT validation when running:

bash
python server_generated.py --transport http --validate-tokens

Or set as default in fastmcp.json:

json
{
  "middleware": {
    "config": {
      "authentication": {
        "validate_tokens": true
      }
    }
  }
}

Note: All JWT configuration is baked into the generated code - no environment variables needed!


⚙️ Configuration

Tool Name Customization

Edit mcp_generator/config.py:

python
# Abbreviations for long names
TOOL_NAME_ABBREVIATIONS = {
    'healthcare': 'hc',
    'organization': 'org',
}

# Complete overrides
TOOL_NAME_OVERRIDES = {
    'list_healthcare_users_by_role': 'list_users_by_role',
    'create_smart_app_registration': 'register_smart_app',
}

# Maximum tool name length (MCP/OpenAI limit)
MAX_TOOL_NAME_LENGTH = 64

Code Quality

bash
# Format code
uv run ruff format .

# Lint code
uv run ruff check .

# Type checking
uv run mypy mcp_generator/

Project Commands

bash
# Generate MCP server from example
generate-mcp --file openapi.yaml

# Validate OpenAPI spec
python mcp_generator/scripts/validate_openapi.py

# Generate JWT keypair for testing
python mcp_generator/scripts/generate_jwt_keypair.py

📚 Examples

Example 1: Swagger Petstore

bash
# Generate from Petstore API
generate-mcp --url https://petstore3.swagger.io/api/v3/openapi.json

# Run the server
cd generated_mcp
python swagger_petstore_openapi_mcp_generated.py

Example 2: GitHub API

bash
# Download GitHub OpenAPI spec
generate-mcp --url https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json

# Outputs: 300+ tools for GitHub API operations

🤝 Contributing

Contributions are welcome! Here's how to contribute:

Reporting Bugs

  1. Check existing issues: https://github.com/quotentiroler/mcp-generator-4.x/issues
  2. Create detailed bug report with:
    • OpenAPI spec (sanitized/minimal example)
    • Full error message and stack trace
    • Steps to reproduce
    • Expected vs actual behavior

Suggesting Features

  1. Open a feature request issue
  2. Describe the use case and benefit
  3. Provide examples if applicable

Submitting Pull Requests

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: uv run pytest
  5. Format code: uv run ruff format .
  6. Commit: git commit -m 'Add amazing feature'
  7. Push: git push origin feature/amazing-feature
  8. Open a Pull Request

Development Guidelines

  • Follow existing code style (Ruff formatting)
  • Add tests for new features
  • Update documentation as needed
  • Keep commits focused and descriptive

📄 License

This project is licensed under the Apache License 2.0.

What This Means:

✅ You can:

  • Use this software for any purpose (commercial or non-commercial)
  • Modify the source code
  • Distribute the software
  • Include it in proprietary software
  • Use it in SaaS applications
  • Patent protection is granted

⚠️ You must:

  • Include the original license and copyright notice
  • State significant changes made to the code
  • Include a copy of the Apache 2.0 license in your distribution

❌ You cannot:

  • Use the project's trademarks without permission
  • Hold the authors liable

Why Apache 2.0?

Apache 2.0 is a permissive license that promotes wide adoption while providing patent protection. It's business-friendly, widely accepted by enterprises, and commonly used for development tools and code generators. This license allows you to use MCP Generator 4.x in your projects without worrying about copyleft requirements.

Generated Code: The code generated by this tool is NOT considered a derivative work of the generator itself. You may license your generated MCP servers however you choose.

For the full license text, see LICENSE or visit https://www.apache.org/licenses/LICENSE-2.0


🙏 Acknowledgments

  • FastMCP: Built on the excellent FastMCP framework
  • OpenAPI Generator: Uses OpenAPI Generator for client generation
  • Model Context Protocol: Implements the MCP specification
  • Anthropic: For the MCP standard and Claude Desktop integration

If you find this project useful, please consider giving it a star! ⭐

It helps others discover the tool and motivates continued development.

Made with ❤️

Report Bug · Request Feature · Documentation

Cài đặt

TypingMind
Yêu cầu:

Node.js 18+

{
  "mcpServers": {
    "quotentiroler-mcp-generator-3-x": {
      "command": "",
      "args": []
    }
  }
}

Dùng MCP MCP Generator 3.1 với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối MCP Generator 3.1, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Thiết lập trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Thiết lập trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh thiết lập trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Để tiến trình tiếp tục chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Để tiến trình tiếp tục chạy trong cửa sổ Terminal khi bạn dùng các công cụ MCP.
3

Thêm MCP Generator 3.1 làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của MCP Generator 3.1.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "quotentiroler-mcp-generator-3-x": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-generator"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của MCP Generator 3.1, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của MCP Generator 3.1.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện trên TypingMind dùng các công cụ MCP đã bật với mô hình AI đã chọn
Bạn có thể dùng MCP Generator 3.1 giúp tôi làm việc này không?
MCP Generator 3.1
Được. Tôi đọc rồi.
Đây là kết quả tôi tìm được bằng MCP Generator 3.1.

Câu hỏi thường gặp

Máy chủ MCP MCP Generator 3.1 dùng để làm gì?

MCP Generator 3.1 là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP MCP Generator 3.1 với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng MCP Generator 3.1 với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP MCP Generator 3.1 với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối MCP Generator 3.1, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP MCP Generator 3.1 với TypingMind?

MCP Generator 3.1 hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP MCP Generator 3.1 cung cấp những công cụ nào trong TypingMind?

MCP Generator 3.1 cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP MCP Generator 3.1 không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu MCP Generator 3.1 yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇