Commit 3bc34bc
committed
mcp: reuse go-mcp library for MCP server implementation
Replaces odek's hand-rolled MCP server (internal/mcp/mcp.go) with a
thin adapter over github.com/BackendStack21/go-mcp v1.1.0.
Changes:
- internal/mcp/mcp.go: rewritten as ~130-line adapter wrapping gomcp.Server
- Removed duplicated JSON-RPC/MCP protocol types (~230 lines of protocol code)
- Startup logging moved from cmd/odek/mcp.go into Server.Run()
- Added go-mcp as direct dependency (21no.de ecosystem)
- All 14 existing tests pass unchanged
go-mcp provides: JSON-RPC 2.0 dispatch, init tracking, ping, tool/resource/prompt
handlers, protocol version 2025-03-26, isError:true for tool errors.1 parent e25af66 commit 3bc34bc
4 files changed
Lines changed: 53 additions & 292 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 116 | | |
129 | 117 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
0 commit comments