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:
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
- Open a project.
- Go to Connections.
- Choose a provider.
- Complete the OAuth flow, save an API-key connection, or add a remote MCP server URL.
- Use the connections list to inspect status, scopes, owner, and whether a secret exists.
- 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 throughallowedTools:
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:
- Create or reuse a Connection.
- Grant a specific agent access to a specific connection-backed tool.
- Runtime resolves only the matching connection for that tool call.
- Connect a new MCP server or reuse an existing MCP Connection.
- Discover the server’s tools.
- Enable only the discovered tools the agent should call.
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_urlstores 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_listexpose non-secret connection metadata to builders and external MCP clients. They are not a backdoor for token access.
mcp_url when the integration is already exposed as a remote MCP server.
API
Connections are project-scoped:
Example API-key connection:
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
mcpServersconfig must not contain raw MCP bearer tokens.