MCPHub Docs

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

https://mcphub.aniruddha.fyi/api/v1

Authentication

All endpoints except /auth/signup and /auth/login require authentication. Two methods are supported:

JWT (Bearer token)

Authorization: Bearer <access_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

X-API-Key: mhk_your_key_here

Create API keys in Settings → API Keys. Keys are workspace-scoped and don't expire (until revoked).

Error format

{
  "detail": "Human-readable error message"
}

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

On this page