Tool of Truth
Tool of Truth
每一次工具调用,皆有实证。
面向 AI 代理工具使用的验证哨兵。一个 MITM 代理,拦截所有 MCP 工具调用,检测伪造、追踪成本、验证结果,并推断用户满意度。
功能
功能 | 状态 | 描述 |
MITM 代理 | ✅ | 透明拦截所有 MCP 工具调用 |
伪造检测 | ✅ | 7 信号深度分析:追踪、文档相似度、时序、占位符、矛盾 |
信任评分 | ✅ | 加权 0-100,并设有伪造上限 |
成本追踪 | ✅ | 支持 8 个提供商的单次调用成本 |
Token 计数 | ✅ | 每次调用的输入/输出 token |
结果验证 | ✅ | 将工具结果与用户的原始提示词进行比较 |
技能遵循 | ✅ | 通过清单验证工作流 |
用户满意度 | ✅ | 从后续消息推断满意度 |
收据 | ✅ | SHA-256 哈希,JSON + 人类可读 |
本地存储 | ✅ | JSONL 每日文件 + 索引查询 |
工具透明度 | ✅ | 显示下游工具实际执行的操作 |
Related MCP server: openclaw-output-vetter-mcp
快速开始
1. 安装
npm install -g tooloftruth-mcp2. 连接(选项 A:直接)
// Your agent's MCP config
{
"tooloftruth": {
"command": "tooloftruth-mcp"
}
}3. 连接(选项 B:代理 — MITM 模式)
// Your agent's MCP config
{
"tooloftruth": {
"command": "tooloftruth-mcp"
}
}// ~/.tooloftruth/proxy.json
{
"servers": {
"firecrawl": { "command": "npx", "args": ["firecrawl-mcp"] },
"github": { "command": "npx", "args": ["@modelcontextprotocol/server-github"] }
}
}4. 使用
You: Did you actually use firecrawl?
Agent: [calls tooloftruth_verify]
Agent: VERIFIED — firecrawl was called at 10:30:02, trust score 98/100, cost $0.03
You: How much did I spend on tools today?
Agent: [calls tooloftruth_cost]
Agent: Total: $0.47 across 12 tool calls
You: Was that result what I asked for?
Agent: [calls tooloftruth_outcome]
Agent: ALIGNED — tool result matches your request
You: That's wrong, try again
Agent: [calls tooloftruth_satisfaction]
Agent: User appears dissatisfied — result may be wrongCLI
# Intercept and monitor non-MCP commands
tooloftruth -- gh api repos/user/repo
# One-shot status report (daemon health, receipts, cost, top tools)
tooloftruth status守护进程
一个 launchd 守护进程监视 .tooloftruth/receipts/,聚合每日统计信息,并在检测到伪造时发出警报。
# Install the daemon (macOS)
launchctl load ~/Library/LaunchAgents/com.tooloftruth.daemon.plist统计信息写入 .tooloftruth/stats/YYYY-MM-DD.json。
真相扫描
tooloftruth_truth_scan 对声明进行真实的网络验证:Bing 搜索(curl)→ crawl4ai 抓取 → 证据提取 → 判定。
MCP 工具
工具 | 描述 |
| 验证某个特定工具是否被使用 |
| 预检:工具是否已安装/配置? |
| 生成/查看验证收据 |
| 按工具统计成本明细 |
| 搜索历史收据 |
| 完整的会话真相报告 |
| 从消息中推断用户满意度 |
| 验证结果是否与用户提示词匹配 |
| 将代理声明与实际工具调用进行交叉比对 |
| 查看对话记录 |
| 网络研究 + 事实核查某项声明 |
MITM 代理的工作原理
Agent ←→ Tool of Truth ←→ MCP Server (downstream)
↓
Records everything
Runs deep fabrication checks
Verifies outcome alignment
Infers satisfaction
Generates receipts
Returns result unchanged存储
所有数据均保留在您机器的主目录中:
~/.tooloftruth/
├── config.json ← settings
├── index.json ← fast lookup index
├── proxy.json ← downstream server config
├── receipts/
│ ├── 2026-08-17.jsonl ← today's calls
│ └── ...
├── conversations/
│ └── 2026-08-17.jsonl ← claim/action conversations
└── stats/ ← daemon aggregations
├── 2026-08-17.json
└── ...
## Skill Manifests
Skills can attach verification manifests:
```json
{
"skill": "last-30-days",
"version": "2.1.0",
"requires": {
"github_mcp": {
"tool": "get_repo_stats",
"mustBeCalled": true
}
}
}开发
git clone https://github.com/adigoel07/tooloftruth.git
cd tooloftruth
pnpm install
pnpm build
npx vitest run许可证
MIT — 使用它、分叉它、在此基础上构建。
作者
由 adigoel07 构建。
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Related MCP Servers
AlicenseNot gradedqualityAmaintenanceOpen-source MCP proxy that enforces security policies, content scanning, and audit logging between AI agents and tool servers25AGPL 3.0- AlicenseAqualityBmaintenanceMCP server for verifying AI agent claims vs reality — single-transcript inline grounding-check that flags when an agent's response states facts not in the input context, when its code silently swallows exceptions and substitutes mock data, or when its multi-turn transcript contains contradictions or unverified completion claims. Sub-second, local, free, no API calls.442 PyPI1MIT
- AlicenseNot gradedqualityDmaintenanceEnables trust, reputation, and economic accountability for MCP by proxying between clients and servers, enriching every tool invocation with trust evaluation, KYA tiers, spending limits, and delegation chains.MIT

mcp-x402-acceptofficial
AlicenseNot gradedqualityCmaintenanceProxies an existing MCP server to add an x402 paywall, charging AI agents per tool call without modifying the upstream server.35 npmMIT