---
title: "List connected accounts for an MCP configuration"
method: POST
path: "/api/v1/mcp/configs/{config_id}/connected_accounts"
tags: ["MCP Configurations"]
---

# List connected accounts for an MCP configuration

`POST /api/v1/mcp/configs/{config_id}/connected_accounts`

## Request

- Base URL: `https://$SCALEKIT_ENVIRONMENT_URL`
- URL: `https://$SCALEKIT_ENVIRONMENT_URL/api/v1/mcp/configs/{config_id}/connected_accounts`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://$SCALEKIT_ENVIRONMENT_URL/oauth/token`
- TypeScript: <https://skmtc.dev/scalekit/apis/scalekit-api-reference/docs/api/v1/mcp/configs/:config_id/connected_accounts/post.ts> (a function with typed inputs; its response is checked against the schema)

Returns the connected account state for each connection in the MCP configuration for the given user identifier. When include_auth_link is true, creates connected accounts on the fly if they do not exist and returns a fresh authentication link per connection. When include_auth_link is false or omitted, returns the current status of existing connected accounts only — no accounts are created and authentication_link is always empty. Authentication links are only present when the connection has an associated key; if the connection has no key, authentication_link is empty regardless of include_auth_link.

## Path parameters

- `config_id` string, required

## Request body

- McpServiceListMcpConnectedAccountsBody
  - `identifier` string, required: Identifier for the end user whose connected accounts to retrieve
  - `include_auth_link` boolean: When true, generates a fresh authorization link for each connection and creates connected accounts if they do not exist. When false or omitted, returns existing connected account status without creating accounts or generating links.

## Response `200`

Connected account state returned for each connection in the configuration

- McpListMcpConnectedAccountsResponse
  - `connected_accounts` McpMcpConnectionAuthState[]: Connected account state for each connection in the configuration
    - `authentication_link` string: Fresh authorization link for the connected account. Empty when include_auth_link is false or when the connection has no associated key.
    - `connected_account_id` string: ID of the connected account for this user and connection
    - `connected_account_status` string: Authentication status of the connected account
    - `connection_id` string: ID of the connection
    - `connection_name` string: Name of the connection
    - `provider` string: Provider identifier for the connection

## Other responses

- `400`: Bad request - config_id or identifier is missing or invalid
- `404`: Not found - no MCP configuration exists with the given config_id

## Changes

- **2026-07-13** `371b89eb40a0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scalekit/apis/scalekit-api-reference/changes/api/v1/mcp/configs/:config_id/connected_accounts/post.md)

---

[API](https://skmtc.dev/scalekit/apis/scalekit-api-reference.md) - [All operations](https://skmtc.dev/scalekit/apis/scalekit-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/scalekit/apis/scalekit-api-reference/revisions/f47f1022d844?raw)
