Skip to main content
Connections let a project authorize external systems once, then expose that access to agents and tools without putting tokens in prompts, loop JSON, or source code. Use Connections for external integrations such as GitHub, Slack, Google Drive, Telegram, Discord, WhatsApp, remote MCP servers, or API keys. The Secrets Vault is a legacy compatibility surface for existing agent-scoped secrets. Polpo provides the OAuth callback, encrypted token storage, refresh path, scope metadata, and runtime token resolution. A hosted product can provide managed provider apps; an independently operated instance can configure its own provider apps and callback URLs.

Connections vs Vault

Connections store non-secret metadata separately from encrypted tokens and API keys. List APIs, MCP metadata tools, and the dashboard never return stored secret values. The authenticated token endpoint is a separate runtime operation that returns a scoped token to trusted callers.

Provider setup modes

Connections use one project-level inventory, but provider setup can come from different owners: In OAuth modes, end users should not paste OAuth tokens into chat. The dashboard starts the OAuth flow and the server stores the resulting token encrypted. OAuth providers redirect to a single server callback:
For self-hosting, set POLPO_CONNECT_CALLBACK_URL to the exact callback URL registered in the provider console. Google and most OAuth providers require the callback URI to match exactly, including scheme, host, path, and trailing slash.

Supported providers

Polpo currently ships these provider definitions: Independent deployments configure OAuth provider apps with environment variables: Optional URL settings:

Dashboard flow

  1. Open a project.
  2. Go to Connections.
  3. Choose a provider.
  4. Complete the OAuth flow, save an API-key connection, or add a remote MCP server URL.
  5. Use the connections list to inspect status, scopes, owner, and whether a secret exists.
The dashboard can create and revoke connections. It never displays stored tokens. Provider cards show how the connection is configured:
  • Managed app: the hosted platform owns the provider app and users can connect immediately.
  • OAuth: the instance owns the provider app and users can connect immediately.
  • Setup required: an admin must configure provider client id/secret before users can authorize.
  • MCP: the project connects a remote MCP server.
  • Channel: the project stores bot/channel credentials.

Using connections from agents

Connections do not automatically grant every agent access. Enable the specific runtime actions in the agent’s Tools tab or through allowedTools: At runtime, these tools resolve the project Connection server-side. The model receives the action result, not the OAuth token or API key. Connection tools should be assigned explicitly instead of via provider wildcards. That keeps each granted action visible in the agent configuration and audit trail. If a project has exactly one active connection for a provider, the tool can omit connectionId. If there are multiple active connections for the same provider, pass connectionId explicitly. Connections can also be granted to one agent/tool pair. Grants make the runtime permission boundary explicit and auditable:
  1. Create or reuse a Connection.
  2. Grant a specific agent access to a specific connection-backed tool.
  3. Runtime resolves only the matching connection for that tool call.
For remote MCP servers, open the agent’s Integrations tab:
  1. Connect a new MCP server or reuse an existing MCP Connection.
  2. Discover the server’s tools.
  3. Enable only the discovered tools the agent should call.
The agent stores a non-secret MCP server reference and explicit allowedTools entries such as mcp__linear__list_issues. Runtime resolves the connection secret server-side immediately before opening the MCP client. Custom tools use the same Connection inventory through ctx.connections. Use ctx.connections.getToken("provider_or_connection_id") or ctx.connections.getHeaders("provider_or_connection_id") inside defineTool code instead of storing secrets in source, loop JSON, or prompts.

Builder and MCP behavior

Builder and MCP clients can inspect connection availability, but they cannot create secrets in a transcript. If a user asks the builder to add GitHub, Slack, Drive, MCP, or an API-key credential, it should list provider status and navigate the user to Connections or the agent Integrations tab. It should not ask the user to paste tokens into chat.

How this relates to MCP

Connections are independent from MCP, but they can power MCP use cases:
  • MCP as a provider: mcp_url stores a remote MCP server URL and optional bearer credential so Polpo can discover and call tools through the same connection inventory.
  • OAuth providers: GitHub, Slack, and Google Drive use OAuth directly; they do not require MCP.
  • Polpo MCP tools: tools such as polpo_connections_list expose non-secret connection metadata to builders and external MCP clients. They are not a backdoor for token access.
In practice: use OAuth/API-key Connections for provider credentials; use mcp_url when the integration is already exposed as a remote MCP server.

API

Connections are project-scoped: Example API-key connection:
Example remote MCP connection:
Discover tools from that server:
Example non-secret list response:

Security model

  • Tokens and API keys are encrypted before storage.
  • Public connection records include hasSecret, not the secret value.
  • OAuth state is project-scoped and expires automatically.
  • MCP tools are read-only for connection metadata.
  • Secret creation happens in the dashboard or through authenticated API calls, not through LLM chat.
  • Agent prompts, transcripts, traces, and mcpServers config must not contain raw MCP bearer tokens.