Instance federation
One Long Tail calls another's tools over MCP with a service account the remote issues; neither side shares a database or a login.
The situation
Operations and sales each run their own instance, with their own roles, queues and workflows. A shared instance needs to read operations’ queues and start a workflow there, without merging databases or handing out logins.
The recipe
On the remote, create a service account with only the roles the connection should act under, and mint a key. On the calling instance, register the remote’s /mcp as a server:
curl -X POST https://lt.acme.dev/api/mcp/servers \ -H "Authorization: Bearer $LT_TOKEN" -H 'Content-Type: application/json' \ -d '{ "name": "operations-longtail", "transport_type": "streamable-http", "transport_config": { "url": "https://ops.lt.acme.dev/mcp", "headers": { "Authorization": "Bearer <remote service-account key>" } }, "tags": ["longtail", "operations"], "auto_connect": true }'POST /api/mcp/servers/test-connection lists the tools the remote offers this account; POST /api/mcp/servers/:id/connect connects and caches the list.
The guarantee
The remote decides what the connection can do: it lists only the tools its account’s roles allow, applies the key’s scope, filters every result to the account’s read scope, and records every action as that account. The calling instance decides who may use the connection: calling an external server’s tools directly is a builder capability, and everyone else reaches the remote through deployed workflows with their own invocation roles. Revoking the key on the remote ends the connection on its next call. See MCP.
Related patterns
Agents and MCP
Several environments, one conversation
List local, staging and production as separate MCP servers and name the environment in the prompt; tool names never collide.
Agents and MCP
Scope times role
A key's scope decides read or write; the account's roles decide which tools and which records. Both must pass on every call.
Agents and MCP
A workflow is a tool
A compiled pipeline deploys as an MCP tool, so the next agent that meets the same case calls a deterministic fix instead of reasoning again.
