# mod-cms MCP kit

Thin stdio MCP server that wraps the deployed mod-cms **admin HTTP API**. Every tool is a fetch adapter — no direct database access.

## Required environment

| Variable | Description |
|---|---|
| `MOD_CMS_URL` | Base URL of the deployed worker (e.g. `https://mod-cms-preview.example.workers.dev`) |
| `MOD_CMS_ADMIN_TOKEN` | Bearer token matching the worker's `ADMIN_TOKEN` secret |

## Run locally

```bash
MOD_CMS_URL=https://your-worker.workers.dev \
MOD_CMS_ADMIN_TOKEN=your-admin-token \
pnpm --filter @app/mod-cms run mcp
```

## Claude Desktop / Cursor `mcpServers` example

```json
{
  "mcpServers": {
    "mod-cms": {
      "command": "pnpm",
      "args": ["--filter", "@app/mod-cms", "run", "mcp"],
      "env": {
        "MOD_CMS_URL": "https://mod-cms-preview.example.workers.dev",
        "MOD_CMS_ADMIN_TOKEN": "<your-admin-token>"
      }
    }
  }
}
```

Replace the URL and token placeholder with values from your deployment.
