Transform any OpenAPI service into an AI-ready MCP server with intelligent tool curation and zero-configuration deployment.
API2MCP is not just another OpenAPI-to-MCP converter. It's an intelligent platform that solves the "tool overload" problem by providing AI-optimized tool curation, document enhancement, and seamless integration with modern AI development workflows.
Traditional REST APIs were designed for deterministic software clients, not probabilistic AI agents. Simply mapping every API endpoint to an MCP tool creates the "one-to-one mapping trap" that leads to:
- Tool Overload: LLMs perform poorly when faced with hundreds of low-level tools
- Intent Mismatch: API structure reflects system implementation, not user intent
- Context Explosion: Excessive token consumption from unoptimized tool descriptions
API2MCP was born from the realization that every OpenAPI-compliant service deserves to be AI-ready. Our mission is to eliminate the manual toil of creating MCP tools by providing:
- Universal Accessibility: Any service with OpenAPI can become AI-accessible
- Zero Integration Cost: No code changes required on the API side
- Progressive Enhancement: From zero-config to advanced customization
- Local-First Control: Full control over your tools without vendor lock-in
API2MCP transforms OpenAPI specifications into intent-driven, AI-optimized tool collections through:
- π§ Smart Tool Aggregation: Combines related endpoints into high-level, task-oriented tools
- π Document Patch Enhancement: Enriches poor-quality OpenAPI documentation with AI-friendly descriptions
- π Hybrid Tool/Resource Mapping: Intelligent mapping of GET methods to both MCP Tools and Resources
- ποΈ Visual Configuration Interface: MCPMate integration for drag-and-drop tool design
- Minimal Integration Cost: Zero changes required to existing APIs
- Universal Compatibility: Works with any OpenAPI-compliant service
- Zero-Configuration Start: Just provide an OpenAPI URL to get started
- Progressive Configuration: From simple to complex use cases
- Local-First Priority: Full control without vendor dependencies
Our analysis of the OpenAPI-to-MCP market reveals four distinct solution categories. API2MCP uniquely positions itself in the sweet spot:
Feature | Basic CLI Tools | Enterprise Gateways | Commercial Platforms | API2MCP |
---|---|---|---|---|
Local Deployment | β | β | β | β |
Visual Configuration | β | β | β | β |
Tool Curation | β | Limited | β | β |
Document Enhancement | β | β | β | β |
Zero Vendor Lock-in | β | β | β | β |
Enterprise Features | β | β | β | β |
Our Unique Value Proposition:
- Local-First + Visual: Combines Speakeasy's UX with local deployment control
- Document Patch System: First platform to systematically address OpenAPI documentation deficiencies
- Intelligent Mapping: GET methods can be exposed as both Tools and Resources
- MCPMate Ecosystem: Deep integration with the broader MCP management platform
- Progressive Enhancement: From zero-config to advanced customization
# From releases (recommended)
curl -L https://github.com/MCPMate/api2mcp/releases/latest/download/api2mcp-$(uname -s)-$(uname -m).tar.gz | tar xz
sudo mv api2mcp /usr/local/bin/
# From source
git clone https://github.com/MCPMate/api2mcp.git
cd api2mcp
cargo install --path .
# Minimal setup - just provide OpenAPI URL
api2mcp --openapi-url https://api.example.com/openapi.json
# With configuration
api2mcp --config config.yaml
# config.yaml
source:
openapi_url: "https://api.example.com/openapi.json"
api_base_url: "https://api.example.com"
naming:
pattern: "{project}_{tag}_{action}"
project: "myapi"
filtering:
include_tags: ["users", "projects", "billing"]
exclude_paths: ["/internal/*", "/admin/*"]
mapping_rules:
resources:
- pattern: "GET /api/*/list"
- pattern: "GET /api/*/schema"
tools:
- pattern: "GET /api/*/search"
- pattern: "POST /api/*"
mixed:
- pattern: "GET /api/users/*"
auth:
type: "bearer"
token_source: "env:API_TOKEN"
Problem: A typical REST API with 100+ endpoints becomes unmanageable for AI agents.
Solution: API2MCP intelligently groups and curates tools:
# Instead of exposing 5 separate user endpoints:
# - POST /users (create)
# - GET /users/{id} (read)
# - PUT /users/{id} (update)
# - DELETE /users/{id} (delete)
# - GET /users/{id}/profile (profile)
# API2MCP creates intent-based tools:
tools:
- name: "manage_user_profile"
description: "Complete user profile management including creation, updates, and profile access"
aggregates: ["POST /users", "PUT /users/{id}", "GET /users/{id}/profile"]
Problem: Many OpenAPI specs have poor descriptions, missing examples, and unclear parameters.
Solution: Overlay system for document enhancement:
# patches.yaml
patches:
operations:
"GET /users/{id}":
summary: "Get detailed user information"
description: "Retrieves complete user profile including preferences and settings"
parameters:
id:
description: "Unique user identifier (numeric ID)"
example: "12345"
schemas:
User:
properties:
email:
example: "user@example.com"
GET Method Intelligence: Automatically determines whether GET endpoints should be:
- MCP Resources: For simple data retrieval (lists, schemas)
- MCP Tools: For complex operations (search, export)
- Mixed Mode: Both, for maximum flexibility
- Real-time tool preview as you configure
- Drag-and-drop tool design interface
- Export configurations for standalone deployment
- Template library for common API patterns
- Minimal Integration Cost: Zero-configuration start with progressive enhancement
- Universal Compatibility: Works with any OpenAPI-compliant service
- Local-First: No vendor lock-in, full control over your tools
- Progressive Configuration: Simple start β advanced customization
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β OpenAPI β β API2MCP β β MCP Server β
β Specification βββββΆβ Engine βββββΆβ Runtime β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βββββββββββββββββββ
β MCPMate β
β Web UI β
βββββββββββββββββββ
Key Components:
- Lazy Loading Engine: HTTP-based OpenAPI fetching with retry/caching
- Patch Overlay System: Non-destructive document enhancement
- Tool Aggregation Engine: Intelligent endpoint grouping
- Authentication Mapper: Secure credential management
- Hot Reload System: Zero-downtime configuration updates
auth:
# Parsed from OpenAPI securitySchemes
schemes:
- type: "bearer"
header: "Authorization"
- type: "apikey"
name: "X-API-Key"
location: "header"
# Runtime credential management
management:
enabled: true
management_key: "${MGMT_KEY}"
tools: ["set_bearer_token", "set_api_key"]
filtering:
# Path-based filtering (glob patterns)
include_paths: ["/api/v1/*", "/api/v2/users/*"]
exclude_paths: ["/api/*/internal/*"]
# Tag-based filtering
include_tags: ["public", "users", "billing"]
exclude_tags: ["admin", "internal"]
# HTTP method filtering
methods: ["GET", "POST", "PUT", "DELETE"]
performance:
# Caching strategy
cache:
enabled: true
etag_support: true
local_cache: "/tmp/api2mcp-cache"
# HTTP client settings
http:
timeout: 30s
retry_count: 3
rate_limit: 100 # requests per minute
concurrency: 10
# Refresh behavior
refresh:
interval: 60s
backoff_max: 300s
- β OpenAPI parsing and tool generation
- β Basic authentication support (Bearer, API Key)
- β Path/tag filtering
- β CLI interface with configuration files
- π― Goal: Feature parity with existing OpenAPI-MCP tools
- π Document patch enhancement system
- π Smart tool/resource mapping for GET methods
- π Advanced authentication (OAuth 2.1, DCR)
- π Auto-refresh with ETag/hash detection
- π― Goal: Differentiated document enhancement capabilities
- π¨ MCPMate web UI integration
- ποΈ Visual tool curation interface
- π Configuration templates and presets
- π Real-time monitoring and analytics
- π― Goal: Best-in-class visual configuration experience
- π’ Multi-source aggregation
- π Advanced credential management
- π Observability and diagnostics
- π High-performance optimizations
- π― Goal: Enterprise-ready platform capabilities
Based on our comprehensive market analysis, the OpenAPI-to-MCP space is rapidly evolving:
- OpenAPI-MCP: Basic Python implementation
- Higress: Alibaba's enterprise gateway solution
- Speakeasy Gram: Commercial hosted platform
- IBM MCP Context Forge: Enterprise federation gateway
- Local + Visual: No other solution combines local deployment with visual configuration
- Document Quality: First platform to systematically address OpenAPI documentation deficiencies
- Intelligent Mapping: Unique approach to GET method tool/resource dual exposure
- Curation Focus: Only platform prioritizing "tool design" over "code generation"
We welcome contributions! See our Development Guide for:
- Architecture overview and coding standards
- Local development setup
- Testing guidelines
- Documentation standards
git clone https://github.com/MCPMate/api2mcp.git
cd api2mcp
# Install dependencies
cargo build
# Run tests
cargo test
# Local development with hot reload
cargo watch -x run
- Technical Design: Comprehensive technical specification
- Market Analysis: Strategic analysis of the OpenAPI-to-MCP space
- Configuration Guide: Advanced configuration options
- API Reference: Generated API documentation
# Quick prototype: expose your API to Claude Desktop
api2mcp --openapi-url http://localhost:3000/openapi.json
# config.yaml - Curated tools for specific workflows
source:
openapi_url: "https://api.yourapp.com/openapi.json"
patches:
operations:
"POST /campaigns":
summary: "Launch marketing campaign"
description: "Creates and launches a new marketing campaign with specified targeting and budget"
# Multi-service aggregation with governance
sources:
- name: "user-service"
openapi_url: "https://users.internal.com/openapi.json"
namespace: "users"
- name: "billing-service"
openapi_url: "https://billing.internal.com/openapi.json"
namespace: "billing"
governance:
auth_required: true
rate_limits:
per_user: 1000
per_tool: 100
- MCPMate: Main MCP management platform
- RMCP SDK: Rust MCP implementation
- Model Context Protocol: Official MCP specification
This project is licensed under the MIT License - see the LICENSE file for details.
- Anthropic for the Model Context Protocol specification
- OpenAPI Initiative for the OpenAPI specification
- All contributors whose research informed our market analysis
Ready to transform your APIs into AI-ready tools? Get started or join our community!