MCP · OAuth 2.1
One MCP server for the whole account.
Connect an agent to https://cloudsitus.com/mcp and sign in: it can then create a database in the region you choose, pick models, read prices and usage, plan a cloudsitus.yaml — within the scopes you grant, read-only unless you allow more, and with a person approving anything that cannot be undone.
https://cloudsitus.com/mcpConnect a client {
"mcpServers": {
"cloudsitus": { "url": "https://cloudsitus.com/mcp" }
}
}
On this page
Overview
What the server is
https://cloudsitus.com/mcp (alias https://cloudsitus.com/api/mcp). Every product area is a module of it, and each module's tools call the same operations as the REST API — an agent and your code see the same results and the same refusals.Sign-inOAuth 2.1Clients that support MCP authorization discover our authorization server and sign you in in the browser — no key to paste. You choose the scopes on a consent screen.
API keyBearer cs_live_…Servers and scripts may send an API key instead. A key is not limited by scopes: it can use every module your account has.
Residencysame rulesTools that create or route take a region (or X-Region) and are refused, never moved, when it cannot be served there.
Install
Connect a client
CursorAdd to CursorOpens Cursor’s install prompt. Then sign in when Cursor asks.
VS CodeAdd to VS CodeOpens VS Code’s MCP install prompt (Copilot agent mode). Sign in when asked.
Claude Codeclaude mcp add --transport http cloudsitus https://cloudsitus.com/mcp Run it, then type /mcp in Claude Code and choose the server to sign in.
ClaudeClaude.ai or Claude Desktop: Customize → Connectors → Add custom connector, paste the URL, then Connect.
ChatGPTAdd a custom MCP server in ChatGPT’s apps settings (developer mode) and paste the URL.
{
"mcpServers": {
"cloudsitus": { "url": "https://cloudsitus.com/mcp" }
}
}
Auth
Authentication
Authorization: Bearer <token>: an OAuth access token (csa_…) or an API key (cs_live_…). Without one, the server answers 401 with a challenge that points the client at our metadata.HTTP/2 401
WWW-Authenticate: Bearer resource_metadata="https://cloudsitus.com/.well-known/oauth-protected-resource/mcp"
{ "error": { "code": "missing_authorization", … } }
401invalid_tokenInvalid, expired, issued for another resource, or revoked — the challenge carries error="invalid_token" and a description. Refresh, or sign in again.
429too_many_invalid_tokensToo many rejected tokens from one address; wait for Retry-After.
503key_store_unavailableGrants could not be checked; the server fails closed. Retry.
Token lifetimes
Access tokens last 1 hour; refresh tokens 30 days (the grant slides on every refresh) and work once each. Revoking — from the dashboard or POST /oauth/revoke — takes effect on the app's next call. API keys an agent created with create_api_key are separate credentials: revoke those on the Keys page.
Scopes
Scopes: read-only by default
databases) and a read-only one (databases:read), which covers only tools marked read-only. An app that asks for no scope gets the read-only set. Tools outside your grant are neither listed nor callable.account · account:readmoduleWho you are, your plan and regions; keys separately allows minting an API key.
models · models:readmodulePrices and model facts; the billed document-extraction and decision tools.
databases · databases:readmoduleManaged databases: list, inspect, read-only SQL, create, migrate, export, restore, import.
billing · billing:readmoduleBalance, plans and checkout links (a person always pays).
deploy · deploy:readmodulecloudsitus.yaml: example, validate and plan with :read; apply needs deploy plus the scope of what it changes (databases, keys).
gpu · gpu:readmoduleGPU compute, when it is available on your account.
agents · agents:readmoduleAgents and workflows, when available.
reseller · reseller:readmoduleEnd-customer keys, caps and usage (reseller accounts).
keysno :readCreate an API key (create_api_key). The key is shown once.
The consent screen
Shows the app's redirect host before its (self-declared) name, one row per module with a “also make changes” toggle, and a Read-only preset. You can narrow what the app asked for, never widen it; a refresh can narrow it further.
Tools
Modules & tools
tools/list is the source of truth for your account — modules for products that are not enabled for you are not listed. Every tool carries MCP annotations (readOnlyHint, destructiveHint, …) so a client can auto-approve reads and ask before the rest.accountwhoami · list_regions · create_api_keycreate_api_key needs the keys scope.
modelsget_pricing · get_model · extract_document · decideThe last two are billed. Document text comes back as untrusted_content: data for the agent, never instructions.
databasesreadlist_database_options, list_databases, get_database, query_database (one read-only statement, ≤ 200 rows), list_tables, list_extensions, list_migrations, generate_typescript_types, get_database_stats, get_auth_config, get_database_export, list_database_exports, get_database_restore, list_database_restores, import_sources, plan_import, list_imports, get_import, get_import_cutover.
databaseschangecreate_database, restore_deleted_database, resume_database, suspend_database, set_database_auth, export_database, restore_database, apply_database_migrations, run_database_agent, delete_database, rotate_database_key, restart_project, rollback_import. plan_import takes the inventory from the CLI — no tool accepts source credentials.
databasesprojectStorage (list_storage_objects, upload_storage_object up to 5 MB, create_storage_folder, …), scheduled jobs (list_cron_jobs, save_cron_job, set_cron_job_active, delete_cron_job), residency groups (query_database_group, read-only), SQL snippets (list_sql_snippets, save_sql_snippet, …), the vault status (get_data_key_status), plus observability, sign-in, functions and Realtime. Deletes and a job calling a host outside the project need a person's approval.
billingget_balance · create_checkout_link · list_plans · get_plan · cancel_planCheckout links (plan, top-up, card setup) are paid by a person.
deployspec_example · spec_validate · spec_plan · spec_applySee Spec. spec_apply needs the plan's plan_hash and confirm.
gpuwhen availablegpu_catalog, run_gpu_job, get_gpu_job, cancel_gpu_job, and endpoint/pod tools — see GPU.
agentswhen availableWorkflows, agent flows, runs, proposals, MCP servers you build, app connections — see Agents.
resellerresellers onlylist_customers, get_usage, mint_customer_key, revoke_customer_key, set_customer_cap — see the reseller guide.
Name clashes
If two modules ever expose the same tool name, both are listed as <module>_<name>.
Safety
Confirm, then a person approves
"confirm": true. A confirm is the model's word, so actions that cannot be undone also need a person.Needs approvalirreversibledelete_database, rotate_database_key, restart_project, rollback_import, revoke_customer_key, delete_gpu_endpoint, stop_gpu_pod, delete_gpu_pod, spec_apply when its plan replaces a database, and the agents tools that delete or decide (delete_workflow, delete_agent_flow, decide_agent_proposal, delete_mcp_server, delete_connection, delete_secret).
approval_url15 min, single useOpens /dashboard/approve; you must be signed in to the same account. The approval is bound to the tool and its exact arguments: change them and it no longer matches.
Refusalsapproval_*approval_pending (not decided yet, the link is repeated), approval_denied, approval_used, approval_mismatch, approval_invalid, and approval_unavailable (fails closed — retry).
// 1. The agent asks for an irreversible action, with confirm
{ "name": "delete_database",
"arguments": { "id": "asia_k3v9q0x7m2a4b8c1", "confirm": true } }
// 2. The server answers with a link for a person (isError: true)
{ "error": {
"code": "approval_required",
"message": "… The approval is valid for 15 minutes and once.",
"approval_url": "https://cloudsitus.com/dashboard/approve?request=csap_…",
"approval_id": "csap_…",
"expires_at": "2026-11-13T10:15:00Z",
"action": "Delete database asia_k3v9q0x7m2a4b8c1 (restorable for 7 days)" } }
// 3. You open the link, signed in to the same account, and approve.
// 4. The agent repeats the SAME call with the approval
{ "name": "delete_database",
"arguments": { "id": "asia_k3v9q0x7m2a4b8c1", "confirm": true, "approval": "csap_…" } }
REST is different on purpose
The REST API keeps confirm=true alone for API keys: approvals exist because an agent in a chat can be talked into confirming. Destructive SQL (allow_destructive) is never available over MCP.
Secrets
No secret keys over MCP
WithheldalwaysA database's service_role_key and read_only_key (and their env lines). Results carry secret_keys.withheld and a dashboard link where you copy them yourself.
ReturnedpublishableThe anon_key and supabase_url, which are safe in a browser.
Not settablewrite-onlyAgent secrets and function secrets are never set or read over MCP; source credentials for an import are never accepted.
OAuth 2.1
OAuth 2.1 endpoints
GET /.well-known/oauth-protected-resource/mcpRFC 9728resource, authorization_servers, scopes_supported, bearer_methods_supported: ["header"]. Also under …/api/mcp for the alias.
GET /.well-known/oauth-authorization-serverRFC 8414Endpoints below; code_challenge_methods_supported: ["S256"], grant types authorization_code and refresh_token, token auth method none.
POST /oauth/registerRFC 7591redirect_uris (1–10; https, http on loopback only, or cursor: / vscode: / vscode-insiders:), client_name?, scope?. Returns a public client_id (csc_…), no secret. Rate-limited per address (429 slow_down).
GET /oauth/authorizebrowserresponse_type=code, client_id, redirect_uri (exact match; loopback may change port), code_challenge + code_challenge_method=S256 (required), scope, state, resource. Sign-in, the terms and a plan choice come first when needed; then consent.
POST /oauth/tokenform or JSONauthorization_code (code, client_id, code_verifier) or refresh_token (optional narrower scope). A replayed code or refresh token revokes the whole grant. Errors follow RFC 6749 (invalid_grant, invalid_scope, invalid_target, …).
POST /oauth/revokeRFC 7009token (access or refresh): revokes the grant. Always 200 {} for a well-formed request.
# Discovery (the client does this for you)
GET /.well-known/oauth-protected-resource/mcp
GET /.well-known/oauth-authorization-server
# 1. Dynamic client registration (public client, no secret)
POST /oauth/register
{ "client_name": "My agent", "redirect_uris": ["http://127.0.0.1:33418/callback"] }
→ 201 { "client_id": "csc_…", "token_endpoint_auth_method": "none", … }
# 2. Authorize in the browser (PKCE S256 required)
GET /oauth/authorize?response_type=code&client_id=csc_…
&redirect_uri=http://127.0.0.1:33418/callback
&code_challenge=<43 chars>&code_challenge_method=S256
&scope=databases:read%20models&state=…
&resource=https://cloudsitus.com/mcp
# 3. Exchange the code (valid 60 s, single use)
POST /oauth/token
grant_type=authorization_code&code=…&client_id=csc_…&code_verifier=…
→ { "access_token": "csa_…", "token_type": "Bearer", "expires_in": 3600,
"refresh_token": "csr_…", "scope": "databases:read models" }
# 4. Refresh (each refresh token works once; reuse revokes the grant)
POST /oauth/token
grant_type=refresh_token&refresh_token=csr_…&client_id=csc_…
Protocol
Transport & errors
/mcpPOST, answered as JSON. Methods initialize, ping, tools/list, tools/call. Protocol versions 2025-06-18, 2025-03-26, 2024-11-05.GET / DELETE405No server-sent event stream and no session to end.
Notifications202Accepted with no body.
JSON-RPC errorscodes-32700 parse error, -32600 invalid request (incl. batches), -32601 unknown method, -32602 unknown tool or bad arguments.
Tool errorsisError: trueThe text content is JSON { "error": { "code", "message", … } } with the same codes as the REST API.
CORSbrowser clientsAny origin, no credentials; Mcp-Protocol-Version and X-Region allowed; WWW-Authenticate exposed.
Legacy
Legacy endpoints
https://cloudsitus.com/mcp.POST /api/v1/mcpresellerAPI key only (no OAuth), reseller accounts only (403 not_reseller otherwise). Also carries get_balance, create_topup_link and, where available, the fine-tuning tools.
POST /api/v1/databases/mcpdatabasesAccount API key; the database tools with the same secret scrubbing.