Skip to Content
MCPs

Put agent grant

Grant an autonomous agent access to the installed app, or replace its grant.

PUT
/mcps/{mcp_id}/agent-connections/grants/{agent_id}

Grant an autonomous agent access to the installed app, or replace its grant.

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.

Required permission

manage_mcps

Path Parameters

mcp_id*string
Formatuuid
agent_id*string
Formatuuid

Request Body

application/json
  1. body

What an agent may do through the installed app, shaped per vendor and discriminated on provider.

provider*"github"
Value in"github"
repositories?array<string>

Repositories the agent may reach. Required unless all_repositories is set.

Itemsitems <= 500
all_repositories?boolean

Reach every repository the installation covers instead of a list.

vendor_permissions*

Access level per GitHub permission, such as contents or issues.

Response Body

The request has succeeded.

application/json
  1. response

An agent's grant, discriminated on provider.

agent_id*uuid
Formatuuid
provider*"github"
Value in"github"
repositories?array<string>

Repositories the agent may reach. Required unless all_repositories is set.

Itemsitems <= 500
all_repositories?boolean

Reach every repository the installation covers instead of a list.

vendor_permissions*

Access level per GitHub permission, such as contents or issues.

Example Request
curl -X PUT 'https://your-org.aisecurity.services.us.connect.secureauth.com/api/v1/mcps/497f6eca-6276-4993-bfeb-53cbbbba6f08/agent-connections/grants/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "provider": "github",  "vendor_permissions": {    "property1": "read",    "property2": "read"  }}'
Example Response
{  "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",  "provider": "github",  "repositories": [    "string"  ],  "all_repositories": true,  "vendor_permissions": {    "property1": "read",    "property2": "read"  }}