Pi Durable Platformdocs
ReferenceMCP servers

Change any MCP server, who it is published to, or turn it off (platform admins)

PATCH
/v1/admin/mcp-servers/{serverId}

A team's own server stays proxy-only and its team's only (400 team_mcp_visibility for visibility all, teams, or personal true), and a new URL is checked by the address guard (422 address_not_allowed).

Path Parameters

serverId*string
Formatuuid

Header Parameters

If-Match*string

The resource's revision, as returned in ETag (for example "3"). Missing returns 428; stale returns 412.

Request Body

application/json
  1. body
name?string
Lengthlength <= 100
description?string
Lengthlength <= 2000
url?string
Lengthlength <= 2048
headers?

Replaces every header ({} removes them)

accessMode?string
Value in"proxy""direct"
visibility?string
Value in"all""teams"
personal?boolean

Available in personal workspaces (when created, defaults to visibility = all)

teams?array<string>
enabled?boolean

Response Body

Updated server

application/json
  1. response
data*
curl -X PATCH 'https://agents.example.com/v1/admin/mcp-servers/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'If-Match: string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "slug": "string",    "description": "string",    "url": "string",    "accessMode": "proxy",    "enabled": true,    "visibility": "all",    "personal": true,    "teams": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "slug": "string",        "name": "string"      }    ],    "hasHeaders": true,    "tools": [      {        "name": "string",        "title": "string",        "description": "string"      }    ],    "toolsRefreshedAt": "2019-08-24T14:15:22Z",    "toolsError": "string",    "team": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "slug": "string",      "name": "string",      "kind": "team"    },    "revision": 0,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}