Skip to content
Docs menu

MCP tools

Ten tools, kept small on purpose. deploy does almost everything; the rest are for looking, fixing and cleaning up. Every tool returns JSON text, and every failure is an error your agent can act on.

The remote server (https://api.rivtor.com/mcp) and the local server (npx -y rivtor mcp) expose the same ten tools. A few arguments differ; the Server column says where each one applies. The biggest difference is the source for deploy: the local server takes a path and uploads the folder, the remote server takes git_url, starter or inline files. See remote or local.

At a glance

All MCP tools
ToolWhat it does
deployDetect, plan, provision, build, migrate and release in one call, and return live URLs. Creates the project if the name is new. The only tool most agents need. The source arguments differ between servers.
statusCurrent state of every service (status, URL, framework, release), each data service with its size against the limit, custom domains and the last deployment.
logsRuntime logs of the running services, summarised by default (repeats collapsed, errors kept), or the build/deploy log of one deployment. Rarely needed: failed deploys already return the cause and fix.
env_setSet and/or remove env vars and secrets, then restart the services with the new values. No rebuild, a few seconds. Credentials Rivtor manages (database, cache, storage) are read-only.
rollbackPoint traffic back at the previous release, or a specific one, in seconds without rebuilding.
dbWork with the project's Postgres. The actions differ slightly between servers.
domain_addAttach a custom domain such as app.example.com to a public service. HTTPS is issued automatically once DNS resolves.
destroyPermanently delete a project, its services, database, cache and files. Two calls: the first returns a confirm_token; ask the user to confirm explicitly, then call again with it. Agents must never confirm on the user's behalf.
upgradeReturn a payment link to upgrade the plan. Show it to the user; the plan changes as soon as they pay. Only call it when the user asks.
list_projectsList the user's projects, owned and shared, with URLs, status and role.

deploy

Detect, plan, provision, build, migrate and release in one call, and return live URLs. Creates the project if the name is new. The only tool most agents need. The source arguments differ between servers.

deploy arguments
ArgumentTypeServerRequiredDescription
pathstringLocalYesProject root to deploy (absolute, or relative to the server's working directory). Packed as a tarball, respecting .gitignore; .env files are never uploaded.
projectstringBothRemote onlyProject slug, e.g. my-app. Required on the remote server. On the local server it defaults to rivtor.json in the working directory, else the folder name.
git_urlstringRemoteNoPublic https Git URL, e.g. https://github.com/user/repo. One of git_url, starter or files.
refstringRemoteNoBranch, tag or commit for git_url (default: the repo's default branch).
starterstringRemoteNoStarter template name, e.g. nextjs-fastapi-postgres.
filesobjectRemoteNoInline source as { relative/path: content }, at most 2 MB in total. For agents without a filesystem; for a local folder use the local server instead.
dry_runbooleanBothNoOnly detect and return the plan; nothing is built or changed.
envobjectBothNoEnv vars and secrets to set before building, e.g. { STRIPE_SECRET_KEY: "..." }. Never echoed back.
waitbooleanRemoteNoWait for the result (default true). false returns a deploymentId to follow with status and logs. The local server always waits.

Returns: A DeployResult: status is live (see urls), failed (read error.cause, error.file, error.fix, fix, deploy again) or needs_input (missing secrets in error.missing: ask the user, call env_set, deploy again). Static sites take about 30 s, container apps up to about 3 minutes.

status

Current state of every service (status, URL, framework, release), each data service with its size against the limit, custom domains and the last deployment.

status arguments
ArgumentTypeServerRequiredDescription
projectstringBothRemote onlyProject slug, e.g. my-app. Required on the remote server. On the local server it defaults to rivtor.json in the working directory, else the folder name.

Returns: Status JSON for the project.

logs

Runtime logs of the running services, summarised by default (repeats collapsed, errors kept), or the build/deploy log of one deployment. Rarely needed: failed deploys already return the cause and fix.

logs arguments
ArgumentTypeServerRequiredDescription
projectstringBothRemote onlyProject slug, e.g. my-app. Required on the remote server. On the local server it defaults to rivtor.json in the working directory, else the folder name.
deployment_idstringBothNoReturn this deployment's build/deploy log instead of runtime logs.
servicestringBothNoService name, e.g. api.
sincestringBothNoTime window such as 15m, 2h, 2d, or an ISO timestamp.
levelenumBothNoRemote: error | warn | info. Local: debug | info | warn | error.
limitintegerBothNoMaximum lines. Remote: 1–2000, default 200. Local: 1–1000.
summarybooleanBothNoDefault true (grouped summary); false returns raw lines.

Returns: Log lines or a summary.

env_set

Set and/or remove env vars and secrets, then restart the services with the new values. No rebuild, a few seconds. Credentials Rivtor manages (database, cache, storage) are read-only.

env_set arguments
ArgumentTypeServerRequiredDescription
projectstringBothRemote onlyProject slug, e.g. my-app. Required on the remote server. On the local server it defaults to rivtor.json in the working directory, else the folder name.
setobjectRemoteNoVariables to set: { KEY: value }.
varsobjectLocalNoVariables to set: { KEY: value }. (Same as set on the remote server.)
removestring[]BothNoVariable names to remove.
servicestringBothNoLimit to one service; default applies to every service.

Returns: The key names that changed. Values are encrypted and never returned.

rollback

Point traffic back at the previous release, or a specific one, in seconds without rebuilding.

rollback arguments
ArgumentTypeServerRequiredDescription
projectstringBothRemote onlyProject slug, e.g. my-app. Required on the remote server. On the local server it defaults to rivtor.json in the working directory, else the folder name.
release_idstringBothNoRelease to return to (default: the one before current).

Returns: The release now serving traffic.

db

Work with the project's Postgres. The actions differ slightly between servers.

db arguments
ArgumentTypeServerRequiredDescription
projectstringBothRemote onlyProject slug, e.g. my-app. Required on the remote server. On the local server it defaults to rivtor.json in the working directory, else the folder name.
actionenumBothYesquery: read-only SQL (5 s timeout, 500 rows). connection: temporary connection string valid 1 hour. Remote only: tables lists tables with row counts and sizes; export_url returns a 15-minute download link for a pg_dump. Local only: export writes the dump to output on your machine.
sqlstringBothNoSQL for action query (read-only, up to 20,000 characters).
outputstringLocalNoFile path for action export, e.g. ./backup.dump.

Returns: Rows, a connection string, a download link or the written file path, depending on the action.

domain_add

Attach a custom domain such as app.example.com to a public service. HTTPS is issued automatically once DNS resolves.

domain_add arguments
ArgumentTypeServerRequiredDescription
projectstringBothRemote onlyProject slug, e.g. my-app. Required on the remote server. On the local server it defaults to rivtor.json in the working directory, else the folder name.
hostnamestringBothYesFully qualified domain, e.g. www.example.com.
servicestringBothNoService to route to (default: the primary web service).

Returns: The DNS records the user must create at their DNS provider.

destroy

Permanently delete a project, its services, database, cache and files. Two calls: the first returns a confirm_token; ask the user to confirm explicitly, then call again with it. Agents must never confirm on the user's behalf.

destroy arguments
ArgumentTypeServerRequiredDescription
projectstringBothYesProject slug to delete. Required on both servers; never inferred.
confirm_tokenstringBothNoToken from the first call, valid about 10 minutes.

Returns: A confirm_token on the first call; the deletion result on the second.

upgrade

Return a payment link to upgrade the plan. Show it to the user; the plan changes as soon as they pay. Only call it when the user asks.

upgrade arguments
ArgumentTypeServerRequiredDescription
planenumBothNohobby | pro | team. Remote default: the next plan above the current one. Local default: hobby.
intervalenumBothNomonth | year. Remote default: year (2 months free). Local default: month.
currencyenumRemoteNousd (Stripe, card) or inr (Razorpay, UPI autopay or card). Default usd.

Returns: A checkout URL.

list_projects

List the user's projects, owned and shared, with URLs, status and role.

No arguments.

Returns: The current plan and the project list.

Example calls

local server · tools/call
{ "name": "deploy", "arguments": { "path": "/Users/me/code/my-app", "dry_run": true } }
remote server · tools/call
{
  "name": "deploy",
  "arguments": {
    "project": "my-app",
    "git_url": "https://github.com/me/my-app",
    "ref": "main"
  }
}
either server · tools/call
{
  "name": "db",
  "arguments": {
    "project": "my-app",
    "action": "query",
    "sql": "select id, email from users order by created_at desc limit 5"
  }
}

Failures from any tool use the same shape. See Errors.