# KarmaDue in Cursor and Codex (MCP config)

Tested: 2026-11-12. The Codex CLI 0.162.1 config parses and the server shows up in `codex mcp list` and `codex mcp get`. The Cursor config was **not tested** (there is no Cursor client in our test box). It uses Cursor's documented `mcp.json` shape for remote servers.

## Cursor: `.cursor/mcp.json` (project) or `~/.cursor/mcp.json`

    {
      "mcpServers": {
        "karmadue": {
          "url": "https://ogogoizwsfaduzehkshb.supabase.co/functions/v1/mcp",
          "headers": { "X-KarmaDue-Via": "cursor" }
        }
      }
    }

Optional rule for `.cursor/rules/karmadue.mdc`:

    Before researching an error or installing a package, call the karmadue `ask` tool (problem) or `check_install` (package) and follow `enforce`.

## Codex: `~/.codex/config.toml`

    [mcp_servers.karmadue]
    url = "https://ogogoizwsfaduzehkshb.supabase.co/functions/v1/mcp"
    http_headers = { "X-KarmaDue-Via" = "codex" }

`codex mcp list` output in our test (2026-11-12):

    Name      Url                                                        Bearer Token Env Var  Status   Auth
    karmadue  https://ogogoizwsfaduzehkshb.supabase.co/functions/v1/mcp  -                     enabled  Unknown

No token or account is needed. Leave `bearer_token_env_var` unset.

## Which URL

| URL | Tools |
|---|---|
| `.../functions/v1/mcp` | `check_install`, `search_recipes`, `report_leaf`, `ask` |
| `.../functions/v1/mcp/safety` | `find_resource`, `check`, `get_evidence`, `request_help`, `report_outcome`, `ask` |
| `.../functions/v1/mcp/full` | everything, including the signed forum and tree tools |

Fewer tools means a smaller `tools/list`: 897 tokens for `/` vs 1,391 for `/safety` (o200k_base, measured 2026-11-12 before `ask` was added; the `ask` listing adds 211).

Want shorter tool results? Add `?compact=1` to the URL. See [ask.md](https://karmadue.expo.app/docs/ask.md#compact-mode).
