MCP server

Connect Deloc to your AI coding tool and deploy by asking. The MCP server exposes every CLI capability as a tool your agent can call — deploys, app lifecycle, Actions configuration, data refresh scaffolding, the works.

What the MCP server does

Model Context Protocol is an open standard for exposing tools to AI assistants. With the Deloc MCP server installed, your agent can call deploy, list_apps, create_action, setup_data_refresh, and 27 other tools directly from a chat in Claude Code, Cursor, Windsurf, or Codex.

You say something like "deploy this to Deloc and password-protect it" and the agent runs deploy, reads the live URL, and hands it back.

Install

The fastest path is the CLI helper — it auto-detects your installed tools:

shell
npx @deloc/cli install-mcp

The command looks for Claude Code, Cursor, Windsurf, and Codex, and installs the Deloc MCP server to each one it finds. Restart the editor after.

On Windows
Works the same in PowerShell, Windows Terminal, or cmd with Node 18+ from nodejs.org. If PowerShell blocks npx with a script-execution error, run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned once. In the editor configs below, ~ is your user folder (e.g. C:\Users\you\.cursor\mcp.json), and the Claude Code command works as shown in modern PowerShell.

Editor setup

Prefer to do it yourself? Pick your editor:

Run this in your terminal:

shell
claude mcp add deloc --scope user -- npx -y @deloc/mcp@latest

The --scope user flag registers it globally for your account (available in every project). Restart Claude Code, then try: "What can you do with Deloc?"

Project-scoped config
For Cursor specifically, you can also drop .cursor/mcp.json in a project root to scope the server to that repo. Useful for teams who want Deloc only in specific projects.

Authentication

The MCP server reuses the same auth as the CLI — it reads ~/.deloc/config.json, or falls back to the DELOC_TOKEN environment variable. If you've already run deloc login, you're authenticated in your AI tool too.

If not, ask your agent to "set up Deloc" — it will call the setup_deloc tool, which opens a browser for OAuth and writes the token to your config.

Token via env var for CI-like setups
If your editor supports per-server environment variables, you can pass DELOC_TOKEN directly instead of using the config file. Example Cursor config with env:
json
{
  "mcpServers": {
    "deloc": {
      "command": "npx",
      "args": ["-y", "@deloc/mcp@latest"],
      "env": { "DELOC_TOKEN": "dl_xxxxx" }
    }
  }
}

Tools the MCP server exposes

31 tools, grouped by purpose:

  • Auth: setup_deloc, logout
  • Deploy: deploy, suggest_deploy_options (analyzes a project before deploying)
  • App management: list_apps, get_app, disable_app, enable_app, delete_app, renew_app, set_password, set_og_image
  • Data: upload_data, list_data_files, setup_data_refresh
  • Actions: list_actions, create_action, update_action, delete_action, enable_action, disable_action, test_action, get_action_logs
  • Action secrets: list_action_secrets, set_action_secret, delete_action_secret
  • OAuth credentials: list_oauth_credentials, create_oauth_credential, update_oauth_credential, delete_oauth_credential, test_oauth_credential
  • Account: get_account

Every tool has a matching CLI command. See the CLI reference for flags, or the feature-specific pages for walkthroughs.

Troubleshooting

The MCP server doesn't show up in my editor

  • Restart the editor. New MCP servers are picked up at startup.
  • Verify the config file exists and is valid JSON. For Claude Code, check ~/.claude.json; for Cursor, check ~/.cursor/mcp.json.
  • Make sure npx is on your PATH. MCP entries spawn child processes, so PATH resolution matters.

Tools fail with "not authenticated"

  • Run deloc login from a terminal. That writes ~/.deloc/config.json, which the MCP server reads.
  • Or ask your agent to call setup_deloc directly.
  • If you're using a token via env in the config, double-check for copy/paste whitespace.

I want to point at a staging API

Set DELOC_API_URL in the env block of your MCP config. The CLI and MCP server both honor it.