GET /api/servers

Get a list of all MCP servers.

POST /api/servers

Create a new MCP server.

PUT /api/servers/:name

Update an existing MCP server.

DELETE /api/servers/:name

Delete an MCP server.

POST /api/servers/:name/toggle

Toggle the enabled state of a server.

POST /api/servers/:serverName/tools/:toolName/toggle

Toggle the enabled state of a tool.

PUT /api/servers/:serverName/tools/:toolName/description

Update the description of a tool.

Get All Servers

Retrieves a list of all configured MCP servers, including their status and available tools.
  • Endpoint: /api/servers
  • Method: GET
  • Response:
    {
      "success": true,
      "data": [
        {
          "name": "example-server",
          "status": "connected",
          "tools": [
            {
              "name": "tool1",
              "description": "Description of tool 1"
            }
          ],
          "config": {
            "type": "stdio",
            "command": "node",
            "args": ["server.js"]
          }
        }
      ]
    }
    

Create a New Server

Adds a new MCP server to the configuration.
  • Endpoint: /api/servers
  • Method: POST
  • Body:
    {
      "name": "my-new-server",
      "config": {
        "type": "stdio",
        "command": "python",
        "args": ["-u", "my_script.py"],
        "owner": "admin"
      }
    }
    
    • name (string, required): The unique name for the server.
    • config (object, required): The server configuration object.
      • type (string): stdio, sse, streamable-http, or openapi.
      • command (string): Command to execute for stdio type.
      • args (array of strings): Arguments for the command.
      • url (string): URL for sse, streamable-http, or openapi types.
      • 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 for sse, streamable-http, and openapi types.
      • keepAliveInterval (number): Keep-alive interval in milliseconds for sse type. Defaults to 60000.
      • owner (string): The owner of the server. Defaults to the current user or ‘admin’.

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": {
        "type": "stdio",
        "command": "node",
        "args": ["new_server.js"]
      }
    }
    
    • 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": true
    }
    
    • enabled (boolean, required): true to enable the server, false to disable it.

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": true
    }
    
    • enabled (boolean, required): true to enable the tool, false to 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": "New tool description"
    }
    
    • description (string, required): The new description for the tool.