Architecture
The big picture
1. Parse CLI args → server="sentry", tool="search_issues", args={...}
2. Load config → find "sentry" in servers.json → it's an HTTP server
3. Create transport → HttpTransport with the server URL
4. Load saved auth token (if any)
5. MCP handshake:
→ Send "initialize" request with protocol version
← Receive server capabilities
→ Send "notifications/initialized"
6. Send "tools/call" request with tool name and arguments
← If 401: start OAuth flow → retry with new token
← Receive tool result
7. Print JSON result to stdout
8. Close transportTransport: the core abstraction
Authentication: layered fallbacks
Protocol: JSON-RPC 2.0 over MCP
Config: untagged enum deserialization
Registry: search and scaffold
Output: JSON everywhere
Design principles
Last updated
Was this helpful?