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. New integrations use logical capabilities resolved server-side; the physical token endpoint remains an administrative compatibility surface.
Provider setup modes
Connections use an authorized project inventory, while provider setup can come from different owners. An OAuth Client is the provider application registration; a Connection is one resulting account authorization. They are deliberately separate records.
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.
Remote MCP onboarding
The MCP catalog is curated rather than inferred from logos or vendor names. Each row reports its actual setup mode and verification state:- OAuth preview means endpoint discovery, protected-resource metadata, PKCE, and client registration were verified, while provider login and a representative tool call still require a provider test account before stable certification.
- Manual setup means bearer or custom-header authentication remains available without browser OAuth.
- Setup required means the provider needs a customer OAuth application, provider approval, or an instance-specific endpoint.
- Conditional means Polpo can implement the protocol, but the provider restricts which hosted clients may connect.
--no-open on headless machines; the CLI still prints the authorization URL. --json never opens a browser.
Organization admins can inspect shared Connections, link each one explicitly to authorized projects, and configure organization-owned OAuth Clients. Project admins can configure project-owned OAuth Clients. Personal and end-user credentials never appear in an unrelated organization inventory. Stored secrets are write-only and are never displayed.
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. Open the agent’s Integrations tab and enable the specific provider actions it may call:
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. The assignment updates the agent capability and its Connection grant atomically. Tools & MCPs then shows the effective runtime tools; it is not a second configuration surface.
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 only for legacy project-scoped integrations. New multi-user tools should
declare logical connections slots and call ctx.connections.require(slot).
Polpo then selects exactly one active Connection from trusted user, tenant,
resource, and scope-epoch context. The client and model cannot select or
replace the physical Connection ID.
Bind a Connection to a non-secret application scope, then grant the custom
tool access to it:
readiness verifies unique resolution without returning the selected
Connection ID or any credential. Use polpo connections grants to inspect
grants and polpo connections revoke-slot <grant-id> to revoke one.
Using Connections from an application backend
Application capabilities let your trusted backend call a provider through Polpo without receiving a token or selecting a physical Connection at runtime. There are two separate contracts:- An administrator maps a logical capability to one Connection, required scopes, and allowed provider operations.
- The application backend invokes only the logical capability with trusted user/tenant/resource context and a provider-relative request.
connectionId, provider, scopes, or surface in the invocation request is rejected. POST, PUT, PATCH, and DELETE require an idempotency key. Responses contain the sanitized provider response, never credentials or the selected Connection ID.
End-user setup
A trusted application backend can create an opaque, short-lived setup session for one immutable external user and resource binding. The browser receives only the setup URL; it cannot change the trusted owner, tenant, site, scopes, or return origin.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:
Organization admins use
/v1/orgs/{orgId}/connect/connections for shared inventory and /v1/orgs/{orgId}/connect/oauth-clients for customer OAuth Client administration.
Reconciliation defaults to dry-run:
[] explicitly revokes all local grants.
OAuth scopes must be changed by reconnecting the provider because changing the stored scope list
does not change the authorization held by an OAuth token. Updating scopes never rotates or returns
the Connection token, app secret, or webhook verify token.
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
mcpServersconfig must not contain raw MCP bearer tokens. - Application runtime requests cannot choose Connection IDs, providers, OAuth scopes, or execution surfaces.
- Unsafe application gateway operations require an idempotency key; audit rows store a policy identifier, status, latency, and sanitized error code rather than payloads or provider paths.