Connectors

Connect MCP servers

Register a remote Model Context Protocol (MCP) server, call its tools over the API, and add it to an agent.

Central Hub stores the server's credentials encrypted and calls the server itself, so a client calls tools without holding the server's secret.

Endpoints

Every route selects the workspace with X-Space-Slug.

MethodURLDoesRequiresAuth
GET/api/v1/mcp-connections/List the MCP connections you can seeReadKey or bearer
GET/api/v1/mcp-connections/catalog/List the ready-made servers the Connectors page offersReadKey or bearer
POST/api/v1/mcp-connections/Register a server; lists its toolsCreateKey or bearer
POST/api/v1/mcp-connections/test/List an unsaved config's tools; saves nothingCreateKey or bearer
GET/api/v1/mcp-connections/{connection_id}/Read one, with discovered_tools; secrets are [REDACTED] unless ?mask_credentials=falseReadKey or bearer
PATCH/api/v1/mcp-connections/{connection_id}/Edit or rotate credentialsEditKey or bearer
DELETE/api/v1/mcp-connections/{connection_id}/Delete it; 204DeleteKey or bearer
POST/api/v1/mcp-connections/{connection_id}/refresh-tools/List the server's tools againEditKey or bearer
POST/api/v1/mcp-connections/{connection_id}/call/Call one toolReadKey or bearer
GET/api/v1/mcp-connections/{connection_id}/auth-status/Whether you can use it nowReadKey or bearer
POST/api/v1/mcp-connections/{connection_id}/authenticate/init/ · …/callback/Connect your own account to an oauth2 serverReadKey or bearer
DELETE/api/v1/mcp-connections/{connection_id}/authenticate/Disconnect your own account; 204ReadKey or bearer

Requires names the MCP connections permission (mcp_connection:read, create, edit, delete).

Request fields

FieldTypeNotes
namestring, required
urlstring, requiredThe server's MCP endpoint; outside local deployments it must be https and not a private host
transportstreamable_http or sse, default streamable_http
auth_typenone, bearer_token, custom_header, basic_auth or oauth2, default none
credentialsobject, default {}Keys per auth_type, below
scope_visibilityprivate or space, default privatespace needs a second workspace member
connector_keystring, optionalA catalog entry's key; the web app shows that vendor's logo for the connection
auth_typecredentials
none{}
bearer_tokentoken; sent as Authorization: Bearer <token>
custom_headerheader_name, header_value
basic_authusername, password
oauth2Optional client_id, client_secret for servers without dynamic client registration; each user signs in

Register an MCP server

  1. Optional: check the config first with POST /api/v1/mcp-connections/test/ and the same body. The response is {"ok": true, "tools": [...], "server_instructions": null}.

  2. Register it. Central Hub connects, lists the tools and stores them in discovered_tools:

    curl -X POST "$CENTRAL_HUB_URL/api/v1/mcp-connections/" \
      -H "X-API-Key: $ALO_API_KEY" \
      -H "X-Space-Slug: $WORKSPACE_SLUG" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Issues MCP",
        "url": "https://mcp.example.com/mcp",
        "auth_type": "bearer_token",
        "credentials": {"token": "…"}
      }'
  3. Keep the id from the 201 response (abridged):

    {
      "id": 62,
      "name": "Issues MCP",
      "url": "https://mcp.example.com/mcp",
      "transport": "streamable_http",
      "auth_type": "bearer_token",
      "credentials": {"token": "[REDACTED]"},
      "scope_visibility": "private",
      "discovered_tools": [
        {
          "name": "search_issues",
          "title": null,
          "description": "Search issues by text.",
          "input_schema": {
            "type": "object",
            "required": ["query"],
            "properties": {"query": {"type": "string"}, "limit": {"type": "integer", "default": 5}}
          }
        }
      ],
      "last_error": null,
      "user_authenticated": true
    }

If the server cannot be reached or refuses the credentials, nothing is saved and the response is 422 with the reason.

Connect an OAuth server

An oauth2 server is saved without tools; each user then signs in with their own account.

  1. Register it with "auth_type": "oauth2". discovered_tools is [] and user_authenticated is false.

  2. Start your sign-in:

    curl -X POST "$CENTRAL_HUB_URL/api/v1/mcp-connections/63/authenticate/init/" \
      -H "X-API-Key: $ALO_API_KEY" \
      -H "X-Space-Slug: $WORKSPACE_SLUG" \
      -H "Content-Type: application/json" \
      -d '{"redirect_uri": "https://your-app.example.com/oauth/callback"}'
  3. Send the user to the returned auth_url. When the server redirects back, send its code and state to POST …/mcp-connections/63/authenticate/callback/; the response is the auth status with authenticated: true.

  4. Fill discovered_tools with POST …/mcp-connections/63/refresh-tools/.

To sign in before the connection exists, send {url, redirect_uri} to POST /api/v1/mcp-connections/authenticate/init/, then {code, state} to POST /api/v1/mcp-connections/authenticate/callback/; pass the returned handle as oauth_handle when you register the server.

Connect a server from the catalog

GET /api/v1/mcp-connections/catalog/ lists the ready-made servers the Connectors page offers:

[
  {
    "key": "intercom_eu",
    "name": "Intercom (EU)",
    "description": "Search conversations, contacts and Help Center articles.",
    "url": "https://mcp.eu.intercom.com/mcp",
    "auth_type": "bearer_token",
    "logo_url": "/images/mcp-catalog/intercom_eu.png",
    "docs_url": "https://developers.intercom.com/docs/guides/mcp"
  }
]
FieldNotes
keyNever changes; send it as connector_key
url, auth_typeWhat to register; auth_type is oauth2, none, bearer_token or basic_auth
logo_urlA path on the web app
docs_urlWhere the vendor issues the key; null when there is none

To connect one, register it with its name, url and auth_type, connector_key set to its key, and the credentials that auth_type needs. For oauth2, sign in first and pass oauth_handle.

Call a tool

  1. Read the connection and pick a tool:

    curl "$CENTRAL_HUB_URL/api/v1/mcp-connections/62/" \
      -H "X-API-Key: $ALO_API_KEY" \
      -H "X-Space-Slug: $WORKSPACE_SLUG"

    Each discovered_tools[].input_schema is what arguments must satisfy. If the list is empty or stale, send POST …/mcp-connections/62/refresh-tools/.

  2. Call it. arguments is optional and defaults to {}:

    curl -X POST "$CENTRAL_HUB_URL/api/v1/mcp-connections/62/call/" \
      -H "X-API-Key: $ALO_API_KEY" \
      -H "X-Space-Slug: $WORKSPACE_SLUG" \
      -H "Content-Type: application/json" \
      -d '{"tool_name": "search_issues", "arguments": {"query": "renewal"}}'
  3. Read result, the tool's output:

    {"result": {"issues": [{"id": "ISS-1", "title": "Renewal overdue (renewal)"}]}}

Rotate credentials

  1. Send the new credentials to PATCH /api/v1/mcp-connections/{connection_id}/. They merge into the stored ones:

    curl -X PATCH "$CENTRAL_HUB_URL/api/v1/mcp-connections/62/" \
      -H "X-API-Key: $ALO_API_KEY" \
      -H "X-Space-Slug: $WORKSPACE_SLUG" \
      -H "Content-Type: application/json" \
      -d '{"credentials": {"token": "…"}}'
  2. A change to url, transport, auth_type or credentials reconnects and refreshes discovered_tools; if that fails, the response is 422 and nothing changes.

Add an MCP server to an agent

Troubleshooting

ResponseCauseFix
404 MCP connection not foundThe ID does not exist, or it is another user's private connectionCheck the ID with GET /api/v1/mcp-connections/
502 MCP tool 'nope' call failed: Unknown tool: nopetool_name is not one of the server's toolsUse a name from discovered_tools; refresh them if stale
502 MCP tool 'search_issues' call failed: Error executing tool search_issues: 1 validation error …arguments do not satisfy the tool's input_schemaFix arguments
422 tool_name is requiredEmpty tool_nameSend a tool name
428 {"code": "PER_USER_AUTH_REQUIRED", "reason": "not_connected", "connector_key": "mcp", "connection_id": 63, …}An oauth2 server you have not connected; reason is needs_reauth when your token expiredConnect your account
422 Couldn't reach 127.0.0.1:1. Check the server is running and the address is right.Create, test or edit could not list the server's toolsFix the URL or credentials
422 Missing MCP credential field: tokenA required credential for the auth_type is emptyAdd it
422 This MCP connection does not use OAuth.authenticate/ on a server whose auth_type is not oauth2Rotate its credentials with PATCH instead
409 Workspace sharing is available after a second member joinsscope_visibility: "space" in a one-member workspaceKeep private or invite a member

On this page