Perf Mcp

io.github.Perf-AI由 GitHub 账号 Perf-AI 发布v0.1.1更新于 Nov 10, 2026

Fact-check and fix AI outputs. Hallucination detection, schema validation, auto-repair.

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

核查并修复 AI 生成的输出:检测幻觉、按 schema 校验并自动修复 JSON,还能把对话请求路由到合适的模型。

可以做什么
  • 核查 LLM 生成的文本,返回修正后的说法与置信度
  • 按 schema 校验生成的 JSON,并自动修复类型、枚举和缺失字段错误
  • 对一般输出做纠错,先判定错误类型(幻觉、schema 违规、语义不一致、指令偏离)
  • 以 OpenAI 兼容格式把对话请求路由到 20 多个模型之一
适用场景
适合在助手输出要展示给用户或交给下游系统之前,再做一次事实与 JSON 格式检查的场景。也适合希望用同一接口按请求自动选择模型的用户。
运行要求
通过 npx 在本地运行,需要 Node.js。需要 Perf API 密钥,放在 PERF_API_KEY 环境变量中;可选 PERF_BASE_URL 覆盖接口地址。需要能访问 Perf 服务的网络。
安装前请注意
提交的内容会发送到 Perf 服务进行核查,不要发送密钥或受监管数据。按量计费:一次工具调用消耗一个额度,免费额度为 200 次核查,超出后需付费套餐或按次付费。请勿把 API 密钥写入共享配置文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Perf Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

perf-mcp

Fact-check and fix AI outputs. Catches hallucinations, repairs broken JSON, corrects errors — before they reach users.

Works with Claude Code, Cursor, Windsurf, Cline, and any MCP-compatible client.

Quick Start

Add to your MCP client config:

json
{  "mcpServers": {    "perf": {      "command": "npx",      "args": ["-y", "perf-mcp"],      "env": {        "PERF_API_KEY": "pk_live_xxx"      }    }  }}

Get your API key at dashboard.withperf.pro — 200 free verifications, no credit card.

Tools

perf_verify

Detect and repair hallucinations in LLM-generated text. Uses multi-channel verification (web search, NLI models, cross-reference) — not just another LLM check.

perf_verify({ content: "The Eiffel Tower was built in 1887." })→ Corrected: "built in 1887" → "inaugurated in 1889" (89% confidence)

perf_validate

Validate LLM-generated JSON against a schema and auto-repair violations. Fixes malformed enums, wrong types, missing fields, hallucinated properties.

perf_validate({  content: '{"name": "John", "age": "twenty"}',  target_schema: { type: "object", properties: { name: { type: "string" }, age: { type: "number" } } }})→ Rejected: /age must be number

perf_correct

General-purpose output correction. Classifies the error type and applies the right fix — hallucination, schema violation, semantic inconsistency, or instruction drift.

perf_correct({ content: "The Great Wall was built in 1950.", correction_budget: "fast" })→ Corrected: temporal_error + factual_error detected (87% confidence)

perf_chat

Route LLM requests to the optimal model automatically. Selects between GPT-4o, Claude, Gemini, and 20+ models based on task complexity. OpenAI-compatible format.

Setup by Client

Claude Code

Add to your project's .mcp.json:

json
{  "mcpServers": {    "perf": {      "command": "npx",      "args": ["-y", "perf-mcp"],      "env": {        "PERF_API_KEY": "pk_live_xxx"      }    }  }}

Cursor

Settings → MCP → Add Server:

json
{  "mcpServers": {    "perf": {      "command": "npx",      "args": ["-y", "perf-mcp"],      "env": {        "PERF_API_KEY": "pk_live_xxx"      }    }  }}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

json
{  "mcpServers": {    "perf": {      "command": "npx",      "args": ["-y", "perf-mcp"],      "env": {        "PERF_API_KEY": "pk_live_xxx"      }    }  }}

Environment Variables

VariableRequiredDescription
PERF_API_KEYYesYour Perf API key (pk_live_xxx)
PERF_BASE_URLNoOverride API URL (for testing)

Pricing

PlanCreditsPrice
Free200 verifications$0 (never expires)
Pro1,000/mo$19/mo
Pay-as-you-goUnlimited$0.02/verification

1 tool call = 1 credit. Get started at dashboard.withperf.pro.

License

MIT

来源:README.md,提交 e0e678a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分