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 分