albus
Skip to Content
DevelopersStart building

MCP protocol reference

Authentication, transport behavior, and deployment limits for albus’s HTTP MCP endpoint.

View Markdown

Use the MCP setup guide to connect a client. This page is for people operating albus or building an MCP client.

Endpoint and authentication

The HTTP endpoint is /api/mcp. Every request requires a bearer token that albus can resolve to an authenticated user. Tools make internal API requests as that user, so workspace permissions still apply.

OAuth clients discover albus’s authorization server, register a public client, and use the authorization code flow with PKCE (S256). The user must approve the connection in albus. The token endpoint supports the authorization-code grant; it does not advertise a refresh-token grant.

The discovery URLs at the public API origin are:

  • /.well-known/oauth-protected-resource/api/mcp
  • /.well-known/oauth-authorization-server/api

The API also serves these under /api/.well-known/. Preserve discovery routes as well as /api/mcp when configuring your reverse proxy.

Supported transports

Client flowalbus behavior
MCP 2026-07-28A fresh server handles each request. No protocol session is retained between requests.
Legacy HTTP flowThe client sends initialize, but albus returns no Mcp-Session-Id. A fresh server handles each POST.
Local stdioThe separate @kaneo/mcp package uses device authorization and communicates with the albus API.

Let your client negotiate its supported protocol. No albus environment switch is needed to choose between HTTP protocol versions.

Neither HTTP flow needs session affinity. A request can reach any API replica, including after a replica restarts. albus accepts Mcp-Session-Id headers issued by older versions on authenticated POSTs, but does not retain their session state. OAuth registration and pending authorization state are stored in PostgreSQL and shared between API replicas.

Reverse proxy and internal requests

Forward the client’s authorization, content type, and MCP headers unchanged. Allow streaming responses for clients that use them.

HTTP MCP tools reach albus’s API through KANEO_INTERNAL_API_URL, which defaults to http://127.0.0.1:1337. This is a server-side address, separate from the public URL used for discovery and sign-in. Set it only when that loopback address does not reach the API from its own process.

Troubleshooting

ResponseWhat to check
401Complete OAuth sign-in again and check that the proxy forwards the bearer token.
405The HTTP MCP endpoint accepts POST requests; standalone GET streams and DELETE requests are unsupported.
408Send the complete request body within five seconds.
413Reduce the request body. MCP HTTP accepts at most 1 MiB.
415Send JSON with the correct content type.
429Wait for Retry-After before retrying.

A tool can also fail because the user lacks permission or its arguments do not match the project. Call list_project_columns before assigning a status and list_workspace_members before assigning a user.

MCP request limits

Both HTTP protocol flows accept request bodies up to 1 MiB (1,048,576 bytes), measured from the received bytes rather than trusting Content-Length. The body must arrive within five seconds. Each tool call accepts up to 10,000 combined object keys and array elements across its arguments, including nested values. Calls above that budget return a tool result with isError: true without calling the albus API. These limits apply to the HTTP endpoint, not the separate stdio package.

OAuth request limits

The HTTP OAuth endpoints accept bodies up to 32 KiB and URLs up to 8 KiB. Client registration accepts at most 10 redirect URIs. Request bodies must arrive within five seconds. Each API process allows up to 16 concurrent requests in each of the registration, authorization, and token endpoint groups.

Instances sharing a database also share OAuth storage and issuance limits:

StateStored entriesNew entries per minutePending entries per client
Registered clients1,00060Not applicable
Authorization requests10,00030020
Authorization codes10,00030020

When capacity is exhausted, the endpoint returns HTTP 429 with Retry-After. Clients should wait before retrying. Existing, unexpired entries are retained; an approval that cannot issue a code leaves its authorization request available for retry until it expires. Expired entries are cleaned up in bounded batches when new state is created, so a previously oversized store may need multiple attempts before accepting new entries. These limits complement reverse-proxy connection and request limits for internet-facing installations.