{
  "markdown": "<p align=\"center\">\n  <img src=\"assets/logo.png\" width=\"80\" alt=\"AgentPay\">\n</p>\n\n# AgentPay Sentinel MCP\n\nA watchdog MCP that validates every agent payment request against all 9 security checks before it executes — catching policy violations, replay attacks, amount tampering, revoked tokens, and budget overruns at call time.\n\n## What your agent can do\n\n- Run a pre-flight audit on any payment transaction before executing it — get PASS or BLOCKED with the specific check that failed\n- Validate token integrity: confirms the SHA-256 hash matches the expected `merchant_id:amount` binding, catching forged or tampered tokens\n- Enforce budget caps: rejects transactions where `current_spend + amount > budget_cap` and returns exact remaining budget\n- Check merchant allowlist membership and block purchases in restricted categories\n- Verify token expiry and rate limits before the payment fires\n- Simulate known attack vectors (token forgery, budget overflow, replay, merchant spoof, expiry bypass) and get the specific defense mechanism and detection method for each\n\n## Installation\n\n**Requires:** Python 3.10+, `mcp` package.\n\n```bash\npip install mcp\n```\n\n**Claude Desktop** — add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"agentpay-sentinel\": {\n      \"command\": \"python\",\n      \"args\": [\"/absolute/path/to/agentpay-sentinel-mcp/server.py\"]\n    }\n  }\n}\n```\n\n**Cursor** — add to `.cursor/mcp.json` in your project root:\n\n```json\n{\n  \"mcpServers\": {\n    \"agentpay-sentinel\": {\n      \"command\": \"python\",\n      \"args\": [\"/absolute/path/to/agentpay-sentinel-mcp/server.py\"]\n    }\n  }\n}\n```\n\n## Tool Reference\n\n| Tool | Description | Key params |\n|------|-------------|------------|\n| `sentinel_audit_transaction` | Run all 9 security checks; returns PASS/BLOCKED + SHA-256 audit hash | `token_hash`, `merchant_id`, `amount`, `current_spend`, `budget_cap` (required) · `nonce`, `token_id`, `approved_amount` (enable checks 7–9) |\n| `sentinel_revoke_token` | Permanently revoke a token — all future audits with this `token_id` will BLOCK | `token_id`, `reason` |\n| `sentinel_clear_nonce` | Remove a nonce from the replay store (for legitimate refunds/retries only) | `nonce` |\n| `sentinel_verify_chain` | Verify a sequence of audit hashes forms an unbroken chain | `audit_hashes`, `expected_chain_root` |\n| `sentinel_threat_model` | Simulate any named attack vector; returns severity, defence, and detection | `attack_vector`, `context` |\n\n### All 9 checks run by `sentinel_audit_transaction`\n\n| # | Check | What it catches | Param |\n|---|-------|-----------------|-------|\n| 1 | Token integrity | SHA-256 hash mismatch — forged tokens | `token_hash` |\n| 2 | Budget enforcement | Spend exceeding cap | `current_spend`, `budget_cap` |\n| 3 | Merchant allowlist | Payment to unlisted merchant | `allowlist` |\n| 4 | Category restriction | Purchase in blocked category | `blocked_categories` |\n| 5 | Expiry check | Expired token | `expires_at` |\n| 6 | Rate limit | Too many calls per minute | `calls_this_minute` |\n| 7 | **Amount mismatch** | Agent changed amount after human approved | `approved_amount` |\n| 8 | **Replay attack** | Same nonce used twice (file-backed store) | `nonce` |\n| 9 | **Revocation evasion** | Agent using a revoked token | `token_id` |\n\nChecks 7–9 activate when the corresponding param is passed. State persists to `~/.sentinel/`.\n\n### Attack vectors in `sentinel_threat_model`\n\n`token_forgery` · `budget_overflow` · `replay_attack` · `amount_mismatch` · `revocation_evasion` · `merchant_spoof` · `expiry_bypass`\n\n## Security\n\n`sentinel_audit_transaction` returns an advisory verdict — it does not intercept network traffic. Your agent is responsible for calling it before executing a payment and halting on BLOCKED. The audit hash returned is a SHA-256 digest of all check results, giving you a tamper-evident record of each pre-flight decision.\n\n## Pricing\n\n| Plan | Price | Included |\n|------|-------|----------|\n| Free | $0 | 50 audits/month |\n| Pro | $19/month | Unlimited audits + threat model simulations |\n\n[Upgrade to Pro](https://agentpay.so)\n\n## License\n\nMIT — AgentPay Labs. Source: [github.com/Rumblingb/agentpay-sentinel-mcp](https://github.com/Rumblingb/agentpay-sentinel-mcp)\n",
  "bytes": 4336,
  "sha": "118d682c25bb0924086b6e999911a7617e07704a472d2df6af4c2f3d6c01c013",
  "repo_slug": "rumblingb/agentpay-sentinel-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_rumblingb_agentpay_sentinel_mc_deac812c/readme"
}