# ThoughtProof MCP server

> Enforces pre-execution verification for AI agents to validate decisions before payments, trades, or irreversible actions.

- Repository: https://github.com/ThoughtProof/thoughtproof-mcp
- Page: https://hostedmcp.org/servers/thoughtproof/thoughtproof-mcp
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 0.3.2

## Install

### Claude Code

```sh
claude mcp add --env 'DQL_API_KEY=<YOUR_DQL_API_KEY>' --env 'SENTINEL_API_KEY=<YOUR_SENTINEL_API_KEY>' --env 'THOUGHTPROOF_API_KEY=<YOUR_THOUGHTPROOF_API_KEY>' thoughtproof-mcp -- npx -y thoughtproof-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "thoughtproof-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "thoughtproof-mcp"
      ],
      "env": {
        "DQL_API_KEY": "<YOUR_DQL_API_KEY>",
        "SENTINEL_API_KEY": "<YOUR_SENTINEL_API_KEY>",
        "THOUGHTPROOF_API_KEY": "<YOUR_THOUGHTPROOF_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "thoughtproof-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "thoughtproof-mcp"
      ],
      "env": {
        "DQL_API_KEY": "<YOUR_DQL_API_KEY>",
        "SENTINEL_API_KEY": "<YOUR_SENTINEL_API_KEY>",
        "THOUGHTPROOF_API_KEY": "<YOUR_THOUGHTPROOF_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"thoughtproof-mcp","type":"stdio","command":"npx","args":["-y","thoughtproof-mcp"],"env":{"DQL_API_KEY":"<YOUR_DQL_API_KEY>","SENTINEL_API_KEY":"<YOUR_SENTINEL_API_KEY>","THOUGHTPROOF_API_KEY":"<YOUR_THOUGHTPROOF_API_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "thoughtproof-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "thoughtproof-mcp"
      ],
      "env": {
        "DQL_API_KEY": "<YOUR_DQL_API_KEY>",
        "SENTINEL_API_KEY": "<YOUR_SENTINEL_API_KEY>",
        "THOUGHTPROOF_API_KEY": "<YOUR_THOUGHTPROOF_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add thoughtproof-mcp --env 'DQL_API_KEY=<YOUR_DQL_API_KEY>' --env 'SENTINEL_API_KEY=<YOUR_SENTINEL_API_KEY>' --env 'THOUGHTPROOF_API_KEY=<YOUR_THOUGHTPROOF_API_KEY>' -- npx -y thoughtproof-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.thoughtproof-mcp]
command = "npx"
args = ["-y", "thoughtproof-mcp"]

[mcp_servers.thoughtproof-mcp.env]
DQL_API_KEY = "<YOUR_DQL_API_KEY>"
SENTINEL_API_KEY = "<YOUR_SENTINEL_API_KEY>"
THOUGHTPROOF_API_KEY = "<YOUR_THOUGHTPROOF_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'DQL_API_KEY=<YOUR_DQL_API_KEY>' -e 'SENTINEL_API_KEY=<YOUR_SENTINEL_API_KEY>' -e 'THOUGHTPROOF_API_KEY=<YOUR_THOUGHTPROOF_API_KEY>' thoughtproof-mcp npx -- -y thoughtproof-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "thoughtproof-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "thoughtproof-mcp"
      ],
      "env": {
        "DQL_API_KEY": "<YOUR_DQL_API_KEY>",
        "SENTINEL_API_KEY": "<YOUR_SENTINEL_API_KEY>",
        "THOUGHTPROOF_API_KEY": "<YOUR_THOUGHTPROOF_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `DQL_API_KEY` | no | yes | Required for DQL-backed verify_decision calls. Sentinel and RV paths use their respective keys. |
| `SENTINEL_API_KEY` | no | yes | Optional; needed when mode=sentinel or auto-route picks Sentinel. |
| `THOUGHTPROOF_API_KEY` | no | yes | Optional operator key for verify_claim / verify_trade / Sentinel fallback. |

## Tools (5)

- `verify_decision`: ThoughtProof pre-action verification gate: verify before the agent pays, trades, writes, or deploys. Call this BEFORE any consequential tool (payment, trade, transfer, publish, delete, deploy, irreversible write). Returns { verdict: ALLOW|BLOCK|UNCERTAIN|…, execute: boolean, objections, receipt_id, surface, axes?, recommendation }. execute is true ONLY on ALLOW — on any other result do NOT execute (soft fail-closed; host must honor execute=false). Routes internally to DQL (spend/checkout) or Sentinel (irreversible exit). Camera mandate: you must NOT put the overshoot or constraint violation in proposed_action or reasoning (for example, do not write "price is above the cap"). Put the user goal in mandate, the action you are about to take in proposed_action, and your plan in reasoning — the verifier must find the mismatch. Replan = new call = new receipt. Aliases: verify_decision, verify_before_action, verify_before_act.
- `verify_before_action`: ThoughtProof pre-action verification gate: verify before the agent pays, trades, writes, or deploys. Call this BEFORE any consequential tool (payment, trade, transfer, publish, delete, deploy, irreversible write). Returns { verdict: ALLOW|BLOCK|UNCERTAIN|…, execute: boolean, objections, receipt_id, surface, axes?, recommendation }. execute is true ONLY on ALLOW — on any other result do NOT execute (soft fail-closed; host must honor execute=false). Routes internally to DQL (spend/checkout) or Sentinel (irreversible exit). Camera mandate: you must NOT put the overshoot or constraint violation in proposed_action or reasoning (for example, do not write "price is above the cap"). Put the user goal in mandate, the action you are about to take in proposed_action, and your plan in reasoning — the verifier must find the mismatch. Replan = new call = new receipt. Aliases: verify_decision, verify_before_action, verify_before_act.
- `verify_claim`
- `check_agent_score`
- `verify_trade`

## FAQ

### What is the main purpose of the verify_decision tool?

It acts as a pre-execution gate that routes proposed actions to DQL or Sentinel to return an execute flag, ensuring execution only happens on an ALLOW verdict.

### Does this server work with Claude Desktop or Cursor?

Yes, it is a local stdio MCP server designed for desktop and CLI hosts including Claude Desktop, Cursor, Windsurf, and Cline.
