mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 17:01:02 +00:00
1.2 KiB
1.2 KiB
Spec: MCP Integration
Proposed API Changes
- Add an MCP server registry to the core session manager.
- Support MCP auth lifecycle and connect/disconnect operations.
- Expose tool discovery metadata for OpenCode tooling.
Summary OpenCode expects MCP server registration, authentication, and connectivity endpoints, plus tool discovery for those servers.
OpenCode Endpoints (Reference)
GET /opencode/mcpPOST /opencode/mcpPOST /opencode/mcp/{name}/authDELETE /opencode/mcp/{name}/authPOST /opencode/mcp/{name}/auth/callbackPOST /opencode/mcp/{name}/auth/authenticatePOST /opencode/mcp/{name}/connectPOST /opencode/mcp/{name}/disconnectGET /opencode/experimental/toolGET /opencode/experimental/tool/ids
Core Functionality Required
- Register MCP servers with config (url, transport, auth type).
- Auth flows (token exchange, callback handling).
- Connect/disconnect lifecycle and health.
- Tool listing and tool ID exposure for connected servers.
OpenCode Compat Wiring + Tests
- Replace stubs for
/mcp*and/experimental/tool*. - Add E2E tests using a real MCP test server to validate auth + tool list flows.