API Reference
REST API overview — base URL, authentication, and available endpoint groups.
API Reference
MCPHub exposes a REST API under /api/v1. All endpoints return JSON.
Base URL
Authentication
All endpoints except /auth/signup and /auth/login require authentication. Two methods are supported:
JWT (Bearer token)
Obtain a token from POST /auth/login. Access tokens expire after 15 minutes. Use POST /auth/refresh with your refresh token to get a new one.
API key
Create API keys in Settings → API Keys. Keys are workspace-scoped and don't expire (until revoked).
Error format
Standard HTTP status codes: 400 (bad request), 401 (unauthenticated), 403 (forbidden), 404 (not found), 422 (validation error), 500 (server error).
Endpoint groups
- Auth — signup, login, refresh, me, workspace switching
- Workspaces — workspace CRUD, members, invites, API keys
- Servers — server registry CRUD, probe trigger
- Health — health check history and summary
- Proxy — transparent MCP proxy
- Tool Calls — audit log and direct ingestion
- Tool Playground — list and invoke tools
- Analytics — usage metrics and charts
- Alerts — alert rules and events