@optivian/mcp
v0.1.0
Published
Optivian MCP server — lets Claude Code, Codex and other MCP agents deploy GitHub repos to Optivian and fix failed deploys.
Maintainers
Readme
@optivian/mcp
MCP server that lets an agent (Claude Code / Claude Desktop) deploy and inspect your Optivian projects using a scoped, short-lived token — never a session or a long-lived god-key.
Hosted — nothing to install (claude.ai, ChatGPT, Codex cloud, Claude Code)
Add a remote MCP server / custom connector with the URL:
https://api.optivian.cloud/mcpYour client opens an Optivian page to sign in and approve access (Agent access by
default). No token to copy; disconnect any time by revoking the app's key under
API keys. Claude Code: claude mcp add --transport http optivian https://api.optivian.cloud/mcp.
The hosted server has every tool below except deploy_folder (it can't see your
disk), and wait_for_deployment returns within 90 seconds — the agent calls it
again while a build runs.
Local — stdio (adds deploy_folder)
In the Optivian dashboard → API keys, create a token. Keep the default Agent (Claude Code / Codex) access and a short expiry (e.g. 24 hours).
Add the server to your agent (the dashboard shows this block pre-filled):
Claude Code
claude mcp add optivian -e OPTIVIAN_API_KEY=opt_live_… -- npx -y @optivian/mcpCodex (
~/.codex/config.toml)[mcp_servers.optivian] command = "npx" args = ["-y", "@optivian/mcp"] env = { OPTIVIAN_API_KEY = "opt_live_…" }Any MCP client (JSON config)
{ "mcpServers": { "optivian": { "command": "npx", "args": ["-y", "@optivian/mcp"], "env": { "OPTIVIAN_API_KEY": "opt_live_…" } } } }Ask: "Deploy https://github.com/acme/app to Optivian and fix it until it's live."
OPTIVIAN_API_URL overrides the api base (defaults to https://api.optivian.cloud).
The loop
deploy_repo ─► wait_for_deployment ─► running → URL
│
└─ failed → errorMessage + build/runtime log tails
→ agent fixes code, git push
→ redeploy_service → wait_for_deployment …No GitHub repo, or testing an uncommitted fix? deploy_folder uploads the local
folder instead, and re-running it ships each fix without a commit or push.
The server sends these instructions to the agent on connect, including the auto-deploy trap: if the project deploys on push, the agent waits on the push's deployment instead of redeploying.
Tools
| Tool | Scope | Does |
| --------------------- | ----------------------- | ---------------------------------------------------------------- |
| deploy_repo | project:write * | repo → project (created/reused) → env → service + deploy |
| wait_for_deployment | project:read ** | poll to finished; URL on success, log tails on failure |
| deploy_folder | deploy:trigger *** | local folder → upload + deploy (no push; secrets never uploaded) |
| redeploy_service | deploy:trigger | rebuild latest commit, keeping build settings |
| deploy_git | deploy:trigger | deploy a ref with explicit port / buildPack / baseDirectory |
| rollback_deployment | deploy:trigger | restore an earlier deployment |
| get_build_logs | logs:read | build output of a deployment |
| get_runtime_logs | logs:read | recent container output |
| get_deployment | project:read | one deployment's status + error |
| list_deployments | project:read | recent deployments |
| get_service_status | project:read | running? + public URL |
| list_projects | project:read | projects in the org |
| get_project | project:read | one project + its services |
| inspect_repo | project:read | detect framework / port / env keys without deploying |
| list_env_vars | project:read | env var names (never values) |
| set_env_vars | env:write | set env vars (write-only) |
| unset_env_var | env:write | remove an env var |
| update_service | project:write | health-check timing / replicas |
| list_databases | db:read | managed Postgres databases (not in the agent preset) |
* plus deploy:trigger, and env:write when env is passed. ** plus logs:read. *** plus project:write when it creates the project.
Scopes are enforced by the api. A token missing a scope returns the exact message naming the scope to add. The agent preset can create, configure and ship code but can't delete anything, read secret values or touch databases, and it expires on its own.
