MCP server

Published

Updated

🧩

AI agents plugin.

The fortrabbit MCP server at mcp.fortrabbit.com connects an AI agent such as Claude Code, Codex or Cursor to apps and environments. The agent signs in with OAuth in the browser, so no token goes into a config file.

About the MCP server

The Model Context Protocol is a standard way for AI agents to discover and call the capabilities of an external service. Instead of being told which HTTP endpoints exist, the agent asks the server what it can do and gets a described list of tools back.

That makes the platform something an agent can operate. A coding agent with the repository already open can look up which environment runs which PHP version, clone a staging environment from the plans of a live one, read the build output of a failed deployment and set the variable that fixes it. No dashboard tab, no app ID copied between windows. Answers come back as data, so the agent can act on them in the same turn.

  • https://mcp.fortrabbit.com/mcp ← remote endpoint

Requests pass the same authorization as the public API, so an agent never sees more than the person who authorized it.

Use cases

  • An AI agent should see apps, environments, and deployments
  • The agent runs on a machine with a browser, for the OAuth approval
  • No credential should be pasted into a config file

Connect an agent

Each client has its own setup command. Instructions for Codex, Claude, Cursor and VS Code:

https://www.fortrabbit.com/agents

The Claude Code command carries --scope user. That registers the server for every directory instead of the current project only, which fits objects that belong to an account rather than to a repository. Other providers usually document the command without it.

The Codex command needs Codex 0.148 or later. Older releases also need --oauth-client-id https://api.fortrabbit.com/.well-known/oauth-client/codex.

The MCP server takes the browser sign-in only. A personal API token is refused there: it works for the CLI and the public API.

The rate limits are the same as on the REST API, counted per credential.

Authorize the connection

The setup command writes configuration, it does not sign in. A silent terminal is the expected result. Authorization runs on the first connection, and every client starts it differently:

ClientAuthorize with
Claude Code/mcp, then Authenticate
Codexcodex mcp login fortrabbit
CursorPrompt on first connection
VS CodeMCP: List Servers

claude mcp login fortrabbit does the same from the terminal, without opening a session first.

The browser page names the requesting client and the address the approval goes back to. Check both before approving. Approval issues an access token that expires after one hour and a refresh token that lasts 30 days, both bound to that one agent. The connection ends one year after approval, or after 30 days without use, whichever comes first. Then the agent signs in again.

A page that never opens leaves the connection unauthorized, not broken. Repeat the step above.

Revoke access

Disconnecting from the agent side ends the connection immediately. In Claude Code that's /mcp, then Clear authentication. It drops the access token and the refresh token together, so the agent cannot quietly renew.

Disconnecting under Connected apps in the dashboard does the same for every connection that agent holds. That's the route to take when the machine running the agent is out of reach.

Reconnecting later does not need the setup command again, as long as the client entry is still in place. The client reports the server as needing authentication, and authorizing once restores access.

Uninstall

Removing the MCP server, per client: remove the agent setup.

Available tools

The tool set can cover the objects you'd look at in the dashboard:

ToolsCover
list_apps, get_appApps, with their region and software preset
list_environments, get_environmentEnvironments of an app, with their variables
list_deployments, get_deployment, get_deployment_logsDeployment history and build output
list_domains, get_domainCustom domains, cloud domains, default domains
list_teams, get_teamTeams
list_payment_methods, get_payment_methodPayment methods
get_youThe account the credential belongs to

A second group answers the questions that come up while writing a create call:

ToolReturns
list_regionsRegion identifiers, names, locations and recommendations
list_software_presetsPreset slugs with the major versions each one supports
list_php_versionsPHP versions, their end-of-life year and the platform default
list_component_plansComponent slugs and sizes with specs and, per region, monthly price
list_git_repositoriesRepositories you can deploy from, with default branch
list_git_branchesThe branches of one of those repositories
detect_repository_stackThe framework found in a repository and the preset that matches it

Three tools change something. create_app creates an app together with its first environment, and can start the first deployment when the configuration allows it. create_environment adds an environment to an app, either from plans for php, storage, traffic and backups, or from an existing environment whose plans and settings it clones. update_environment changes the name, the Git branch and directory, the build and post deploy commands, the PHP version and the variables of an environment.

Restarts, deletions and standalone deployments are not exposed. Adding a tool is a separate decision each time; a REST endpoint existing does not make it available to agents.

Billing

Nothing billed is booked over MCP. create_app creates a trial app without a payment method, which is deleted at the end of the trial unless a payment method is added in the dashboard. On an app with a payment method, create_environment is refused, and so is a PHP version with a surcharge in update_environment. The error links to the dashboard page where a person makes the change. The CLI and the API book billed resources as before.

Environment variables

update_environment merges variables, it does not replace them. A name with a string value is created or updated, a name with null is removed, and every variable not named stays as it is. A partial payload can't wipe the rest. create_environment takes variables too, so a new environment can start with them in place.

Writes only reach custom variables. Platform variables can't be added, changed or removed, so an agent can't shadow one.

get_environment returns the custom variables and the platform variables. Secret platform values, such as the database password, are left out. Custom variables come with their values, and whatever an agent reads ends up in the model context of its client. Keep secrets that an agent should not see out of the variables of environments it can reach.

Apps and environments as resources

Apps and environments are also published as MCP resources, so you can point at one in a prompt instead of describing it: @fortrabbit:app/ap-a1b2c3 or @fortrabbit:env/en-a1b2c3, depending on how your client renders the picker. The payload is identity only, meaning public ID, name, and for an environment the app it belongs to. The tools above fetch the rest.

MCP or agent skills

The two work together and solve different halves of the problem. The MCP server gives an agent authorized access to platform objects. Agent skills give it the workflow knowledge: how a deployment is done, how a database is synced, which command to run over SSH.

Written by humans and AI in collaboration.

AI use & editorial processEdit on GitHub ↗