Overview
The Model Context Protocol (MCP) is an open standard for connecting agents to external tools and data sources. Allternit supports MCP in three ways:- MCP connectors — a persisted catalog of remote MCP servers.
- Attached MCP servers — live JSON-RPC proxies that register their tools into the Allternit dispatcher.
- Allternit as an MCP server — expose the native tool belt to external MCP clients.
Base URL
All MCP routes are mounted under:Tool naming
Tools from an attached MCP server are namespaced under the server ID to avoid collisions:Authentication
- Connector and attached-server REST routes use the standard Allternit session.
- The
/mcp/serverJSON-RPC route also accepts optional tunnel-auth headers for mTLS/OAuth-gated deployments:x-allternit-tunnel-idx-allternit-client-cert-thumbprintx-allternit-oauth-issuerx-allternit-oauth-audience
Tunnel authentication
When a request to/mcp/server includes x-allternit-tunnel-id, the gateway loads the tunnel’s auth policy and enforces any configured checks. The policy is fail-closed: if a check is configured but not satisfied, the request is rejected with JSON-RPC error -32001.
Issuer comparison is case-insensitive and ignores a trailing slash. If no audience is configured, any audience is accepted.
REST endpoints
List connectors
Create a connector
Test a connection
Attach a server
Attaching a server initializes an MCP session, fetches its tool catalog, and caches it in the dispatcher.List attached servers
Detach a server
OAuth callback
The OAuth callback route renders an HTML result page. It is called by the OAuth provider after the user authorizes a connector. The handler exchanges the authorization code for tokens when a token endpoint is discoverable.MCP server surface
Allternit can also expose its tool registry as an MCP server at/mcp/server. The endpoint speaks JSON-RPC over plain HTTP POST. It supports single requests (not batches) and is stateless.
Methods
Initialize
List tools
Call a tool
., the dispatcher first tries the attached MCP server namespace; otherwise the native tool executor is used. Errors are returned with isError: true rather than a JSON-RPC error object.
Bundled vs remote servers
For production deployments, prefer remote MCP servers with tunnel-based authentication.