Skip to content

The Ordainer MCP server runs on your computer over stdio and talks to the admin API with an admin key you give it. From Cursor, Claude Code, Claude Desktop, VS Code, Windsurf, or another MCP client, your agent can create a customer, a plan and a test key, check how close each key is to its cap, read would-denies, raise a cap, and switch a plan from shadow to enforce.

Test keys and test data only. Every change shows you a preview first and needs your accept. New key secrets are written to a local env file and are never shown to the model.

This page should take about two minutes once you have Node 20+ and an admin key.

  1. Install Node 20 or later (node -v). The server will not start on an older Node.
  2. In the Ordainer console, create an admin key in Console → Keys, under Admin keys at the bottom, with only the scopes you want the agent to have. usage:read alone is enough to watch; writes need the matching write scopes. The organization always comes from this key. There is no org argument.
  3. There is nothing to install by hand. Your client starts the server with npx -y ordainer-mcp@0.1.1, and npx downloads the package the first time it runs. 0.1.1 is the current version. Leave off @0.1.1 to use the latest published version instead.

The admin key goes in the MCP client’s environment, never in a file the agent reads, and never in a committed project file.

Project config is .cursor/mcp.json. User-wide config is ~/.cursor/mcp.json. Both use a top-level mcpServers object. Prefer the user-wide file so the admin key is not sitting in the repo.

{
"mcpServers": {
"ordainer": {
"command": "npx",
"args": ["-y", "ordainer-mcp@0.1.1"],
"env": {
"ORDAINER_ADMIN_KEY": "${env:ORDAINER_ADMIN_KEY}"
}
}
}
}

On Windows, if Cursor cannot start npx, see Windows and PowerShell.

Set ORDAINER_ADMIN_KEY in your environment, then restart Cursor. ${env:ORDAINER_ADMIN_KEY} is Cursor’s substitution for an environment variable — do not paste the key into the JSON if you can avoid it.

You can also add it with a Cursor deeplink. Build it from the server config without the admin key (a key in the link would be stored in browser history):

Terminal window
python3 -c "import json,base64,urllib.parse; c=json.dumps({'command':'npx','args':['-y','ordainer-mcp@0.1.1']},separators=(',',':')); print('cursor://anysphere.cursor-deeplink/mcp/install?name=ordainer&config='+urllib.parse.quote(base64.b64encode(c.encode()).decode(),safe=''))"

Open the link, then add ORDAINER_ADMIN_KEY in Cursor’s MCP env for the server. Official docs: Cursor MCP.

Restart the client (or refresh its MCP list). Then ask:

List my Ordainer customers.

The agent should call list_customers and return the customers in this organization, or a truthful empty list. When we started the published package with npx -y ordainer-mcp@0.1.1 on 24 Nov 2026, the server reported its name as ordainer-mcp, its title as Ordainer and its version as 0.1.1, and listed 12 tools. If it cannot see the server, or a tool returns auth_failed / config_invalid, see Troubleshooting.

Writes are not needed for this check. When you do ask for a change, you will see a preview and must accept it yourself. See Confirm and security.

Variable Meaning
ORDAINER_ADMIN_KEY Required. An ord_admin_ key from Console → Keys, under Admin keys. Its scopes decide what the agent can do. The organization always comes from this key.
ORDAINER_MCP_READ_ONLY true, 1, yes, or on (any capitalisation; spaces around the value are ignored) hides every write tool: they are not registered, so the client does not list them. Reads still work.
ORDAINER_BASE_URL Unset (or blank) means https://api.ordainer.dev. A blank value also writes one info line to stderr: [ordainer-mcp] info: ORDAINER_BASE_URL is blank, using default (https://api.ordainer.dev). Unset does not write that line. Otherwise it must be https://…, or http:// only for localhost, 127.0.0.1, or [::1], with no ?, #, or control character. Percent-encoded %3F and %23 in the path are allowed. A typo (including a trailing ? or #) is a configuration error: every tool answers config_invalid and no request is made. It never falls back to production.
ORDAINER_CONSOLE_URL Only for the link in key results. If unset or blank, the server builds the link from the API URL. It keeps the scheme and port and drops the path: when the API host starts with api. followed by a name (for example api.ordainer.dev), that prefix is replaced with console. and /console is appended; any other host, including localhost, 127.0.0.1, and [::1], keeps the API origin and appends /console. Key results add /keys. With the default API URL, console_url in a key result is therefore https://console.ordainer.dev/console/keys, exactly as the tool returns it. That address is the console Keys page; a request without a session is sent to sign in (HTTP 303 to /login). If you set this variable, it must be https://…, or http:// only for localhost, 127.0.0.1, or [::1], with no user name, password, ?, #, space, backslash, invisible or control character, and at most 2,048 characters (a path such as /console is fine, and trailing slashes are removed). The link uses the address as parsed, so case and a default :443 are normalised. Any other value is a configuration error, handled like a bad ORDAINER_BASE_URL: it is logged at start, every tool answers config_invalid, and no request is made. It never falls back to the default. The tool message is ORDAINER_CONSOLE_URL is set, but it isn't a valid console address: it <reason>. To be safe, this server won't run any tool until it's fixed. No request was made and nothing was changed. The fix is Set ORDAINER_CONSOLE_URL to a full https:// address, such as https://console.ordainer.dev/console, or unset it to use the default console link for your API host. Then restart the MCP server.

If ORDAINER_ADMIN_KEY is missing, the server still starts and every tool answers auth_failed with the fix.

The server’s working folder is the directory the client starts it in (often your project root). create_key and rotate_key write .env files inside that working folder. If your client has a cwd field, set it to the project that should receive the file.

Reads (no confirm): list_customers, list_plans, list_keys, get_key_usage, list_decisions, list_changes.

Writes (preview, then you accept): create_customer, create_plan, set_cap, set_mode, create_key, rotate_key.

All 12 tools, with inputs and outputs.

Resources: ordainer://docs/concepts, ordainer://org/summary. Prompts you can pick in the client: onboard_integration, shadow_to_enforce_review, investigate_deny. See Example prompts.

JSON config files (Cursor, Claude Desktop, VS Code, Windsurf). On Windows, npx is a batch file (npx.cmd), and some clients cannot start a batch file by its bare name. If your client shows spawn npx ENOENT or “Connection closed”, run npx through cmd /c. The MCP project’s own reference servers document the same wrapper:

{
"mcpServers": {
"ordainer": {
"command": "cmd",
"args": ["/c", "npx", "-y", "ordainer-mcp@0.1.1"],
"env": {
"ORDAINER_ADMIN_KEY": "ord_admin_..."
}
}
}
}

Use the same command and args in the other config shapes on this page, and keep each client’s own env form.

PowerShell. Set an environment variable for the current window with $env:NAME = "value", for example $env:ORDAINER_ADMIN_KEY = Read-Host "Paste your admin key". It is gone when you close the window. If PowerShell stops with “running scripts is disabled” when you type npx yourself, use npx.cmd instead, or allow local scripts for your account with Set-ExecutionPolicy -Scope CurrentUser RemoteSigned.

  • npm: ordainer-mcp, version 0.1.1, with the executable ordainer-mcp.
  • Official MCP Registry: ai.ordainer/mcp, version 0.1.1, run as an npm package over stdio. See the listing.

The examples on this page name version 0.1.1. Leave off @0.1.1 to follow the latest published version.