Skip to main content
PATCH
Python
Updates a registered MCP server. Common uses:
  • rotate endpoint URL (base_url)
  • change display name
  • set or clear server-level authorization (authorization or authorization_secret_id)
Datagrid automatically attempts a tool re-sync when MCP connectivity/auth fields are updated. If both authorization and authorization_secret_id are sent, authorization takes precedence. Ownership note:
  • authorization creates or rotates a Datagrid-managed secret for this MCP server.
  • authorization_secret_id switches the server to an existing caller-managed secret reference.
  • Clearing auth removes the MCP server’s reference. Datagrid only auto-deletes secrets that it created from authorization.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

server_id
string
required

The ID of the MCP server.

Body

application/json
name
string
Maximum string length: 255
base_url
string<uri>

The HTTPS URL of the MCP server.

transport
enum<string> | null
Available options:
http
Maximum string length: 64
icon_url
string | null
Maximum string length: 1024
protocol_version
string | null
Maximum string length: 32
authorization_secret_id
string | null

Secret ID containing the full Authorization header value to use when calling this MCP server. Set to null to clear.

authorization
string | null

Raw Authorization header value (for example, 'Bearer '). Datagrid stores it as a secret and links it to this server. Set to null to clear. If both authorization and authorization_secret_id are provided, authorization takes precedence.

Maximum string length: 64000

Response

Updated MCP server

object
enum<string>
required
Available options:
mcp_server
id
string
required
name
string
required
icon_url
string | null
required
base_url
string<uri>
required
transport
string
required
protocol_version
string | null
required
authorization_secret_id
string | null
required

Secret ID containing the full Authorization header value used for this registered MCP server.

status
string
required
metadata
object | null
required

Safe subset of server metadata exposed to API consumers.

created_at
string<date-time>
required
updated_at
string<date-time>
required