Skip to Content
Xeonr Developer Docs
API SpecificationPRIVATEService Accounts

Set Service Account MCP Connection

POST
/xeonr.auth.private.v1.ServiceAccountService/SetServiceAccountMcpConnection

Replaces the MCP gateway connection record of a service account: the products, toolsets and teams it may reach through the gateway. No wildcards; it grants nothing the account does not already hold.

Required scopes: auth:service-accounts:edit (organisation-wide) or auth:apps:edit:own (service accounts of applications owned by a team you are an owner of; never the auth application or an organisation-owned one)

Authorization

BearerAuth
AuthorizationBearer <token>

JWT access token for internal API access. Requires 'private' scope for most endpoints, 'admin' scope for administrative operations.

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

serviceAccount?string

urn:xeonr:auth:uid:service_account:

Length1 <= length
record*

The record a person keeps on an MCP grant. JSON form (as stored): {"type":"xeonr_mcp_connection","teams":[...],"all_teams":false, "products":{"trellis":{"toolsets":["read"]}}}

expectedVersion?|

When set, ABORTED unless the stored version matches; 0 = there must be no record yet. int64.gte = 0

Formatint64
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://auth.xeonr.io/xeonr.auth.private.v1.ServiceAccountService/SetServiceAccountMcpConnection" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{    "record": {}  }'
{
  "version": "string",
  "connection": {
    "grantId": "string",
    "version": "string",
    "subject": "string",
    "clientId": "string",
    "clientName": "string",
    "configured": true,
    "products": [
      {
        "key": "string",
        "name": "string",
        "audience": "string",
        "toolsets": [
          "string"
        ],
        "scopes": [
          "string"
        ],
        "teams": [
          {
            "urn": "string",
            "slug": "string",
            "name": "string"
          }
        ],
        "description": "string",
        "toolsetTeams": [
          {
            "toolset": "string",
            "teams": [
              "string"
            ]
          }
        ],
        "resources": [
          {
            "type": "string",
            "identifier": "string",
            "actions": [
              "string"
            ]
          }
        ]
      }
    ],
    "unavailable": [
      {
        "product": "string",
        "toolset": "string",
        "reason": "string",
        "scopes": [
          "string"
        ],
        "team": "string"
      }
    ],
    "subjectKind": "string"
  }
}