Connector tools load on demand
When a turn would mount more than 30 connector tools, none are mounted until the agent searches withconnector_search and loads the ones it needs. They keep their normal permissions. See Connector tools.
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.
Building an MCP server or an MCP App for other people to install? See Plugins & MCP Apps.
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 reads tunnel-auth headers for mTLS/OAuth-gated deployments. Only the Allternit gateway (the mTLS terminator in front of/mcp/server) may set them:x-allternit-tunnel-id(and any otherx-allternit-tunnel-*header)x-allternit-client-cert-thumbprintx-allternit-oauth-issuerx-allternit-oauth-audience
Tunnel authentication
/mcp/server is open to any signed-in user, so the API does not believe tunnel headers on their own. They count only when the same request also carries the internal service token in x-allternit-internal-token (the shared secret ALLTERNIT_INTERNAL_SERVICE_TOKEN, which only the gateway holds).
- Tunnel headers without the internal token: the request is refused with HTTP
401and JSON-RPC error-32001, messagetunnel headers are set by the gateway only. This applies even when the forged values would match the policy, and even whenx-allternit-tunnel-idis left out. - Tunnel headers with the internal token: the API loads the policy for
x-allternit-tunnel-idand enforces every configured check. If a check is configured but not satisfied, the request is refused with401and-32001(MCP tunnel auth failed: <reason>). - No tunnel headers: nothing changes. The request runs as the signed-in user, with the usual OAuth connector scoping, so existing attachments keep working.
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
The server speaks MCP 2026-07-28 (stateless: the version rides in each request’s
_meta, no initialize) and the older handshake versions on the same endpoint. See MCP servers API: protocol versions.
Initialize (legacy clients)
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.
Reporting a problem with a tool
POST /api/v1/mcp/connectors/:id/feedback with { "tool": "<name>", "message": "<optional>" } forwards the report to the server’s own submit_feedback tool and returns { "ok": true }. Allternit stores nothing. A server that does not list submit_feedback gets 422 with { "error": "feedback_unsupported" }, and the app hides “Report a problem” for it.
Error codes
Typed results
A server can declare an output schema for a tool and returnstructuredContent next to the text. Allternit keeps that object with the tool result, so the chat shows it as labelled values or, for a list of objects, a small table instead of raw JSON. In the Gizzi terminal app an object shows as aligned key and value lines, and a list of objects as a table of at most 10 rows followed by “+N more”. Results without structuredContent look the same as before. The model still reads the text content.
When a server also supports feedback, the chat offers a report link on that tool’s result. Servers that do not support it show no link.
Related pages
Long-running tasks and server questions on Android
The Android app draws the same two cards as iOS and the web app, inline under the assistant reply:- Task card. The thinking orb, the task title, a status line (“Running · 0:42”, “Needs your input”, “Done”, “Failed”, “Stopped”) and a beam that fills with progress, or sweeps while the length is unknown. Stop cancels the task on its server. A failed task shows the server’s error text.
- Question form. When an MCP server asks something, the card shows the server’s name, the question and the requested fields (text, number, yes or no, choice). Send answers, Decline refuses. A server that asks for a URL gets Open page (https or http only), then Done. A form that asks for a password, key or token is never filled in the app: the card points to the server’s own sign-in page and offers only Decline.
mcp.tasks to false in shared_prefs/allternit_flags.xml.
Apps shelf, share list and home-screen shortcut on Android
MCP Apps has an Apps tab next to Installed, Discover and Build. It matches iOS:- Made by you / your org and From a connected server: one card per app with its icon, name, who made it (You, Your org, Shared with you) and its permission tier (Browser, App, Full). An installed app has Open, Pin or Unpin, Add to home screen and Remove. An app not installed yet has Install, which shows what the tier allows and installs only after you tap Install. If a later version asks for more access, the sheet comes back with the new access listed.
- Open asks the server for a one-time sign-in handoff and loads that page; if that fails it loads the app’s plain link. Vendor apps open their link directly. Only https pages on allternitusercontent.com and ai.allternit.com load.
- Your links: each share link shows Hosted or Live from your computer, Copy link, Pause or Resume, and Stop (after a confirmation).
- Add to home screen asks the launcher to pin a shortcut with the app’s icon. Tapping it opens the app in its own screen.
apps.shelf to false in shared_prefs/allternit_flags.xml.
Skills from MCP servers
A server can publish skills asskill:// resources, and mcp.allternit.com adds a load_skill tool so the agent can load them on a turn. See Skills from your servers and MCP skills API.