MCP Integration
Connect AI coding agents to Rock8Cloud via MCP
Rock8Cloud exposes an MCP (Model Context Protocol) server that lets AI coding agents interact with your projects, services, environments, and code reviews.
Available Tools
| Tool | Description |
|---|---|
list_organizations | List organizations you belong to |
list_projects | List projects in an organization |
get_project | Get project details with services |
list_services | List services in a project |
list_environments | List stable and preview environments |
get_uptime_status | Get current and 30-day uptime information for a service |
get_code_reviews | Get code review findings for a branch |
check_github_connection | Check if a repository is accessible via the GitHub App |
create_project | Create a new project in an organization |
delete_project | Permanently delete a project and all its services (requires confirmation) |
list_branches | List branches of a GitHub repository |
create_repo_service | Create a new repository service in a project |
delete_service | Permanently delete a service and its data (requires confirmation) |
deploy_service | Trigger a deployment for a service |
get_deployment_status | Get the current status of a deployment, including its dependency vulnerability scan results |
get_latest_build | Get the latest deployment and build job status for a service environment (stable or preview) |
get_build_logs | Retrieve orchestration build logs for a deployment |
get_build_logs_by_build_id | Same as get_build_logs but takes a buildJobId directly |
get_runtime_logs | Retrieve historical runtime logs for any deployment (live or past) |
list_linkable_keys | List the env var keys a service exports for linking (e.g. database credentials) |
get_env_vars | Get env vars of a service's stable environment (manual values masked) |
link_env_vars | Link env vars from a source service (e.g. a database) into another service |
unlink_env_vars | Remove linked env vars from a service |
write_manual_env_vars | Create or update manual env vars on a service (asks you to confirm first - see below) |
provision_postgres | Provision a managed PostgreSQL database in a project |
provision_redis | Provision a managed Redis-compatible datastore (Dragonfly) in a project |
provision_object_storage | Provision an S3-compatible object storage bucket in a project |
task_agent | Start an agent session on a service and submit the first task (coder or research) |
list_agent_models | List the AI models selectable for agent sessions (pass an id as modelId to task_agent) |
continue_agent_session | Send a follow-up prompt, resume a parked session, or continue a closed session in a fresh sandbox |
get_agent_run | Poll a run for its result: reply, files changed, commit and PR link |
get_agent_session | Get a session's status, handoff brief, pending question and messages |
list_agent_sessions | List agent sessions in an organization or for one service |
close_agent_session | Permanently close a session and tear down its sandbox |
publish_artifact | Publish a static site (HTML/CSS/JS) to the org's shared artifacts bucket and get a public URL |
list_artifacts | List published artifacts with their public URLs |
delete_artifact | Delete a published artifact (files and listing entry) |
Setup
The MCP server URL for your instance is:
https://app.rock8.cloud/mcpAuthentication is handled via OAuth - each agent will prompt you to authorize on first use.
Claude Code
claude mcp add rock8cloud --transport http https://app.rock8.cloud/mcpOr add to your project's .mcp.json:
{
"mcpServers": {
"rock8cloud": {
"type": "http",
"url": "https://app.rock8.cloud/mcp"
}
}
}Pi
Pi requires an MCP extension. Install the Pi MCP Adapter:
pi install npm:pi-mcp-adapterAdd the server to your project's .mcp.json:
{
"mcpServers": {
"rock8cloud": {
"url": "https://app.rock8.cloud/mcp",
"auth": "oauth"
}
}
}Restart Pi, then authorize Rock8Cloud from inside Pi:
/mcp-auth rock8cloudComplete the browser authorization flow. You can inspect the connection later with /mcp.
Zed
Zed does not support remote HTTP MCP servers natively yet. Use mcp-remote as a stdio bridge. Add to your project's .zed/settings.json (or global ~/.config/zed/settings.json):
{
"context_servers": {
"rock8cloud": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://app.rock8.cloud/mcp"]
}
}
}OpenCode
Add to your project's opencode.json:
{
"mcp": {
"rock8cloud": {
"type": "remote",
"url": "https://app.rock8.cloud/mcp"
}
}
}then run opencode mcp auth to authorize
OpenAI Codex CLI
codex mcp add rock8cloud --url https://app.rock8.cloud/mcpOr update your ~/.codex/config.toml:
[mcp_servers.rock8cloud]
url = "https://app.rock8.cloud/mcp"IntelliJ
Open Settings → Tools → AI Assistant → Model Context Protocol, click Add, choose STDIO, and paste:
{
"mcpServers": {
"rock8cloud": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://app.rock8.cloud/mcp"]
}
}
}Troubleshooting
If your MCP client uses mcp-remote as a bridge (like Zed or IntelliJ), you might occasionally encounter the following error when calling tools:
JWKSNoMatchingKey: no applicable key found in the JSON Web Key Set
This happens when the OAuth key set rotates and the cached token states fall out of sync. To fix this, entirely remove your local cached credentials directory:
rm -rf ~/.mcp-authThis ensures mcp-remote will prompt you for a clean, brand new OAuth access token flow on the next tool execution.
First Deploy Workflow
The MCP server includes a first_deploy prompt template that guides AI agents through deploying a repository for the first time. The flow:
- Validate locally - agent checks for a Dockerfile (creates one if missing), reads the EXPOSE port, ensures changes are committed and pushed
- Check GitHub connection -
check_github_connectionverifies the GitHub App can access the repository - Create project -
create_projectcreates a new project to group your services - Select branch -
list_brancheslets you pick which branch to deploy - Create service -
create_repo_serviceregisters the service with its Dockerfile and port configuration - Deploy -
deploy_servicetriggers the build and deployment, returns the URL where your app will be live
To start a first deploy, ask your AI agent to "deploy this repository" or use the first_deploy prompt if your agent supports MCP prompts.
Code Review Workflow
The get_code_reviews tool is designed for agents running inside a repository. A typical workflow:
- Agent detects the current branch (
git branch --show-current) and remote (git remote get-url origin) - Agent calls
get_code_reviewswith the branch and repo URL - the tool searches every organization the token can access, so no org lookup is needed - Agent receives findings with severity, file locations, and fix suggestions. If nothing matches, the response explains why - for example the branch was never pushed, no PR is open, or none of the accessible organizations host the repo
- Agent discusses findings and can apply fixes using the
fixPromptfield
This lets you interactively resolve code review feedback without leaving your editor.
Agent Sessions Workflow
The agent tools let your AI assistant delegate work to a Rock8Cloud agent running in a cloud sandbox with its own copy of the repo. The API key needs the read:agents and write:agents scopes. A typical workflow:
- Task -
task_agentwith a service, an agent type (coderimplements changes and opens a PR,researchis read-only) and the task. Optionally pin an AI model by passing amodelIdfromlist_agent_models- without it the session uses the platform default. It returnssessionIdandrunIdimmediately - runs take minutes - Poll -
get_agent_runevery 15-30 seconds untildoneis true. On success it carries the agent's reply, files changed, commit and PR link. A non-nullpendingQuestionmeans the agent is waiting for an answer - Iterate -
continue_agent_sessionsends follow-up turns to the same session. Suspended sessions resume automatically from their workspace snapshot with full context. Continuing a closed session creates a new session from the base branch, seeds it with the latest handoff, and returns the newsessionId. Use that returned ID for polling and later turns - Inspect -
get_agent_sessionreturns the conversation, the latest handoff brief (the agent's memory) and session status.list_agent_sessionsfinds existing sessions - Finish - sessions park themselves when idle and cost nothing while parked. Use
close_agent_sessiononly when the work is truly done - closing is permanent
Uptime Status
The read-only get_uptime_status tool returns a repository service's monitored URL, current availability, 30-day uptime ratio, average response time, last check, and daily outage history. The OAuth client needs the read:uptime-monitors scope.
Writing Environment Variables
write_manual_env_vars lets an agent create or update manual (plaintext) environment variables on a service, such as an API key or a config value you give it directly. Since these values may be secrets, agents are instructed to ask you to confirm the exact key/value pairs before writing anything. If an agent tries to write env vars without asking, stop it and ask it to confirm with you first.
Values are never read back to the agent. Use get_env_vars to check which keys already exist - manual values are always shown masked as ***.
Verify Connection
After setup, verify the MCP server is connected:
Claude Code:
claude mcp listPi: Run /mcp. rock8cloud should appear in the server list.
Other agents: Check the MCP or tools panel in your IDE settings - rock8cloud should appear with the tools listed above.