Phase 11, part 5: the JSON API
/api/v1 offers the MCP tools as plain HTTP for scripts: GET /api/v1/tools lists what a key may call, POST /api/v1/<tool> calls one with JSON. Each call goes through /mcp internally, so keys, scopes, limits, logging and approvals are the same. /api/v1/docs documents every tool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -344,6 +344,9 @@ func (s *Server) Handler() (http.Handler, error) {
|
||||
mux.HandleFunc("GET /settings/about", s.aboutPage)
|
||||
mux.HandleFunc("GET /settings/connections", s.connectionsPage)
|
||||
mux.HandleFunc("GET /settings/activity", s.activityPage)
|
||||
mux.HandleFunc("GET /api/v1/docs", s.apiDocs)
|
||||
mux.HandleFunc("GET /api/v1/tools", s.apiTools)
|
||||
mux.HandleFunc("POST /api/v1/{tool}", s.apiCall)
|
||||
mux.HandleFunc("GET /approvals", s.approvalsPage)
|
||||
mux.HandleFunc("POST /approvals/allowed/withdraw", s.approvalWithdraw)
|
||||
mux.HandleFunc("POST /approvals/{id}/{action}", s.approvalAction)
|
||||
|
||||
Reference in New Issue
Block a user