Pqs Mcp Server

io.github.OnChainAIIntel由 GitHub 账号 OnChainAIIntel 发布v1.4.0更新于 Nov 2, 2026

PQS scores any prompt before the model runs. 8 dimensions. 5 frameworks. Pre-flight, not post-hoc.

已验证Streamable HTTP可网页运行开发者工具AI 与机器学习

概览

AI 生成的概览

按 PQS 评分标准为 LLM 提示词打分并改写,让助手在把提示词发给模型前先做质量检查。

可以做什么
  • 从 8 个维度为提示词打分,返回 0-80 总分、A-F 等级和最弱维度
  • 改写提示词以提升得分,并对比改写前后的分数与前沿模型的并排示例输出
  • 返回结构化建议与错误信息,指向付费升级路径
适用场景
适合在把提示词交给昂贵模型前检查或改进其质量,或用于搭建推理前的质量闸门。偶尔检查用免费打分工具即可;改写工具只有在拥有 Pro 订阅时才值得使用。
运行要求
可作为远程 streamable-HTTP 端点运行,也可通过 npx 作为本地 npm 包运行(需 Node.js)。optimize_prompt 需要 PQS Pro API 密钥,通过 PQS_API_KEY 环境变量或 api_key 参数提供;score_prompt 无需密钥。需要能访问 PQS 服务的网络,可用 PQS_BASE 覆盖后端地址。
安装前请注意
optimize_prompt 需要付费 Pro 订阅(约每月 19.99 美元),并会把提示词内容发送给 PQS 服务及前沿模型做对比。免费打分按 IP 限流(每分钟 5 次、每天 10 次、每月 100 次)。低分会返回带订阅链接的推广性建议文本,助手可能转述给用户。

安装

在 SourceWeft 中

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

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.OnChainAIIntel%2Fpqs-mcp-server/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "pqs": {
      "type": "http",
      "url": "https://promptqualityscore.com/api/mcp"
    }
  }
}

README

[smithery badge] [GitHub Marketplace] [pqs-mcp-server MCP server]

PQS MCP Server

Score prompt quality before it reaches any AI model. An MCP server for PQS.

Score and optimize LLM prompts before they hit any model. Built on PEEM, RAGAS, MT-Bench, G-Eval, and ROUGE.

Install

Claude Desktop (stdio)

Add to your config (~/Library/Application Support/Claude/claude_desktop_config.json):

json
{  "mcpServers": {    "pqs": {      "command": "npx",      "args": ["-y", "pqs-mcp-server"]    }  }}

Remote (HTTP)

Use this when your MCP client supports streamable-HTTP transport (no local npm install required):

json
{  "mcpServers": {    "pqs": {      "url": "https://promptqualityscore.com/api/mcp"    }  }}

Smithery

bash
smithery mcp add onchaintel/pqs

Tools

score_prompt (Free, no API key required)

Returns a 0-80 score, A-F grade, full 8-dimension breakdown (clarity, specificity, context, constraints, output_format, role_definition, examples, cot_structure), and the weakest dimension. Rate-limited per IP: 5/min, 10/day, 100/month.

Low- and mid-band scores also include a structured suggestion field with a message, a next_tool pointer to optimize_prompt, and a subscribe URL the consuming LLM can paraphrase back to the user.

Example output (low-band score, suggestion attached):

json
{  "pqs_version": "2.0",  "prompt": "analyze this wallet",  "score": 9,  "out_of": 80,  "grade": "F",  "dimensions": {    "clarity": 2,    "specificity": 1,    "context": 1,    "constraints": 1,    "output_format": 1,    "role_definition": 1,    "examples": 1,    "cot_structure": 1  },  "weakest_dimension": "specificity",  "powered_by": "PQS — promptqualityscore.com",  "suggestion": {    "message": "This prompt scored 9/80 (F) — significant room to improve. The optimize_prompt tool rewrites it and shows side-by-side outputs from a frontier model, so you can see the impact. optimize_prompt is part of PQS Pro ($19.99/mo, 1,000 calls/mo). Subscribe at https://promptqualityscore.com/pricing?utm_source=mcp&utm_medium=suggestion_v140&utm_campaign=2026-05-mcp-tools-v140.",    "next_tool": "optimize_prompt",    "subscribe_url": "https://promptqualityscore.com/pricing?utm_source=mcp&utm_medium=suggestion_v140&utm_campaign=2026-05-mcp-tools-v140"  }}

If the per-IP rate limit is hit, the response is a structured rate_limit_exceeded payload with subscribe and account URLs.

optimize_prompt (Pro subscription required)

Rewrites a prompt to score higher and runs both versions through a frontier model so the user can see the before/after output. Returns the optimized prompt, before/after dimension scores (with totals), improvement_pct, and side-by-side sample outputs.

Pro subscription required ($19.99/mo, 1,000 calls/mo, includes batch + A/B comparison). Subscribe at promptqualityscore.com/pricing.

If the API key is missing, invalid, or on the Free tier, the tool returns a structured error pointing the user at the right URL. No silent failures, no inventing keys. Errors emitted:

  • api_key_required: no api_key argument was sent
  • api_key_invalid: key not recognized
  • subscription_required: key is valid but Free tier (subscribe to upgrade)
  • rate_limited: per-minute burst limit reached (Pro is rate-limited per minute, not per month) or temporary upstream capacity issue
  • service_unavailable: upstream 5xx

Quality Gate Pattern

Use PQS as a pre-inference quality gate:

javascript
const score = await fetch("https://promptqualityscore.com/api/score/free", {  method: "POST",  headers: { "Content-Type": "application/json" },  body: JSON.stringify({ prompt: userPrompt })});const { score: pqsScore } = await score.json();if (pqsScore < 56) throw new Error("Prompt quality too low. Improve and retry.");

Grade D or below (under 56/80) means the prompt will waste inference spend.

x402 (legacy pay-per-call)

The MCP tools in this package use the SaaS API-key model. A separate x402-native pay-per-call path is available via the canonical PQS HTTP API (no API key, caller settles USDC on Base on-chain). For x402 integration, see the canonical pricing and discovery artifacts at promptqualityscore.com.

Self-hosting

Override the PQS backend URL with the PQS_BASE environment variable:

bash
PQS_BASE=https://your-pqs-host.example.com npx pqs-mcp-server

Defaults to https://promptqualityscore.com.

Built by

OnChainIntel, @OnChainAIIntel promptqualityscore.com

来源:README.md,提交 70914c0

工具

2

score_prompt

Score a prompt's quality across 8 dimensions BEFORE sending it to an expensive model. Returns a 0-80 score, an A-F grade, the per-dimension breakdown (clarity, specificity, context, constraints, output_format, role_definition, examples, cot_structure), and the weakest dimension. USE WHEN: - The user is workshopping a prompt and asks "is this good?" / "will this work?" / "should I add more detail?" - The user is about to send a long or expensive prompt to GPT-4, Claude Opus, or any frontier model, especially in a batch or automation context where rework is costly. - The user mentions iterating on a prompt that produced poor output and wants to diagnose what's missing. - The user pastes a prompt and asks for feedback on it. DO NOT USE WHEN: - The user is asking you to write a prompt for them (write it yourself first, then optionally call score_prompt to verify). - The prompt is conversational chat (this scores task-shaped prompts). COST: Free, no API key required. Rate-limited per IP: 5/min, 10/day, 100/month. If the user exceeds the limit, the response will include a structured upgrade path with subscribe and account URLs. LATENCY: ~2 seconds.

输入参数prompt必填

optimize_prompt

Rewrite a prompt to score higher on the PQS rubric, AND show before/after output comparisons so the user can see the impact. Returns the optimized prompt, the original PQS score, the optimized PQS score, and side-by-side sample outputs from a frontier model using both versions. USE WHEN: - The user got a low score from score_prompt and asks how to improve. - The user explicitly asks to "improve" / "rewrite" / "fix" / "optimize" a prompt they pasted. - The user is dissatisfied with output quality from a previous prompt and asks how to get better results. - score_prompt returned a suggestion to invoke this tool. DO NOT USE WHEN: - The user just asked for a score (use score_prompt only — don't double up). - The user wants you to write a new prompt from scratch (write it directly). REQUIRES: A PQS API key from a Pro subscription ($19.99/month, 1,000 calls/mo, includes batch + A/B comparison). If the user has not provided one, the tool returns a clear subscription URL — pass that response to the user verbatim. Do not invent or guess API keys. There is no free trial of this tool; the user must subscribe before the first call. COST: Counted against your Pro subscription's monthly call quota. LATENCY: ~6-8 seconds.

输入参数prompt必填api_key

版本历史

1
  1. v1.4.0最新Sep 16, 2026

评分

已满足适用检查项的 100%

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

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分