Summary
Implement a unified system for managing connections across all connector types. Each connector (Google, GitHub, MantisHub, etc.) can have 0..N named connections, each with its own credentials and configuration.
Motivation
Currently, connection management is inconsistent:
- GitHub: single token stored as a Cloudflare secret (
GITHUB_TOKEN)
- Google: single OAuth refresh token stored as a secret
- MantisHub: multi-instance support via KV (
instance:<name> keys), managed by mantishub-auth script
As we add more connectors and support multiple accounts per connector (e.g., multiple Google accounts per #3), we need a standard approach rather than ad-hoc solutions per connector.
Requirements
- List connections: View all configured connections across all connector types, showing name, connector type, and which is the default for each type.
- Default per type: Each connector type has one default connection. When a tool call omits the
instance parameter, the default is used.
- Create connection: Add a new named connection for a connector type, with validation (e.g., test the credentials against the API).
- Update connection: Modify an existing connection's credentials or settings.
- Delete connection: Remove a connection by name.
- Consistent storage: All connectors use the same storage pattern (KV-based, like MantisHub's current approach).
- CLI management: A single
bun run connections script (or similar) that manages connections for all connector types, replacing the per-connector auth scripts (github-auth, google-auth, mantishub-auth).
- Agent awareness: Agents can list available connections per connector type so they can present options to the user or auto-select.
Proposed Design
Storage (KV per connector)
Each connector has a CONNECTOR_KV namespace with:
connection:<name> → { name, type, baseUrl?, token?, default, ... }
connections:index → ["name1", "name2"]
This is the pattern MantisHub already uses. GitHub and Google would adopt it.
CLI
A unified bun run connections command:
bun run connections list # List all connections across all types
bun run connections add github # Add a GitHub connection
bun run connections add google # Add a Google connection (OAuth flow)
bun run connections add mantishub # Add a MantisHub connection
bun run connections remove github/myaccount # Remove a specific connection
bun run connections default github/myaccount # Set default for a connector type
Agent Integration
- A
connections_list internal tool (or per-connector tool) that returns available connections.
- Connector skills include connection info in their SKILL.md so agents know what's available.
Relates To
Summary
Implement a unified system for managing connections across all connector types. Each connector (Google, GitHub, MantisHub, etc.) can have 0..N named connections, each with its own credentials and configuration.
Motivation
Currently, connection management is inconsistent:
GITHUB_TOKEN)instance:<name>keys), managed bymantishub-authscriptAs we add more connectors and support multiple accounts per connector (e.g., multiple Google accounts per #3), we need a standard approach rather than ad-hoc solutions per connector.
Requirements
instanceparameter, the default is used.bun run connectionsscript (or similar) that manages connections for all connector types, replacing the per-connector auth scripts (github-auth,google-auth,mantishub-auth).Proposed Design
Storage (KV per connector)
Each connector has a
CONNECTOR_KVnamespace with:connection:<name>→{ name, type, baseUrl?, token?, default, ... }connections:index→["name1", "name2"]This is the pattern MantisHub already uses. GitHub and Google would adopt it.
CLI
A unified
bun run connectionscommand:Agent Integration
connections_listinternal tool (or per-connector tool) that returns available connections.Relates To