---
title: "Grants"
description: "The grants endpoints of the HTTP API."
---

> Documentation Index
> Fetch the complete documentation index at: https://slashobserve.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Grants

## GET /me/grants

List the MCP clients the signed-in person has connected.

Newest first, live connections only: a disconnected or expired one is not listed. `client.name` is the name the client registered under and is not verified, and null when it registered none. `redirect_host` and `local` describe the client's first registered redirect URI. `last_used_at` is null until the client first uses an access token. Only signed-in people may call it: a service-account key gets 403 `forbidden`.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `limit` | query | `integer` | Between 1 and 200. Default `50`. |
| `cursor` | query | `string` |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | One page of connected agents. | [`ConnectedAgentList`](/docs/reference/api/schemas/#connectedagentlist) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## PATCH /me/grants/{id}

Set how one of the signed-in person's MCP clients makes changes.

`direct` is the default; `propose` makes the agent's dashboard writes proposals that someone who can edit merges. The mode applies from the agent's next request. Another person's connection, a connection already disconnected and one that does not exist all answer 404 `not_found`. Only signed-in people may call it: a service-account key gets 403 `forbidden`, so no agent changes its own mode.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Request body

`application/json`, required.

A [`UpdateConnectedAgentRequest`](/docs/reference/api/schemas/#updateconnectedagentrequest) object.

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | The connection with its new mode. | [`ConnectedAgent`](/docs/reference/api/schemas/#connectedagent) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## DELETE /me/grants/{id}

Disconnect one of the signed-in person's MCP clients.

The client's access and refresh tokens stop working at once and the client must be approved again. Another person's connection, a connection already disconnected and one that does not exist all answer 404 `not_found`. Only signed-in people may call it: a service-account key gets 403 `forbidden`.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `204` | The connection is disconnected. |   |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## GET /grants

List every person's connected MCP clients.

Admin only. Same shape and order as the signed-in person's own list, with every person's live connections. Service accounts cannot call it.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `limit` | query | `integer` | Between 1 and 200. Default `50`. |
| `cursor` | query | `string` |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | One page of connected agents. | [`ConnectedAgentList`](/docs/reference/api/schemas/#connectedagentlist) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## DELETE /grants/{id}

Disconnect any person's MCP client.

Admin only. The connection's tokens stop working at once, and the person can connect the client again. A connection already disconnected or that does not exist answers 404 `not_found`. Service accounts cannot call it.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `204` | The connection is disconnected. |   |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new).
