Skip to content

feat(middleware): add MCP (Model Context Protocol) middleware#2945

Closed
MayukhSobo wants to merge 1 commit intolabstack:masterfrom
MayukhSobo:feat/mcp-middleware
Closed

feat(middleware): add MCP (Model Context Protocol) middleware#2945
MayukhSobo wants to merge 1 commit intolabstack:masterfrom
MayukhSobo:feat/mcp-middleware

Conversation

@MayukhSobo
Copy link
Copy Markdown

@MayukhSobo MayukhSobo commented Apr 10, 2026

Adds a new middleware that mounts a JSON-RPC 2.0 endpoint at a configurable path and auto-exposes registered Echo routes as MCP tools, so AI clients (Claude Desktop, Cursor, etc.) can discover and call them.

Implements initialize, tools/list and tools/call. Tool input schemas are derived from RouteInfo.Parameters; tool calls substitute path parameters via RouteInfo.Reverse and dispatch the synthesized request through e.ServeHTTP, preserving the full middleware chain.

No core Echo files are modified and no new dependencies are introduced.

Adds a new middleware that mounts a JSON-RPC 2.0 endpoint at a configurable
path and auto-exposes registered Echo routes as MCP tools, so AI clients
(Claude Desktop, Cursor, etc.) can discover and call them.

Implements initialize, tools/list and tools/call. Tool input schemas are
derived from RouteInfo.Parameters; tool calls substitute path parameters
via RouteInfo.Reverse and dispatch the synthesized request through
e.ServeHTTP, preserving the full middleware chain.

No core Echo files are modified and no new dependencies are introduced.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant