import requests
url = "https://api.datagrid.com/v1/organization/mcp-servers/{server_id}"
payload = {
"name": "<string>",
"base_url": "<string>",
"transport": "http",
"icon_url": "<string>",
"protocol_version": "<string>",
"authorization_secret_id": "<string>",
"authorization": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
base_url: '<string>',
transport: 'http',
icon_url: '<string>',
protocol_version: '<string>',
authorization_secret_id: '<string>',
authorization: '<string>'
})
};
fetch('https://api.datagrid.com/v1/organization/mcp-servers/{server_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.datagrid.com/v1/organization/mcp-servers/{server_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"base_url": "<string>",
"transport": "http",
"icon_url": "<string>",
"protocol_version": "<string>",
"authorization_secret_id": "<string>",
"authorization": "<string>"
}
'{
"object": "mcp_server",
"id": "<string>",
"name": "<string>",
"icon_url": "<string>",
"base_url": "<string>",
"transport": "<string>",
"protocol_version": "<string>",
"authorization_secret_id": "<string>",
"status": "<string>",
"metadata": {
"requires_oauth": true,
"oauth_configured": true,
"tool_count": 123,
"last_synced_at": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"managed_by_app": {
"app_uuid": "<string>",
"app_name": "<string>"
}
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Update MCP server
Update a registered MCP server.
import requests
url = "https://api.datagrid.com/v1/organization/mcp-servers/{server_id}"
payload = {
"name": "<string>",
"base_url": "<string>",
"transport": "http",
"icon_url": "<string>",
"protocol_version": "<string>",
"authorization_secret_id": "<string>",
"authorization": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
base_url: '<string>',
transport: 'http',
icon_url: '<string>',
protocol_version: '<string>',
authorization_secret_id: '<string>',
authorization: '<string>'
})
};
fetch('https://api.datagrid.com/v1/organization/mcp-servers/{server_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.datagrid.com/v1/organization/mcp-servers/{server_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"base_url": "<string>",
"transport": "http",
"icon_url": "<string>",
"protocol_version": "<string>",
"authorization_secret_id": "<string>",
"authorization": "<string>"
}
'{
"object": "mcp_server",
"id": "<string>",
"name": "<string>",
"icon_url": "<string>",
"base_url": "<string>",
"transport": "<string>",
"protocol_version": "<string>",
"authorization_secret_id": "<string>",
"status": "<string>",
"metadata": {
"requires_oauth": true,
"oauth_configured": true,
"tool_count": 123,
"last_synced_at": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"managed_by_app": {
"app_uuid": "<string>",
"app_name": "<string>"
}
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}- rotate endpoint URL (
base_url) - change display name
- set or clear server-level authorization (
authorizationorauthorization_secret_id)
authorization and authorization_secret_id are sent, authorization takes precedence.
Ownership note:
authorizationcreates or rotates a Datagrid-managed secret for this MCP server.authorization_secret_idswitches 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.
curl -X PATCH https://api.datagrid.com/v1/organization/mcp-servers/SERVER_ID \
-H "Authorization: Bearer $DATAGRID_API_KEY" \
-H "Datagrid-Teamspace: $DATAGRID_TEAMSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"authorization": "Bearer rotated-token"
}'
server = client.organization.mcp_servers.update(
"SERVER_ID",
authorization="Bearer rotated-token",
)
const server = await client.organization.mcpServers.update("SERVER_ID", {
authorization: "Bearer rotated-token",
});
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the MCP server.
Body
255The HTTPS URL of the MCP server.
http 64102432Secret ID containing the full Authorization header value to use when calling this MCP server. Set to null to clear.
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.
64000Response
Updated MCP server
mcp_server Secret ID containing the full Authorization header value used for this registered MCP server.
Safe subset of server metadata exposed to API consumers.
Show child attributes
Show child attributes
Present when the MCP server is provisioned and managed by an installed app. Managed servers are read-only through this API.
Show child attributes
Show child attributes