echo-mcp is an MCP wrapper library for the Go language Echo web framework, with the goal of converting an existing Echo API into MCP (Model Context Protocol) tools, thereby enabling AI assistants or AI agents to interact with your Echo API. This project is inspired by gin-mcp, but is specifically adapted for the Echo framework.
Main capabilities
- Zero configuration: can be used with any existing Echo API.
- Multiple Schema sources: supports Swaggo, raw OpenAPI YAML/JSON, and manually registered Schemas.
- Filtering: include or exclude endpoints via wildcard patterns.
- MCP compatible: can work with any agent that supports MCP.
- After the service starts, the API can be accessed via http://localhost:8080/mcp .
Schema generation methods Echo-MCP supports four Schema generation methods, with an automatic fallback mechanism:
- Automatic Swagger Schema: if you have already used Swaggo to generate Swagger documentation, you can enable automatic Schema generation.
- Raw OpenAPI Schema support: if you use another OpenAPI library (such as swaggest/openapi-go), you can pass in a raw YAML or JSON Schema string. The OpenAPISchema field accepts both YAML and JSON format strings; once provided, it will automatically populate from the Schema: server name (from the Schema title), description (from the Schema description), version (from the Schema version), and tool Schema (from operation definitions).
- Endpoint filtering: you can expose only the necessary endpoints to MCP tools.
- Manual Schema registration (in development): for better control, you can manually register Schemas.
Usage
- After integrating Echo-MCP into a project, start the Echo service; the MCP endpoint is by default located at http://localhost:8080/mcp。
- MCP client integration: once the server is running, it can be configured in any client that supports MCP.
- Manual configuration: the documentation provides a manual configuration method.
- Local testing: MCP Inspector can be used for local testing.
Applicable scenarios
- Developers who want AI assistants or agents to directly operate an existing Echo API.
- Projects that already have Swaggo or OpenAPI documentation and want to quickly expose the API as MCP tools.
- Scenarios that require filtering and control over the endpoints exposed to AI.
Limitations and information not yet provided
- The manual Schema registration feature is marked as WIP (in development).
- Information about charges, pricing, platform support, specific performance results, etc. is not yet provided in the materials.
The project also acknowledges Swaggo (Swagger documentation generator), swaggest/openapi-go (OpenAPI 3.0 toolkit for Go), Echo Framework (high-performance Go web framework), Echo Swagger (Swagger UI middleware for Echo), and Model Context Protocol (a general protocol for AI tool interaction).