{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Updates an MCP server's configuration and credentials.","properties":{"path":{"type":"object","properties":{"id":{"description":"Unique identifier for the MCP server.","type":"string","maxLength":32,"minLength":1,"pattern":"^[a-z0-9_]+(?:-[a-z0-9_]+)*$","examples":["my-mcp-server"]},"account_id":{"type":"string","examples":["a86a8f5c339544d7bdc89926de14fb8c"]}},"required":["id","account_id"],"additionalProperties":false},"body":{"type":"object","properties":{"auth_credentials":{"description":"Credential configuration for the upstream MCP server. For auth_type \"bearer\", either a raw token string (e.g. \"sk-abc123\"), which is wrapped server-side as `Authorization: Bearer <token>`, or a JSON-encoded object of the form `{\"headers\":{\"Header-Name\":\"value\",...}}` for custom or multiple static headers (e.g. Cloudflare Access service tokens: `{\"headers\":{\"cf-access-client-id\":\"...\",\"cf-access-client-secret\":\"...\"}}`). For auth_type \"oauth\" with a pre-registered client, send a JSON-encoded object containing `auth_mode:\"manual\"`, `config.authorization_endpoint`, `config.token_endpoint`, and `registration_info.client_id`. Also provide `registration_info.redirect_uris` unless `is_shared_oauth_callback_enabled` is true. Optional fields include `config.issuer`, `config.revocation_endpoint`, `registration_info.scope`, and `registration_info.token_endpoint_auth_method`. Send the client secret in the separate `client_secret` field. Omit `auth_credentials` on update to preserve the existing configuration.","type":"string","examples":["sk-my-bearer-token"]},"client_secret":{"description":"Provides 'client_secret' for a pre-registered OAuth client. This field is accepted on create or update only when 'auth_credentials.auth_mode' is 'manual'. It is required when creating an MCP server with manual OAuth credentials or changing an existing server to use manual OAuth credentials. Omit 'client_secret' on update to preserve the existing secret. Provide a new 'client_secret' to rotate the secret. The secret is never returned by read, create, or update requests.","type":"string"},"description":{"description":"Optional description of the MCP server.","type":["string","null"],"maxLength":512,"examples":["This is one remote MCP server"]},"is_shared_oauth_callback_enabled":{"description":"When true, per-user authorization uses the shared Cloudflare callback URL as the 'redirect_uri' instead of the portal callback URL. The default is false. Set 'is_shared_oauth_callback_enabled' to true to enable the shared Cloudflare callback URL for this MCP server.","type":"boolean","default":false},"name":{"description":"Display name for the MCP server.","type":"string","maxLength":350,"examples":["My MCP Server"]},"secure_web_gateway":{"description":"Route outbound traffic to this MCP server through Zero Trust Secure Web Gateway.","type":"boolean","default":false,"examples":[false]},"updated_prompts":{"description":"Server-wide prompt capability overrides.","type":"array","items":{"properties":{"alias":{"description":"Custom name exposed for the capability.","type":"string","maxLength":40,"pattern":"^[a-zA-Z0-9]+([_-][a-zA-Z0-9]+)*$","examples":["my-custom-alias"]},"description":{"description":"Custom description exposed for the capability.","type":"string"},"enabled":{"description":"Whether the capability is available through the MCP server.","type":"boolean"},"name":{"description":"Name of the tool or prompt capability to override.","type":"string"}},"required":["name"],"type":"object"}},"updated_tools":{"description":"Server-wide tool capability overrides.","type":"array","items":{"properties":{"alias":{"description":"Custom name exposed for the capability.","type":"string","maxLength":40,"pattern":"^[a-zA-Z0-9]+([_-][a-zA-Z0-9]+)*$","examples":["my-custom-alias"]},"description":{"description":"Custom description exposed for the capability.","type":"string"},"enabled":{"description":"Whether the capability is available through the MCP server.","type":"boolean"},"name":{"description":"Name of the tool or prompt capability to override.","type":"string"}},"required":["name"],"type":"object"}}}}},"required":["path"],"additionalProperties":false},"name":"Update an MCP Server","id":"cloudflare.mcp-portals-api-update-servers","example":{"path":{"id":"my-mcp-server","account_id":"a86a8f5c339544d7bdc89926de14fb8c"}},"maxRequests":1,"summary":false}}