GET /api/servers
List all MCP servers and their status.
GET /api/servers/:name
Read a single server’s configuration.
POST /api/servers
Add a new MCP server.
POST /api/servers/batch
Add multiple servers in one request.
PUT /api/servers/:name
Update an existing server.
DELETE /api/servers/:name
Remove a server.
POST /api/servers/:name/toggle
Enable or disable a server.
POST /api/servers/:name/reload
Reconnect to an upstream server.
POST /api/servers/:serverName/tools/:toolName/toggle
Enable or disable a tool.
PUT /api/servers/:serverName/tools/:toolName/description
Override a tool description.
DELETE /api/servers/:serverName/tools/:toolName/description
Reset a tool description to upstream.
Prompts on servers
Toggle / describe / reset prompts.
Resources on servers
Toggle / describe / reset resources.
GET /api/settings
Read everything: servers, groups, system config.
Get All Servers
Retrieves a list of all configured MCP servers, including their status and available tools.- Endpoint:
/api/servers - Method:
GET - Response:
Get a Server
Returns the configuration of a single server, including upstream tools/prompts/resources when connected.- Endpoint:
GET /api/servers/:name - Authentication: Required.
- Returns
404if the server is not configured.
Create a New Server
Adds a new MCP server to the configuration.- Endpoint:
/api/servers - Method:
POST - Body:
name(string, required): The unique name for the server.config(object, required): The server configuration object.type(string):stdio,sse,streamable-http, oropenapi.command(string): Command to execute forstdiotype.args(array of strings): Arguments for the command.url(string): URL forsse,streamable-http, oropenapitypes.openapi(object): OpenAPI configuration.url(string): URL to the OpenAPI schema.schema(object): The OpenAPI schema object itself.
headers(object): Headers to send with requests forsse,streamable-http, andopenapitypes.keepAliveInterval(number): Keep-alive interval in milliseconds forssetype. Defaults to 60000.enableKeepAlive(boolean): Toggle keep-alive pings on/off independent of the interval.enabled(boolean): Defaults totrue. Disabled servers stay in the configuration but are not connected.owner(string): The owner of the server. Defaults to the current user or'admin'.passthroughHeaders(string[]): Inbound HTTP header names that should be forwarded to the upstream server.oauth,proxy,options,description: Optional advanced settings — see MCP Settings.
Batch Create Servers
Create several servers in a single request. The body contains aservers array of { name, config } objects — the same shape POST /api/servers accepts, just batched:
- Endpoint:
POST /api/servers/batch - Authentication: Required.
- Body:
{ name, success, message? } record so partial batches do not abort the whole request.
Update a Server
Updates the configuration of an existing MCP server.- Endpoint:
/api/servers/:name - Method:
PUT - Parameters:
:name(string, required): The name of the server to update.
- Body:
config(object, required): The updated server configuration object. See “Create a New Server” for details.
Delete a Server
Removes an MCP server from the configuration.- Endpoint:
/api/servers/:name - Method:
DELETE - Parameters:
:name(string, required): The name of the server to delete.
Toggle a Server
Enables or disables an MCP server.- Endpoint:
/api/servers/:name/toggle - Method:
POST - Parameters:
:name(string, required): The name of the server to toggle.
- Body:
enabled(boolean, required):trueto enable the server,falseto disable it.
Reload a Server
Forces MCPHub to disconnect and re-establish the upstream connection (or re-spawn the stdio child) for a single server. Use this when an upstream server has been updated out-of-band or appears stuck.- Endpoint:
POST /api/servers/:name/reload - Authentication: Required.
Toggle a Tool
Enables or disables a specific tool on a server.- Endpoint:
/api/servers/:serverName/tools/:toolName/toggle - Method:
POST - Parameters:
:serverName(string, required): The name of the server.:toolName(string, required): The name of the tool.
- Body:
enabled(boolean, required):trueto enable the tool,falseto disable it.
Update Tool Description
Updates the description of a specific tool.- Endpoint:
/api/servers/:serverName/tools/:toolName/description - Method:
PUT - Parameters:
:serverName(string, required): The name of the server.:toolName(string, required): The name of the tool.
- Body:
description(string, required): The new description for the tool.
Reset Tool Description
Drops the override stored in MCPHub and falls back to the upstream tool description.- Endpoint:
DELETE /api/servers/:serverName/tools/:toolName/description - Authentication: Required.
Prompts
MCPHub exposes the same toggle / describe / reset triple for upstream prompts. The body shape mirrors the tool endpoints above.| Method & Path | Purpose |
|---|---|
POST /api/servers/:serverName/prompts/:promptName/toggle | Enable / disable a prompt. Body: { "enabled": true }. |
PUT /api/servers/:serverName/prompts/:promptName/description | Override the prompt description. Body: { "description": "..." }. |
DELETE /api/servers/:serverName/prompts/:promptName/description | Reset the description to the upstream value. |
Resources
| Method & Path | Purpose |
|---|---|
POST /api/servers/:serverName/resources/:resourceUri/toggle | Enable / disable a resource. Body: { "enabled": true }. The :resourceUri must be URL-encoded. |
PUT /api/servers/:serverName/resources/:resourceUri/description | Override the resource description. |
DELETE /api/servers/:serverName/resources/:resourceUri/description | Reset the description. |
System Configuration
System-wide configuration (routing, install, smart routing, mcpRouter, name separator, session rebuild, OAuth server) is managed throughPUT /api/system-config. See System Config API for the full request schema and accepted top-level keys (routing, install, smartRouting, mcpRouter, nameSeparator, enableSessionRebuild, oauthServer).
Get Settings
Retrieves all server settings and configurations.- Endpoint:
/api/settings - Method:
GET - Response:
Other server-adjacent endpoints
MCPHub exposes several other route families beyond pure server CRUD. Each lives on its own resource and is documented separately or, where no dedicated page exists yet, follows the schema described inline:| Family | Method & Path(s) | Notes |
|---|---|---|
| Auth & users | POST /api/auth/login, POST /api/auth/register, GET /api/auth/user, POST /api/auth/change-password, /api/users/*, /api/users-stats | See Auth and Users. |
| Bearer keys | GET /api/auth/keys, POST /api/auth/keys, PUT /api/auth/keys/:id, DELETE /api/auth/keys/:id | System-level and user-level static MCP tokens. Only all-access system keys can authenticate dashboard APIs. See Authentication. |
| Groups | /api/groups, /api/groups/batch, /api/groups/:id/servers*, /api/groups/:id/server-configs* | See Groups. |
| Templates | POST /api/templates/export, GET /api/templates/export/groups/:id, POST /api/templates/import | Export / import mcp_settings.json snapshots and group templates. Rate-limited. |
| Activities | GET /api/activities, /api/activities/stats, /api/activities/filters, /api/activities/:id, DELETE /api/activities/cleanup, GET /api/activities/available | Database mode only — see Monitoring. |
| Logs | GET /api/logs, DELETE /api/logs, GET /api/logs/stream | In-process log buffer + SSE stream. |
| Built-in prompts / resources | /api/prompts, /api/resources, POST /api/resources/read | First-party prompts and resources that are not attached to an upstream server. |
| MCPB upload | POST /api/mcpb/upload | Upload an MCPB bundle to register a new server. |
| Market / Cloud / Registry | /api/market/*, /api/cloud/*, /api/registry/* | Read-only catalogs that back the dashboard’s discovery pages. |
| OAuth clients (MCPHub server) | /api/oauth/clients, /api/oauth/clients/:clientId/regenerate-secret | Manage clients of MCPHub’s own authorization server. The flow itself lives at /oauth/* and is documented under OAuth. |
| Better Auth | GET /api/better-auth/user, plus the Better Auth handler mounted at ${BASE_PATH}${betterAuthConfig.basePath} (default /api/auth/better) | Optional GitHub / Google login. |
| OpenAPI | GET ${BASE_PATH}/api/openapi.json, GET ${BASE_PATH}/api/:name/openapi.json, GET ${BASE_PATH}/api/openapi/servers, GET ${BASE_PATH}/api/openapi/stats, plus the OpenAPI tool execution routes | See OpenAPI. |
| MCP settings export | GET /api/mcp-settings/export | Download the live settings as JSON. |