You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: MCP client — kode connects to external MCP servers
kode can now connect to any MCP server over stdio and expose its
tools to the agent. Configured via mcp_servers in kode.json, same
format as Claude Code's mcpServers.
New package: internal/mcpclient
- Client — spawns MCP server subprocess, JSON-RPC 2.0 over pipes
- Discover() — initialize + tools/list handshake
- CallTool() — tools/call with text result extraction
- ToolAdapter — wraps MCP tool as kode.Tool (Name, Description,
Schema, Call)
- Tool names prefixed as <server>__<tool> to avoid collisions
- 17 tests: discovery, calling, errors, timeouts, close, env config
Config:
- New mcp_servers map in FileConfig and ResolvedConfig
- Supports command, args, and env overrides (same format as
Claude Code ~/.claude/settings.json)
Wired into all commands:
- kode run, kode repl, kode continue, kode serve, kode mcp,
kode subagent
- Cleanup via defer on exit
Docs:
- Rewrote docs/MCP.md covering both server and client directions
- Configuration examples: Playwright, Fetch, GitHub MCP servers
- Tool naming, lifecycle, logging, config reference
15/15 packages, race clean.
0 commit comments