API Reference
Core of connectors API consists of the following endpoints:| Endpoint | Purpose |
|---|---|
POST /api/v1/connectors | Create a connector |
GET /api/v1/connectors | List all connectors |
GET /api/v1/connectors/{id} | Read a connector |
DELETE /api/v1/connectors/{id} | Delete a connector |
POST /api/v1/connectors/{id}/connect | Connect a connector |
POST /api/v1/connectors/{id}/disconnect | Disconnect a connector |
/api/v1/connectors/{id}/mcp endpoint. For example, to inspect a connector using MCP Inspector:
| Endpoint | Purpose |
|---|---|
GET /api/v1/connectors/presets | List connector presets |
Lifecycle
Following diagram illustrates the lifecycle of a connector: Usual flow works as follows:- Create: Client creates a connector by calling
POST /api/v1/connectorswith MCP server URL. - Connect: Client initiates connection by calling
POST /api/v1/connectors/{id}/connect.- For OAuth-enabled servers: The response will contain an authorization URL for the user to complete authentication
- For token-based authentication: Provide an
access_tokenin the connect request body (see Authentication)
- Authorize (OAuth only): User visits the authorization URL, authenticates and grants access. Authorization server redirects the user back to the platform with an authorization code.
- Complete: Platform exchanges the authorization code for access and refresh tokens (OAuth) or stores the provided access token. Once completed, the connector is in
connectedstate and ready to be used.
Authentication
Connectors support two authentication methods:OAuth (External MCP Servers)
For MCP servers that support OAuth, the platform handles the full authorization code flow. No additional configuration is needed in the connect request.Token-based Authentication
For MCP servers that use simple token-based authentication, provide the token when connecting:- External HTTP/HTTPS MCP servers: Token is sent as a Bearer token in the
Authorizationheader for all requests - Managed stdio MCP servers: Token is injected as an environment variable in the container (requires
accessTokenEnvNamein preset configuration)
Error handling
The connectors API endpoints return standard HTTP status codes in responses. Apart from that, there are two additional mechanisms used by connectors API to relay errors to the client.Authorization Code Flow
An error may happen during the authorization code flow as described in RFC6749 Section 4.1. When noredirect_url has been provided by the client during connection initiation, the server responds with a HTML page containing the error. Otherwise, the user will be redirected to redirect_url instead. The error and error_description query parameters will be included in the redirect.
Disconnection
Connector can be asynchronously disconnected at any time. This can happen for various reasons including intentional disconnect, refresh token expiration or an arbitrary error. The client MAY check for thedisconnected state and read disconnect_reason to read the description of what happened.
Connector Presets
Connector presets provide pre-configured settings for common MCP servers, simplifying the connector creation process. Presets can include:- URL: The MCP server endpoint (supports
http://,https://, andmcp+stdio://schemes) - Client credentials: Pre-configured OAuth
client_idandclient_secretfor public clients - Metadata: Display information such as name and description
- Stdio configuration: For
mcp+stdio://URLs, container image and runtime settings for managed MCP servers
Available Presets
The platform comes with several built-in presets:| MCP Server | URL | Description |
|---|---|---|
| Stripe | https://mcp.stripe.com | Payment processing and financial infrastructure tools |
| Box | https://mcp.box.com | Search, access and get insights on your Box content |
| GitHub | https://api.githubcopilot.com/mcp | Access and interact with your GitHub repositories and code intelligence |
Using Presets
When creating a connector withPOST /connectors, the system automatically matches the provided URL against available presets (this behavior is controlled by the match_preset parameter, which defaults to true). If a match is found:
- Client credentials: If no
client_idis provided in the request, the preset’s credentials are used automatically - Metadata: If no metadata is provided in the request, the preset’s metadata (name, description) is used
match_preset: false in the request.
Configuring Presets
Connector presets are configurable via Helm values when deploying Agent Stack. The presets are defined in theconnector.presets section of values.yaml:
Remote MCP Servers (HTTP/HTTPS)
For MCP servers accessible over HTTP/HTTPS with Streamable HTTP transport:Managed MCP Servers (stdio)
For MCP servers that use stdio transport, Agent Stack can manage them as Kubernetes deployments using themcp+stdio:// scheme. The platform automatically:
- Deploys the MCP server as a Kubernetes pod with a sidecar container running supergateway
- Exposes the stdio MCP server over Streamable HTTP transport via supergateway
- Manages the deployment lifecycle (creates on connect, deletes on disconnect)
- Handles authentication tokens via environment variables
- MCP Server Container: Runs your stdio-based MCP server
- Supergateway Sidecar: Wraps the stdio interface and exposes it as Streamable HTTP at port 8080
- Creates a Kubernetes Deployment with both containers
- Creates a Kubernetes Service to expose the supergateway
- Waits for the deployment to become ready (up to 60 seconds)
- Proxies MCP requests to the managed service
- If an
accessTokenwas provided in the connect request and the preset definesaccessTokenEnvName, injects the token as an environment variable
Configuration Details
The presets are injected into the platform via theCONNECTOR__PRESETS environment variable, which is populated from a Kubernetes Secret created by Helm. This allows administrators to:
- Add custom MCP server presets for their organization (both remote and managed)
- Modify or remove default presets
- Configure client credentials for remote MCP servers with OAuth
- Configure stdio container images and settings for managed MCP servers
- Customize metadata (names, descriptions) for better user experience