{
  "markdown": "# thoughtproof-mcp\n\n[![npm version](https://img.shields.io/npm/v/thoughtproof-mcp.svg)](https://www.npmjs.com/package/thoughtproof-mcp)\n[![CI](https://github.com/ThoughtProof/thoughtproof-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/ThoughtProof/thoughtproof-mcp/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nthoughtproof-mcp — local stdio. Hero tool `verify_decision` (DQL spend / Sentinel irreversible exit). `execute` is `true` only on ALLOW.\n\nMCP server for [ThoughtProof](https://thoughtproof.ai) — pre-execution decision verification for AI agents.\n\n**Hero tool:** `verify_decision`. It routes inside the tool to DQL (spend / checkout) or Sentinel (irreversible exit) and returns a fail-closed `execute` flag. `execute` is `true` only on a native `ALLOW`.\n\nThis package is a **local stdio** MCP server (Node 18+) for Desktop / CLI hosts such as Cursor, Claude Desktop, Windsurf, and Cline. It is **not** a remote HTTP MCP server. It is **not** a Grok Web/Mobile custom connector.\n\nGet keys at [https://app.thoughtproof.ai/pricing](https://app.thoughtproof.ai/pricing).\n\nUnpublished work is documented in [UNRELEASED.md](./UNRELEASED.md).\n\n## Quick Start\n\n```json\n{\n  \"mcpServers\": {\n    \"thoughtproof\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"thoughtproof-mcp@0.3.2\"],\n      \"env\": {\n        \"DQL_API_KEY\": \"dqlk_your_key_here\"\n      }\n    }\n  }\n}\n```\n\nInstall with `npx -y thoughtproof-mcp@0.3.2`. Works with **Claude Desktop**, **Cursor**, **Windsurf**, **Cline**, and other local stdio MCP clients.\n\n## Tools\n\n### `verify_before_action` / `verify_decision` (hero)\n\n`verify_before_action` is an alias of `verify_decision` (identical schema + handler). Soft fail-closed: host must honor `execute=false`.\n\nPre-execution gate for a proposed action. Routing is inside the tool — not an agent quiz.\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `mandate` | string | *(required)* | User's stated goal / instruction |\n| `proposed_action` | string | *(required)* | What the agent is about to do |\n| `reasoning` | string | *(required)* | The agent's own plan / reasoning |\n| `context` | string | *(optional)* | Extra evidence |\n| `mode` | `dql` / `sentinel` / `auto` | `auto` | Explicit surface, or auto-route |\n\n**Auto-route:** spend / checkout / booking / purchase / payment / cart / Stripe / price / budget / cap → DQL. High-blast irreversible exit without that language (publish, delete, deploy, send-to-prod, memory write) → Sentinel. Unsure → DQL. Explicit `mode` wins. RV / PLV are not on this path.\n\n**Camera mandate:** do **not** put the overshoot in `proposed_action` or `reasoning` (for example, do not write “price is above the cap”). The verifier has to find the mismatch.\n\n**Envelope** (always this shape):\n\n```json\n{\n  \"verdict\": \"ALLOW\",\n  \"execute\": true,\n  \"objections\": [],\n  \"receipt_id\": \"dql_…\",\n  \"surface\": \"dql\",\n  \"axes\": [],\n  \"recommendation\": \"execute\"\n}\n```\n\n`execute` is `true` only on `ALLOW`. `REVIEW`, `UNCERTAIN`, `BLOCK`, timeouts, HTTP 402/4xx/5xx, and missing keys return `execute: false`. Fail-closed is soft at the protocol layer — the tool does not hard-stop the host. Replan is a new call (new receipt).\n\n### `verify_claim`\n\nVerify any claim or AI-generated reasoning via RV (`POST /v1/check`). Unchanged.\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `claim` | string | *(required)* | The text to verify |\n| `stakeLevel` | `low` / `medium` / `high` / `critical` | `medium` | Risk level — higher stakes trigger deeper verification |\n| `domain` | `financial` / `medical` / `legal` / `code` / `general` | `general` | Domain context for specialized verification |\n| `speed` | `fast` / `standard` / `deep` | `standard` | Verification depth |\n\n### `check_agent_score`\n\nLook up an agent's composite trust score on the ERC-8004 registry.\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `agentId` | string | Agent ID to look up |\n| `domain` | string | Optional domain filter |\n\n### `verify_trade`\n\nOptional pre-execution gate for trading agents (Sentinel → RV). Not the default `verify_decision` path. See [VERIFY_TRADE.md](./VERIFY_TRADE.md).\n\n## Configuration\n\n| Environment Variable | Default | Description |\n|---------------------|---------|-------------|\n| `DQL_API_KEY` | *(none)* | DQL key (`dqlk_…`) for the default `verify_decision` path. Alias: `THOUGHTPROOF_DQL_KEY` |\n| `SENTINEL_API_KEY` | *(none)* | Optional. Required only when `mode=sentinel` or auto-route picks Sentinel. Fallback: `THOUGHTPROOF_API_KEY` as `X-Sentinel-Key` |\n| `DQL_SANDBOX` | *(off)* | Set to `1` to send `sandbox: true` on DQL calls (local/dev only) |\n| `THOUGHTPROOF_API_KEY` | *(none)* | Operator key for `verify_claim` / `verify_trade` / Sentinel fallback |\n| `THOUGHTPROOF_BASE_URL` | `https://api.thoughtproof.ai` | RV API base URL (`verify_claim`) |\n\nA missing Sentinel key returns `execute: false` with “Sentinel key not configured” — it does not silently call DQL.\n\n## Development\n\n```bash\ngit clone https://github.com/ThoughtProof/thoughtproof-mcp.git\ncd thoughtproof-mcp\nnpm install\nnpm run build\nnpm test\nnpm run dev          # Run with tsx (hot reload)\nnpm run inspect      # Test with MCP Inspector\n```\n\nFor local MCP clients, point `command` at `node` and `args` at `dist/index.js` after `npm run build`.\n\n## Related\n\n- [ThoughtProof](https://thoughtproof.ai) — Decision verification for AI agents\n- [pot-cli](https://github.com/ThoughtProof/pot-cli) — CLI for reasoning verification\n- [ERC-8004](https://eips.ethereum.org/EIPS/eip-8004) — Autonomous Agent Registry\n\n## License\n\nMIT — [ThoughtProof](https://thoughtproof.ai)\n",
  "bytes": 5790,
  "sha": "f091b3aeaa081d1f255e150b151098f41b75a13803e710f870564e0f52b3f5f4",
  "repo_slug": "thoughtproof/thoughtproof-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_thoughtproof_thoughtproof_mcp_2dcf9770/readme"
}