Tokay MCP

Connect your AI agent to Tokay so they can upload code, deploy apps, recover failures, inspect usage, and keep working on the same repository later.

Last updated

AI agent? Start with llms.txt.

Connect

Add this remote Streamable HTTP endpoint to your MCP client.

https://mcp.tokay.io/mcp

Connecting opens a browser for OAuth approval. You do not paste an API token into the client. Every connection is listed separately under Connected apps and can be disconnected without affecting another installation.

Client Setup
Claude Add a custom connector with the Tokay endpoint and complete OAuth
ChatGPT A workspace admin adds a custom MCP app, scans the tools, and completes OAuth
VS Code Add an HTTP server in mcp.json with the Tokay endpoint

VS Code can use this workspace or user configuration.

{
  "servers": {
    "tokay": {
      "type": "http",
      "url": "https://mcp.tokay.io/mcp"
    }
  }
}

What your agent can do

  • Deploy an app from a small inline project or a large repository archive.
  • Return later, find the exact repository snapshot, search it, read files, make a conflict safe change, and deploy again.
  • Follow Tokay's authoritative deployment readiness instead of guessing from time or logs.
  • Resolve configuration, database, source, and release blockers through named tools.
  • Diagnose a failed build or deployment with bounded evidence and logs.
  • Report current VM capacity and the share used by a Project, Service, or managed database.
  • Create workspaces, choose Plans, and manage funding when the connection has that permission.
  • Run a bounded read only query against a managed database when the connection has that permission.
  • Use the rest of the public GraphQL surface through a read tool and a fail closed routine mutation tool.

MCP is the workflow surface

MCP carries decisions, metadata, bounded source text, and structured results. It does not carry repository archives, database dumps, or service file bytes through the model context.

Large bytes use short lived capability URLs. Your agent asks Tokay for an upload or download URL, transfers the bytes over ordinary HTTP without an OAuth bearer, then continues the workflow with the returned handle. This keeps a large repository faithful without turning it into thousands of tool arguments.

Clients that need arbitrary GraphQL or REST calls can authorize the separate https://api.tokay.io resource and use the public API directly. Tokay MCP tokens are accepted only at https://mcp.tokay.io/mcp.

Tokay MCP and an MCP hosted on Tokay

Tokay MCP An MCP app you deploy on Tokay
Manages Tokay Projects, repositories, Services, resources, and deployments Exposes the tools your application owns
Uses a Platform OAuth token for the MCP audience Uses Tokay Access OAuth or a Project Machine credential at the deployed app
Runs in Tokay's control plane Runs as normal user code on your Tokay VM
Never passes its bearer to your app Never receives authority to manage Tokay unless you deliberately add it

See Deploy an MCP server when the product you are hosting is itself an MCP server.

Permissions

The first connection requests the bundle below. It covers everything from uploading source to recovering a failed deploy.

Action Why it is requested
WORKSPACE_CREATE_REPO Create a managed repository for uploaded code
WORKSPACE_CREATE_PROJECT Create the Project that owns the app
REPO_WRITE Commit source changes
PROJECT_WRITE Configure Services and nonsecret Project Config
PROJECT_WRITE_SECRETS Store a secret value without reading it back
PROJECT_DEPLOY Start or resume a deployment
PROJECT_LOGS Diagnose and verify a failed deployment

Logs can contain application data or personal information. Tokay includes PROJECT_LOGS because deployment and recovery are one workflow. Diagnosis returns state and explanation first and includes bounded log bodies only when requested.

Database queries, exports, service file writes, access policy changes, workspace funding, permanent deletion, and other elevated actions stay outside this initial bundle. Workspace creation and Plan or funding changes require WORKSPACE_MANAGE_BILLING. When your agent needs an elevated action, Tokay returns the exact missing PermissionActionType. A new OAuth approval creates another independent connection with the requested union of actions.

Core workflow tools

Tool Purpose
get_tokay_context Find visible Workspaces, Projects, repositories, Services, and resources
get_repository Read ownership mode, current snapshot, links, and capabilities
list_repository_files Page exact snapshot metadata
read_repository_files Read bounded text and ranges at one snapshot
search_repository Search paths or text at one exact commit
create_repository_download Create a raw, directory, or repository download URL
begin_repository_upload Create a complete archive or large blob upload URL
push_code Apply a sparse change or completed upload at an expected commit
deploy_code Continue source, analysis, configuration, and deployment as one deterministic workflow
get_deployment_status Read readiness, blockers, URLs, and review evidence
set_project_secret Store a write only secret value
set_project_config Store an explicitly nonsecret value
select_logical_database Bind one coherent database connection and optional staged import
resolve_delivery_conflict Remove one user controlled conflicting value source
resolve_release_action_override Enable, edit, or dismiss a proposed release command
apply_source_repair Apply a ready source repair proposal at its source commit
deploy Deploy or resume one ready Project or Service with retry safety
confirm_release Preview and confirm one parked release
get_service_diagnosis Read the root diagnosis and optional bounded logs
get_usage Read target attribution, shared VM headroom, and a deterministic recommendation
query_database Run a bounded read only managed database query

Platform, safety, and byte tools

Tool Purpose
query_platform_graphql Run one bounded read only GraphQL query
mutate_platform_graphql Run one routine mutation from the startup validated policy
search_tokay_docs Search first party Tokay protocol and agent references
issue_platform_credential Review and issue one narrower API, MCP, or Git credential for the same Person or Bot
provision_bot_credential Review and provision one independent Bot credential root
register_ssh_key Review and register one narrower SSH Git credential for the same Person or Bot
provision_bot_ssh_key Review and register one independent SSH Git credential for a Bot
rotate_platform_credential Review and atomically replace the presented MCP root that was not created through OAuth
revoke_platform_credential Review and revoke one credential or one root with its direct leaves
create_workspace Review a Plan and create one workspace funded by the caller
set_workspace_plan Review and attach, replace, or change a workspace Plan
end_workspace_funding Review and end funding controlled by the caller
confirm_database_import Preview and confirm replacement of managed data
restore_database_snapshot Preview and confirm a snapshot restore
purge_resource Use Tokay's existing permanent deletion confirmation contract
delete_persistent_storage_data Preview and confirm a permanent storage wipe
replace_project_value_kind Preview Config to Secret or Secret to Config replacement
set_app_audience Preview and confirm public, private, or member access changes
set_service_public_access Preview and set one WEB or FUNCTION's saved public exception for the whole Service
recover_maintenance_hold Resume only with a safety assertion supplied by the user
set_release_safety Preview and confirm a standing release safety change
create_service_file_download Create a Saved or exact Current file download URL
begin_service_file_upload Create a Saved file upload URL
create_database_export Create a native dump or CSV download URL
begin_database_import_upload Create a target free database dump upload URL

mutate_platform_graphql accepts only routine operations. Credential changes and SSH registration use dedicated reviewed tools.

renamePlatformCredential is a routine metadata mutation. An MCP root may rename a direct leaf it can manage through mutate_platform_graphql. The mutation cannot change verifier material, grants, owner, lineage, or expiry.

Credential creation requires explicit CREDENTIAL_CREATE_API, CREDENTIAL_CREATE_MCP, or CREDENTIAL_CREATE_GIT. The Git action covers HTTPS and SSH. A credential created for the same Person or Bot is narrower and cannot create another credential. API and MCP leaves default to one hour, cannot exceed 24 hours, and cannot outlive a finite root. Git HTTPS and SSH leaves have optional expiry and no 24 hour cap. An omitted expiry is previewed as “expires with the issuing token” and resolves to the root expiry when it is finite. register_ssh_key accepts only a public key and returns no secret. Provisioning an independent Bot credential requires authority to manage the Bot and acknowledgement that the new credential survives this connection. The preview and receipt name those consequences before execution.

Rotation preserves the authority of the presented MCP root that was not created through OAuth and atomically revokes that root plus its direct leaves. The replacement JWT appears once. A lost committed response is not retryable or recoverable. Roots created through OAuth must disconnect and complete OAuth again.

Credential revocation previews Self or Lineage scope and every affected credential. It also shows one review set of independent credentials created across the lineage boundary. Revoking one requires explicit selection and current authority. A selected API or MCP root brings its direct leaves.

Reviews and retry safety

Reviewed actions use two calls. The first call returns the exact impact and a ten minute receipt. Repeating the exact request with that receipt consumes it once. A changed request, changed target state, different OAuth connection, expired receipt, or replay fails.

Funding review binds the exact Plan, payer and Free entitlement effect, capacity or restart consequence, and availability change. An agent explicitly granted WORKSPACE_MANAGE_BILLING may evaluate the first response and make the second call autonomously. Funding does not grant workspace membership. Owners may attach their own account, while a current payer may end only their own funding even after losing membership.

Repository writes and deploys use caller stable idempotency keys where a lost response could duplicate durable work. Retrying the same source or readiness target returns the same repository, commit, or rollout. A diagnosed failed rollout becomes a new retry target and receives exactly one successor rollout under the same workflow key. Reusing the key for different input fails. Root rotation is the deliberate exception: the predecessor dies at commit and a lost successor response has no recovery path.

Unknown readiness actions and blocker kinds stop safely. Your agent must never invent the safety assertion required to recover a maintenance hold.

Privacy and retention

  • Tokay validates the connection's live root credential for every MCP request.
  • Disconnecting the connection blocks the next tool call and any unused capability URL or queued source side effect.
  • Secret values are accepted only by write only tools and are never returned.
  • Tokay does not log OAuth bearers, source contents, database query text or results, application log bodies, release commands, capability tokens, or credentials shown once.
  • Operational logs may record the tool name, principal and target IDs, support reference, result size, status, and duration.
  • Platform OAuth connections stay active until disconnected or revoked. Capability URLs and review receipts expire quickly and are single use.

Read the privacy policy and security model. Email hello@tokay.io for support.

Troubleshooting

You see What to do
OAuth opens but consent is denied Confirm the Tokay account is active and the callback shown belongs to the client you added
401 invalid_token The connection or credential was revoked, disconnected, or its principal is inactive. Authorize a new connection when needed
403 insufficient_scope Approve a new connection with the current actions plus the exact action named by Tokay
A tool says to wait Keep the returned IDs and poll after the suggested interval
A repository write reports a conflict Refresh the current snapshot, reconcile the change, and retry with a new expected commit
A capability URL expired Ask for a new capability. Do not put the raw bytes into MCP JSON
A release asks for confirmation Read the impact evidence and ask the user before confirming