pydo.mcp_servers.create()
Generated on 1 Oct 2026
from pydo version
v0.43.0
Usage
client.mcp_servers.create(
body={
"serverRef": "docs",
"endpoint": "https://mcp.example.com/mcp",
"transport": "streamable_http",
...,
},
)Description
Registers a remote MCP server for your team, using the streamable HTTP transport. The server starts with syncStatus pending and no tools: discover its tools with POST .../mcp-servers/{server_ref}/resync, then choose which to enable with PUT .../mcp-servers/{server_ref}/tools. The endpoint must be HTTPS and resolve only to public IP addresses. The number of servers per team is limited (10 by default); registering beyond it returns 429. Returns 409 when serverRef is already in use.
Parameters
serverRefstring requiredExample:
docsIdentifier for the server, unique within your team. Must match
^[a-z]`[a-z0-9-]{0,63}$`.endpointstring requiredExample:
https://mcp.example.com/mcpHTTPS URL of the server's MCP endpoint. Its host must resolve only to public IP addresses. Required.
transportstring optionalExample:
streamable_httpOptional.
streamable_http, the default and only accepted value.credentialRefSourcestring optionalHow requests to the server authenticate: none (the default), secret, or connection. With secret, the value from
credentialReforapi_keyis sent in the Authorization header, prefixed with "Bearer " unless it already contains a space.descriptionstring optionalExample:
Internal documentation search.Optional description shown on the server's catalog card. At most 1024 characters.
credentialRefstring optionalFor
credentialRefSourcesecret: a reference to a secret your team stores with DigitalOcean. Must match^[A-Za-z0-9]`[A-Za-z0-9:/_.-]{0,254}$. Set exactly one ofcredentialRefandapi_key`.api_keystring optionalExample:
sk_live_exampleFor
credentialRefSourcesecret: the key or token itself. DigitalOcean stores it; it is write-only and no response returns it. Set exactly one ofcredentialRefandapi_key.oauth_client_idstring optionalRequired for
credentialRefSourceconnection: the client ID of your team's OAuth client for the server. Each user of the server then authorizes individually.oauth_client_secretstring optionalRequired for
credentialRefSourceconnection. Write-only; no response returns it.oauth_authorize_urlstring optionalRequired for
credentialRefSourceconnection: the OAuth authorization endpoint. It must use the endpoint's scheme and port, on the endpoint's host or another host under the same registrable domain.oauth_token_urlstring optionalRequired for
credentialRefSourceconnection: the OAuth token endpoint, under the same rules asoauth_authorize_url.oauth_scopesarray of strings optionalExample:
[]Required for
credentialRefSourceconnection: the scopes to request from each user, 1 to 64 of them.oauth_authorization_ttl_secondsstring optionalExample:
86400How long, in seconds, a user's authorization may be reused before they must consent again. Optional;
0 means 30 days, and the maximum is 100 years.
Authorizations are not refreshed automatically, so this window, not the provider's token lifetime,
decides how often a user is sent back through consent. Set it no longer than the provider's own
token lifetime, so the prompt arrives before a tool call fails against an expired token.
Request Sample
Response Example
More Information
See /v2/action-gateway/mcp-servers in the API reference for additional detail on responses, headers, parameters, and more.