chore: specs for unimplemented work (#70)

This commit is contained in:
Nathan Flurry 2026-02-04 13:45:31 -08:00 committed by GitHub
parent ef3e811c94
commit 8a31519786
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 367 additions and 0 deletions

View file

@ -0,0 +1,31 @@
# 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/mcp`
- `POST /opencode/mcp`
- `POST /opencode/mcp/{name}/auth`
- `DELETE /opencode/mcp/{name}/auth`
- `POST /opencode/mcp/{name}/auth/callback`
- `POST /opencode/mcp/{name}/auth/authenticate`
- `POST /opencode/mcp/{name}/connect`
- `POST /opencode/mcp/{name}/disconnect`
- `GET /opencode/experimental/tool`
- `GET /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.