🏎️ ☁️ 📟 🪟 🐧 🍎 - Zero-configuration Go library that exposes existing Echo web framework APIs as MCP tools
MCP Wrapper for Echo Framework
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Wrap any existing Echo API into MCP tools and enable AI agents to interact with your API through Model Context Protocol.
Inspired by gin-mcp but for the Echo framework.
Key Features
- **Zero Configuration**: Works with any existing Echo API
- **Multiple Schema Sources**: Support for Swaggo, raw OpenAPI YAML/JSON, and manual schemas
- **Filtering**: Include/exclude endpoints with wildcard patterns
- **MCP Compatible**: Works with any agent that supports MCP.
Installation
Quick Start
Now the API is accessible at http://localhost:8080/mcp
Advanced Usage
Automatic Swagger Schemas
If you already use Swaggo for Swagger documentation, enable automatic schema generation:
Raw OpenAPI Schema Support
If you use other OpenAPI libraries like swaggest/openapi-go, you can pass a raw YAML or JSON schema string:
The OpenAPISchema field accepts both YAML and JSON formatted strings. When provided, it automatically populates:
- Server name from schema title
- Description from schema description
- Version from schema version
- Tool schemas from operation definitions
Endpoint Filtering
Expose only the necessary endpoints to MCP tools:
Manual Schema Registration (WIP)
For better control, register schemas manually:
Schema Generation Methods
Echo-MCP supports four schema generation approaches, with automatic fallback:
| Method | Use Case | Priority |
|--------|----------|----------|
| **Raw OpenAPI Schema** | Using OpenAPI libraries like swaggest/openapi-go | First (if OpenAPISchema is set) |
| **Swagger** | Production APIs with Swaggo annotations | First (if EnableSwaggerSchemas is set) |
| **Manual** | Fine-grained control, complex validation | Second |
| **Automatic** | Quick prototyping, simple endpoints | Fallback |
MCP Client Integration
Once your server is running:
Manual configuration
Local Testing
For local testing, use MCP Inspector:
Acknowledgments
- Swaggo - Swagger documentation generator
- swaggest/openapi-go - OpenAPI 3.0 toolkit for Go