KrexelDocsHome

Install the Krexel MCP server

The MCP (Model Context Protocol) server is what lets your AI deploy and edit your Krexel-hosted sites from the chat. Once installed, your AI gets these tools:

  • krexel_deploy — deploy a folder of files
  • krexel_patch — patch a single file in the live site
  • krexel_rollback — roll the live site back to a previous deploy
  • krexel_get_current_site — read the current live file tree
  • krexel_status — check deploy status, quota usage, plan

Once connected, you can say things like:

"Ship this folder to Krexel"

"Change the about page headline to 'Built for AI builders'"

"Roll back to yesterday's deploy"

"What files are currently on the live site?"

…and your AI does it.

Install the server

npm install -g krexel-mcp

Then set your API key:

export KREXEL_API_KEY=krx_your_key_here

Get a key at krexel.com/keys if you don't have one.

Connect to Claude Code

claude mcp add --transport stdio krexel -- krexel-mcp

Then restart Claude Code. You'll see Krexel listed as an available MCP server.

To set the API key for the server only (not your shell):

claude mcp add --transport stdio krexel --env KREXEL_API_KEY=krx_your_key_here -- krexel-mcp

Connect to Cursor

Open ~/.cursor/mcp.json (create it if it doesn't exist) and add:

{
  "mcpServers": {
    "krexel": {
      "command": "krexel-mcp",
      "env": {
        "KREXEL_API_KEY": "krx_your_key_here"
      }
    }
  }
}

Restart Cursor. The MCP server appears in the Tools panel.

Connect to Windsurf

Edit ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "krexel": {
      "command": "krexel-mcp",
      "env": {
        "KREXEL_API_KEY": "krx_your_key_here"
      }
    }
  }
}

Restart Windsurf.

Connect to other MCP clients

Any client that supports the standard MCP protocol works. The server uses stdio transport — point your client at the krexel-mcp binary.

For Claude Desktop, edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "krexel": {
      "command": "krexel-mcp",
      "env": { "KREXEL_API_KEY": "krx_your_key_here" }
    }
  }
}

What your AI can do

After install, prompt your AI with natural language. It figures out which tool to call.

Deploy a folder

You: "Deploy this folder to Krexel"

The AI calls krexel_deploy with the current working directory. Returns a live URL.

Edit the live site

You: "Change the about page headline to 'Built for AI builders, by AI builders'"

The AI reads the current file via krexel_get_current_site, identifies the headline, generates a patch, and calls krexel_patch. Live in 8 seconds.

Roll back

You: "That last edit broke the layout, roll it back"

The AI calls krexel_rollback with the previous deploy ID.

Check status

You: "How many deploys do I have left this month?"

The AI calls krexel_status and reports the quota.

Costs

Each tool call maps to one of these:

ActionQuota cost
krexel_deploy (full)1.0 deploy
krexel_patch0.1 deploy
krexel_rollback0.1 deploy (creates a new patch)
krexel_get_current_siteFree (read-only)
krexel_statusFree (read-only)

Your AI can patch 10 times for the cost of one full deploy. This is the "0.1 per patch" pricing you'll see on the website.

Updating

npm install -g krexel-mcp@latest

Restart your AI client to pick up the new version.

Uninstalling

Claude Code:

claude mcp remove krexel

Cursor / Windsurf / Claude Desktop: remove the krexel entry from the config file.

Remove the server:

npm uninstall -g krexel-mcp

Troubleshooting

The server shows up but tools don't work — check that KREXEL_API_KEY is set in the server's environment, not just your shell. Restart the AI client after setting.

spawn krexel-mcp ENOENT — your npm global bin isn't on your AI client's PATH. Either add it (npm config get prefix/bin) or use the absolute path in your config (/Users/you/.npm-global/bin/krexel-mcp).

AI says "I don't have access to a krexel tool" — restart your AI client. MCP servers only register on startup.

Patches work but full deploys fail — likely a file size limit. Free tier caps at 100 MB per deploy. Builder tier is 500 MB. Check krexel status for your actual limit.

Server keeps disconnecting — usually a malformed config. Validate your JSON with cat ~/.cursor/mcp.json | python3 -m json.tool and look for syntax errors.

Next steps