# Oauth Connections MCP Tools

> The MCP tools the SOAT server exposes for the Oauth Connections module, with the arguments each tool takes.

# Oauth Connections

MCP tools for the Oauth Connections module. See the [Oauth Connections module docs](/docs/modules/oauth-connections) for permissions and data model.

### `list-oauth-connections`

List OAuth connections

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `project_id` | `string` | no | Project ID (required if not using project key auth) |
| `actor_id` | `string` | no | Only this actor's connections |
| `oauth_client_id` | `string` | no | Only connections through this OAuth client |
| `limit` | `number` | no | Results per page. Above the maximum it is clamped; below 1 or not an integer it is `400 VALIDATION_FAILED`. |
| `cursor` | `string` | no | The previous page's `next_cursor`; omit it for the first page. Send it with the same filters as the request that returned it: a malformed cursor, or one sent with other filters, is `400 INVALID_CURSOR`. |

### `create-oauth-connection`

Start an OAuth connection

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `oauth_client_id` | `string` | yes | The OAuth client to connect through. |
| `actor_id` | `string` | yes | The actor the grant is for. |
| `return_url` | `string` | no | Where the callback redirects the person's browser when it completes, with `oauth_connection_id` and `status` (`connected` or `failed`) added to its query. |

### `complete-oauth-connection`

Complete an OAuth connection

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `state` | `string` | no | The `state` of the authorize URL |
| `code` | `string` | no | The authorization code |
| `error` | `string` | no | The provider's refusal, such as `access_denied` |
| `error_description` | `string` | no | The provider's refusal, in words |
| `error_uri` | `string` | no | Sent by some providers with a refusal; ignored |
| `scope` | `string` | no | Sent by some providers; ignored |
| `iss` | `string` | no | Sent by some providers (RFC 9207); ignored |

### `get-oauth-connection`

Get an OAuth connection

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `oauth_connection_id` | `string` | yes | OAuth connection ID |

### `delete-oauth-connection`

Delete an OAuth connection

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `oauth_connection_id` | `string` | yes | OAuth connection ID |
