API Reference
MCP Server

MCP Server

Connect an AI assistant such as Claude Code, Claude Desktop or Cursor to your oec.sh organization. The assistant can look at your servers, projects and environments, read an environment's Odoo logs and live metrics, deploy, restart, update modules, take backups and follow a deployment to its end, all through the Model Context Protocol (opens in a new tab) (MCP).

Requires Starter plan or higher, like the rest of the Public API. The MCP server uses your own API key, so it can do exactly what that key can do and nothing more. Quotas, permissions and the audit log apply as usual.


Choose an API Key

Create a key under Settings → API Keys (see Authentication).

KeyPrefixWhat the assistant can do
Read only (start here)oec_live_ro_Look at everything, change nothing
Full accessoec_live_rw_Also deploy, restart, create and update

Use a project-scoped key when the assistant only needs one project. The assistant then cannot see or change anything else in your organization.


Install

Local (runs on your computer)

The assistant starts the MCP server on your computer. Your key never leaves it except to call api.oec.sh. Needs Node.js 22 or newer.

claude mcp add oecsh -e OECSH_API_KEY=oec_live_ro_your_key -- npx -y @oecsh/mcp-server

Hosted (nothing to install)

The hosted server at https://mcp.oec.sh/mcp is not live yet. Until it is, install the package as shown above.

Your client sends your API key in the Authorization header with every request. The server passes it to the API for that request only and stores nothing.

claude mcp add --transport http oecsh https://mcp.oec.sh/mcp \
  --header "Authorization: Bearer oec_live_ro_your_key"

Clients that can only connect with OAuth (for example claude.ai web connectors) are not supported yet. Use a client that lets you set a header.

The hosted server passes your address to the API, so the API's block on repeated wrong keys counts your address, not the hosted server's shared one. Someone else's wrong keys cannot lock you out. Rate limits are per API key either way.


What the Assistant Can Do

With any key

ToolWhat it does
oecsh_get_organizationYour plan, limits and current usage
oecsh_list_servers, oecsh_get_serverServers, their size and whether they are ready for deploys
oecsh_get_server_metricsLive CPU, memory, disk and network of one of your own servers (not shared servers)
oecsh_list_projects, oecsh_get_projectProjects
oecsh_list_environmentsA project's environments, optionally only those in one status
oecsh_get_environmentOne environment with its health and last deployment
oecsh_get_runtime_logsThe newest lines (up to 1000) of an environment's Odoo or PostgreSQL log, read live from its server, like the Logs tab
oecsh_get_environment_metricsLive CPU and memory of an environment's containers, and its disk sizes
oecsh_list_deploymentsAn environment's deployment history
oecsh_get_taskThe status of any task (deploy, restart, backup...)
oecsh_wait_for_taskWaits until a task finishes
oecsh_get_task_logA task's step log and error message
oecsh_list_backups, oecsh_get_backupAn environment's backups, or one backup
oecsh_list_webhooks, oecsh_get_webhook, oecsh_list_webhook_deliveriesYour outgoing webhooks and their recent deliveries

With a full-access key

None of these deletes data.

ToolWhat it does
oecsh_deploy_environmentPulls the latest code and redeploys, optionally updating modules
oecsh_restart_environment, oecsh_start_environment, oecsh_stop_environmentRestart, start or stop an environment
oecsh_quick_update_environmentPull and restart, update all modules, or update some modules
oecsh_create_backupStarts a manual backup
oecsh_create_project, oecsh_update_projectCreate or change a project (its git repository and git provider are set only with an opt-in tool, below)
oecsh_create_environment, oecsh_update_environmentCreate or change an environment
⚠️

Creating a webhook (opt-in, below) or rotating its secret returns the signing secret, which oec.sh shows only once. It is then part of your conversation with the assistant, and the answer says so. If you share that conversation or it is stored where others can read it, rotate the secret under Settings → Webhooks and give the new one to your receiving service yourself. Rotating it through the assistant would put the new secret in the conversation too.

Only when you turn them on

Tools that delete or overwrite data, send data or run code from somewhere outside your organization, or hand out a full database dump are off by default. Turn them on with OECSH_ALLOW in local mode, or the X-OECSH-Allow header in hosted mode:

SettingToolWhat it does
destructiveoecsh_delete_environmentDelete an environment
destructiveoecsh_delete_projectDelete a project
destructiveoecsh_update_project_repositoryChange a project's git repository or git provider: later deploys run code from it
destructiveoecsh_create_webhook, oecsh_update_webhook, oecsh_test_webhookCreate, change or test a webhook: it sends your data to its URL
destructiveoecsh_delete_webhook, oecsh_rotate_webhook_secretDelete a webhook, or replace its signing secret
destructiveoecsh_revoke_api_keyRevoke an API key
destructiveoecsh_reinitialize_modulesReinitialize modules, resetting their data and settings
destructiveoecsh_restore_backupRestore a backup over an environment
backup-downloadoecsh_get_backup_download_linksDownload links for a backup (full database dump)

Each one is marked destructive. That is only a hint: most clients then ask for your approval, unless you have auto-approved the tool. Each one also takes a name to confirm, and the server checks it against the real resource before doing anything: the environment's, project's or API key's name; a webhook's URL to delete it or rotate its secret; and, to create or test a webhook or change its URL, the host your data goes to (hooks.example.com for https://hooks.example.com/oec), as the server reads it from the URL. Changing a webhook's other settings needs no confirmation. In local mode, when your client supports it (MCP elicitation), the server also asks you directly to type the name, so text the assistant read somewhere cannot confirm for you. Without that, the assistant can read names too, so the check cannot prove that you typed it. Do not add these tools to your client's auto-approve or allow list. Backup download links are valid for 5 minutes by default and are full copies of your database: do not share a conversation that contains them.

Restoring a backup replaces the environment's current database and files with the backup's, so changes made since the backup are lost. oec.sh takes a safety backup of the current data first. The assistant can only restore a backup into the environment it was taken from; to restore into another environment, use the dashboard. To confirm, type the environment's name. For a stopped or broken environment, type the name it had when the backup was taken (the assistant can show it to you with oecsh_get_backup). The same goes for backup download links.

claude mcp add oecsh -e OECSH_API_KEY=oec_live_rw_your_key -e OECSH_ALLOW=destructive -- npx -y @oecsh/mcp-server

Limits

  • Every API request counts against your key's rate limit: 120 reads and 20 writes a minute, counted separately.
  • Most tools make one or two API requests. Backup download links and a restore take three, and each other destructive tool two (it reads the resource first to check the name you typed), except creating a webhook or changing its URL, which take one.
  • Runtime logs and metrics are read from your server on every call, so each can be asked for 6 times a minute per environment or server.
  • Waiting for a task checks it every 5 seconds at first, then every 10 seconds, using at most a fifth of your key's read limit. Each call waits up to 50 seconds (45 on the hosted server), because many clients give up on a tool call after a minute; the assistant simply asks again. In local mode it can wait up to 10 minutes in one call when your client shows progress.
  • When a limit is reached, the assistant is told how long to wait.
  • If the answer to an action such as a deploy or a restore is lost on the network, the server asks once more in a way that cannot start the action twice.
  • Logs: up to 1000 lines, from a task (oecsh_get_task_log) or from Odoo and PostgreSQL (oecsh_get_runtime_logs), cut to the newest 60,000 characters so the answer stays within what clients accept.
  • Running, stopped, paused and errored environments are all visible to the assistant; a deleted environment is not, but its backups and tasks stay readable.

Security

  • Your key is sent only to the oec.sh API, only in the Authorization header, and is never shown in answers or logs.
  • The hosted server always calls api.oec.sh; a client cannot redirect your key elsewhere.
  • Names, notes and log text from your environments, including runtime logs, task logs and error messages, are passed to the assistant as data, with an instruction not to act on any text found inside them. Anyone who can reach your Odoo site can write into its logs (a failed login name, for example), so keep the tools that send data out or change code behind the opt-in. Webhook delivery lists leave out what your receiving URL answered.
  • Backups only go to your organization's own storage: a storage location that belongs to another organization is refused.
  • Deploys use real branch names only. Ref paths such as refs/..., pull/... or merge-requests/..., bare commit ids and names starting with - are refused, so a deploy cannot pick up code from a fork's pull request.
  • Never paste your key into the conversation itself. Client configuration files (claude_desktop_config.json, ~/.claude.json, mcp.json) keep it in plain text; do not commit them, and do not add the key with --scope project.
  • If a key leaks, revoke it at once under Settings → API Keys.

Licence

The MCP server is open source under the MIT licence. Copyright (c) 2026 OpenEduCat Inc.

Odoo is a trademark of Odoo S.A. oec.sh is not affiliated with Odoo S.A.