Logo Gen MCP

Gen MCP

Tổ chức
genmcp

⚠️ Early Preview: This is a research project in active development. APIs and features may change.

Nhà phát hànhgenmcp
Kho mãgen-mcp
Ngôn ngữGo
Bản fork
19
Sao
46
Công cụ có sẵn
0
Phương thức truyền tảistdio
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

    Gen MCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 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.

  • Cấu hình sẵn để sao chép

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

  • Chỉ số quan tâm đến mã nguồn mở

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

gen-mcp: Zero-Code MCP Server Generation

Transform any API into an MCP server in seconds, not hours

Go Version License MCP Compatible

⚠️ Early Preview: This is a research project in active development. APIs and features may change.

gen-mcp eliminates the complexity of building Model Context Protocol (MCP) servers. Instead of writing boilerplate code and learning protocol internals, simply describe your tools in a configuration file—gen-mcp handles the rest.

Perfect for:

  • 🔌 API Developers - Expose existing REST APIs to AI assistants instantly
  • 🤖 AI Engineers - Connect LLMs to external tools without custom server code
  • 🛠️ DevOps Teams - Integrate legacy systems with modern AI workflows

gen-mcp System Diagram

✨ Key Features

  • 🚀 Zero-Code Server Generation - Create MCP servers from simple YAML configs
  • 📡 OpenAPI Auto-Conversion - Transform existing OpenAPI specs into MCP servers instantly
  • 🔄 Real-Time Tool Exposure - HTTP endpoints become callable AI tools automatically
  • 🛡️ Built-in Validation - Schema validation and type safety out of the box
  • 🔐 Security Out of the Box - TLS encryption and OAuth/OIDC authentication built-in
  • ⚡ Background Processing - Detached server mode with process management
  • 🔧 Flexible Configuration - Fine-tune which endpoints to expose and how they behave

🚀 Quick Start

1. Install gen-mcp

Option A: Download Pre-built Binary

bash
# Download from GitHub releases
# Visit: https://github.com/genmcp/gen-mcp/releases
# Or using curl (replace with latest version and platform):
curl -L https://github.com/genmcp/gen-mcp/releases/latest/download/genmcp-linux-amd64.zip -o genmcp-linux-amd64.zip
unzip genmcp-linux-amd64.zip
chmod +x genmcp-linux-amd64
sudo mv genmcp-linux-amd64 /usr/local/bin/genmcp

Verify the signed binary

You can cryptographically verify that the downloaded binaries (.zip files) are authentic and have not been tampered with. This process uses cosign to check the signature and certificate, which were generated securely during our automated build process.

Step 1: Install Cosign

You'll need the cosign command-line tool. Please see the Official Cosign Installation Guide.

Step 2: Verify the Binary
  1. From the release page, download the signed bundle for your platform:

    • The bundle file (e.g., genmcp-linux-amd64.zip.bundle)
  2. Run the cosign verify-blob-attestation command in your terminal.

    Example (for the Linux amd64 CLI):

    bash
      cosign verify-blob-attestation \
         --bundle genmcp-linux-amd64.zip.bundle \
         --certificate-identity-regexp "https://github.com/genmcp/gen-mcp/.*" \
         --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
         --new-bundle-format \
         genmcp-linux-amd64.zip

3.  If the signature is valid, `cosign` will contact the public Sigstore transparency log and print:
 ```
 Verified OK
 ```

**Option B: Build from Source**
```bash
# Clone and build
git clone https://github.com/genmcp/gen-mcp.git
cd gen-mcp

# Build CLI
make build-cli

# Add to PATH (recommended)
sudo mv genmcp /usr/local/bin

2. Choose Your Own Adventure

Option A: Convert Existing API

bash
genmcp convert https://api.example.com/openapi.json
genmcp run

Option B: Create Custom Tools

bash
# Create mcpfile.yaml with your tools (see documentation)
genmcp run

3. See It In Action

📖 Documentation

💻 Usage

Core Commands

CommandDescriptionExample
runStart MCP servergenmcp run -f myapi.yaml
stopStop running servergenmcp stop
convertOpenAPI → MCP conversiongenmcp convert api-spec.json
buildBuild container image from mcpfilegenmcp build -f myapi.yaml --tag myapi:latest
versionDisplay version informationgenmcp version

Starting Your Server

bash
# Run in foreground (development)
genmcp run -f /path/to/mcpfile.yaml

# Run in background
genmcp run -d

# Auto-detect mcpfile.yaml in current directory
genmcp run

Converting Existing APIs

bash
# From local OpenAPI file
genmcp convert ./api-spec.json

# From remote OpenAPI URL
genmcp convert https://api.example.com/openapi.json -o custom-name.yaml

# Petstore example
genmcp convert https://petstore.swagger.io/v2/swagger.json

Building Container Images

The build command packages your MCP server and mcpfile into a container image. By default, it builds multi-architecture images for broader platform support.

Binary Downloads: The build process automatically downloads the required server binaries from GitHub releases and caches them locally for reuse. Downloaded binaries are cryptographically verified using Sigstore to ensure authenticity and integrity.

Version Matching:

  • Release builds: Download server binaries matching the CLI version (e.g., v0.1.0 downloads v0.1.0 server)
  • Development builds: Automatically use latest release server binaries
  • Custom version: Use --server-version flag to specify a specific server version

Requirements:

  • Network access to download binaries from GitHub releases and query GitHub API
  • No external dependencies required (verification is built into the CLI)

Offline Support:

  • If download fails, automatically uses the latest cached version for that platform
  • Warns when using cached fallback version
  • Works completely offline once binaries are cached

Cache Management:

  • Automatically keeps the last 3 versions per platform
  • Older versions are cleaned up when downloading new binaries
  • Manual cleanup: remove ~/.cache/genmcp/binaries/ (Linux), ~/Library/Caches/.genmcp/binaries/ (macOS), or %LOCALAPPDATA%\.genmcp\binaries\ (Windows)

Multi-Architecture Build (Default)

When no --platform is specified, builds for both linux/amd64 and linux/arm64:

bash
# Build and push multi-arch image to registry
genmcp build --tag registry.example.com/myapp:v1.0.0 --push

# Build multi-arch locally
genmcp build --tag myapp:latest  # Creates: myapp:latest-linux-amd64, myapp:latest-linux-arm64

Single-Platform Build

For faster iteration during development, specify a single platform:

bash
# Build for specific platform
genmcp build --tag myapp:dev --platform linux/amd64

# Build for ARM64
genmcp build --tag myapp:latest --platform linux/arm64

Additional Options

bash
# Custom base image
genmcp build --tag myapp:latest \
  --base-image registry.access.redhat.com/ubi9/ubi-minimal:latest

# Specify mcpfile location
genmcp build --tag myapp:latest -f path/to/mcpfile.yaml

# Use specific server version
genmcp build --tag myapp:latest --server-version v0.1.0

# Full example with all options
genmcp build \
  --tag myregistry.io/myapp:v1.0.0 \
  --file ./custom-mcpfile.yaml \
  --platform linux/amd64 \
  --server-version v0.1.1 \
  --push

Binary Cache Location: Downloaded binaries are cached in your user cache directory and reused across builds:

  • Linux: ~/.cache/genmcp/binaries/
  • macOS: ~/Library/Caches/.genmcp/binaries/
  • Windows: %LOCALAPPDATA%\.genmcp\binaries\

The cache stores version-platform pairs and validates checksums on each use.

Note: When building multi-arch locally, Docker daemon doesn't support manifest lists, so each platform is saved with a platform-specific tag (e.g., myapp:latest-linux-amd64). Additionally, the original tag (myapp:latest) is saved with your host platform's image if available, otherwise the first built platform. When pushing to a registry with --push, a proper multi-arch manifest list is created.

Converting CLI (Experimental)

Instead of manually writing an MCP file for a CLI, you can use an LLM to generate a genmcp-compatible mcpfile.yaml.

bash
# Set OpenAI endpoint configurations
export MODEL_BASE_URL='https://HOST:PORT/v1' # OpenAI Base URL (v1 endpoint)
export MODEL_KEY='' # OpenAI Access Token
export MODEL_NAME=''  # OpenAI Model Name

# Run gen-mcp convert-cli to generate mcpfile.yaml
MODEL_BASE_URL=$MODEL_BASE_URL MODEL_KEY=$MODEL_KEY MODEL_NAME=$MODEL_NAME genmcp convert-cli "podman images"

# Start mcpserver with generated mcpfile.yaml 
genmcp run

Managing Running Servers

bash
# Stop server (uses mcpfile.yaml to find process)
genmcp stop

# Stop specific server
genmcp stop -f /path/to/mcpfile.yaml

💡 Authoring GenMCP config files with auto complete

To improve the development experience and prevent configuration errors, this project includes JSON schemas for both GenMCP config file formats. These schemas enable validation, autocompletion, and inline documentation in compatible code editors like Visual Studio Code, helping you write valid configuration files faster.

To make use of the schemas, add a yaml-language-server comment at the top of your files:

MCP File:

yaml
# yaml-language-server: $schema=https://raw.githubusercontent.com/genmcp/gen-mcp/refs/heads/main/specs/mcpfile-schema.json
kind: MCPToolDefinitions
schemaVersion: "0.2.0"
name: ...

Server Config File:

yaml
# yaml-language-server: $schema=https://raw.githubusercontent.com/genmcp/gen-mcp/refs/heads/main/specs/mcpserver-schema.json
kind: MCPServerConfig
schemaVersion: "0.2.0"
runtime: ...

Intellij IDEs support JSON schema validation natively.

VS Code requires the installation of the YAML extension by Red Hat.

Schema Autocomplete Screenshot

📚 Examples & Tutorials

🤖 Ollama Integration

📹 Watch Demo | View Code

Connect local language models to MCP Clients with gen-mcp in two ways: by wrapping the Ollama CLI, and by wrapping the Ollama http endpoints.

Features:

  • ✅ HTTP REST API integration
  • ✅ CLI command execution
  • ✅ Model management tools

🔗 HTTP API Conversion

📹 Watch Demo | View Code

Transform any REST API into MCP tools automatically:

bash
# 1. Convert OpenAPI spec
genmcp convert http://localhost:9090/openapi.json

# 2. Run the generated MCP server
genmcp run

Demonstrates:

  • 🔄 Automatic OpenAPI → MCP conversion
  • 🛠️ Path parameter substitution (/features/{id})
  • 📊 Schema validation and type safety
  • 🎯 Selective endpoint exposure

🔌 gRPC Service Integration

View Demo Repository

Expose existing gRPC services to LLMs without modifying service code:

Architecture:

  • Uses gRPC-Gateway to create an HTTP/JSON proxy
  • Exposes the HTTP proxy as MCP tools via gen-mcp
  • Works with any gRPC service using only .proto definitions

Perfect for:

  • 🏢 Integrating legacy gRPC services with AI workflows
  • 🔄 Bridging binary gRPC with JSON-based LLM interfaces
  • 🚀 Getting started before native gRPC support arrives

Note: This is a workaround pattern until gen-mcp adds native gRPC support.


🤝 Contributing

We welcome contributions! This is an early-stage research project with lots of room for improvement.

Join the Community

Have questions or want to discuss gen-mcp? Join our Discord community:

Join Discord - Connect with other users, share ideas, and get help

Development Setup

bash
git clone https://github.com/genmcp/gen-mcp.git
cd gen-mcp
go test ./...

# Build local binary
make build-cli

📄 License

Apache 2.0 License - see LICENSE file for details.

🔗 Links


Dùng MCP Gen MCP 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 Gen MCP, 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 Cài 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 Cài 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 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. Giữ tiến trình 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. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Gen MCP 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 Gen MCP.
  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": {
    "gen-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
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 Gen MCP, 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 Gen MCP.
  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 TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Gen MCP giúp tôi làm việc này không?
Gen MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Gen MCP.

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

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

Gen MCP 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 Gen MCP 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 Gen MCP 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 Gen MCP 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 Gen MCP, 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 Gen MCP với TypingMind?

Gen MCP 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 Gen MCP cung cấp những công cụ nào trong TypingMind?

Gen MCP 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 Gen MCP 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 Gen MCP 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 👇