Prompyai

io.github.samouh-waleed由 GitHub 帳號 samouh-waleed 發布v0.1.1更新於 Oct 24, 2026

Scores your prompts against your real codebase — context-aware prompt intelligence

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

在 Claude CLI 中依據本機程式碼庫為提示詞評分並改寫,結合檔案路徑、符號與 git 狀態提供脈絡。

可以做什麼
PrompyAI 從具體性、脈絡完整性、任務清晰度以及檔案與資料夾錨定四個面向,為每個提示詞打出 0-100 的分數,並提供改進建議,再用真實檔案路徑與已驗證的符號改寫提示詞。它會在本機建立專案索引:檔案樹、偵測到的技術堆疊、透過 TypeScript 編譯器 API 擷取的程式碼符號、git 分支與變更檔案,以及 Claude Code 工作階段紀錄。工具包括 evaluate_prompt、get_context,以及用來暫停或啟用自動評估的 prompyai_toggle。
適用情境
適合在 Claude CLI 中頻繁撰寫提示詞、希望獲得依據真實程式碼庫的提示詞品質回饋的開發者。當提示詞經常缺少檔案路徑或脈絡、又不想離開工作階段時特別有用。
執行需求
透過 npx 啟動的本機程序(npm 套件 prompyai-mcp),需要 Node.js 20+。無需註冊或設定。選用的 ANTHROPIC_API_KEY 可啟用透過 Claude Haiku 直接進行 AI 改寫;未設定時會把脈絡交回 Claude 進行增強。選用的 PROMPYAI_TELEMETRY 可設為 false。
安裝前請注意
會讀取本機專案檔案、git 狀態與 Claude Code 對話紀錄用於索引。除非將 PROMPYAI_TELEMETRY 設為 false,否則預設開啟匿名遙測。若提供 ANTHROPIC_API_KEY,提示詞與程式碼庫脈絡可能被傳送至 Anthropic 用於改寫;未提供時增強過程不會進行外部呼叫。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Prompyai,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

prompyai-mcp

Context-aware prompt intelligence MCP server for Claude CLI. Scores your prompts against your real codebase and rewrites them with AI.

Install

bash
claude mcp add prompyai -- npx prompyai-mcp serve

No sign-up. No config. Works immediately. Requires Node.js 20+.

What It Does

Every time you write a prompt in Claude CLI, PrompyAI automatically:

  1. Scores it (0–100) across Specificity, Context Completeness, Task Clarity, and File & Folder Anchoring
  2. Suggests improvements tailored to your project
  3. Rewrites the prompt with real file paths, verified symbols, and codebase context
Prompt Score: 43/100 [D]
  Specificity         3/25  ==..............  Context Completeness 13/25  ========........  Task Clarity        15/25  =========.......  File & Folder Anchoring 10/25  ======..........
Key improvements:  1. Expand your prompt with more context  2. Add file paths using @mentions  3. Specify what format you expect the output in
Try something more like:
  "Build the VS Code extension in packages/vscode-extension/ that integrates   with the PrompyAI MCP server at packages/mcp-server/. It should provide   real-time prompt scoring in the editor sidebar, show score breakdowns   (specificity, context, clarity, anchoring), and offer a 'rewrite prompt'   action. Use the shared types from packages/shared/."

AI Enhancement — Works for Everyone

PrompyAI uses a two-layer architecture:

  • API key users (ANTHROPIC_API_KEY set) → PrompyAI calls Claude Haiku directly for fast AI rewrites
  • Subscription users (no API key) → PrompyAI returns rich codebase context to Claude, which generates the enhanced prompt using your existing session

All users get AI-enhanced output. No separate API key required.

How It Knows Your Codebase

PrompyAI indexes your project locally:

  • File tree — structure, key folders, recently modified files
  • Tech stack — language, framework, ORM, test runner detection
  • Code symbols — functions, classes, interfaces extracted via the TypeScript Compiler API
  • Git state — branch, dirty files, recent changes
  • Session history — reads Claude Code conversation transcripts for multi-turn context

All indexing happens locally. Nothing is sent externally (except optional anonymous telemetry).

MCP Tools

evaluate_prompt

Auto-called on every user message. Scores your prompt against your project.

ParameterRequiredDescription
promptyesThe prompt text to evaluate
workspace_pathyesAbsolute path to your project
active_filenoCurrently open file path
session_idnoClaude Code session ID for multi-turn context

get_context

Returns your project summary: tech stack, recent files, key folders.

ParameterRequiredDescription
workspace_pathyesAbsolute path to your project

prompyai_toggle

Turn auto-evaluation on or off. Say "pause prompyai" or "enable prompyai" in Claude CLI.

Desktop Config

Alternatively, add to ~/.claude/claude_desktop_config.json:

json
{  "mcpServers": {    "prompyai": {      "command": "npx",      "args": ["prompyai-mcp", "serve"]    }  }}

Environment Variables

VariableRequiredDescription
ANTHROPIC_API_KEYNoEnables direct AI suggestions via Claude Haiku (optional)
PROMPYAI_TELEMETRYNoSet to false to opt out of anonymous telemetry

CLI Commands

bash
prompyai serve              # Start the MCP server (default)prompyai doctor             # Run environment diagnostics  --workspace <path>        # Workspace to check (default: cwd)

Programmatic API

typescript
import { WorkspaceIndexer, ScoringEngine } from 'prompyai-mcp';
const indexer = new WorkspaceIndexer();const scorer = new ScoringEngine();
const fingerprint = await indexer.getFingerprint('/path/to/project');const result = await scorer.evaluate('fix the auth', fingerprint);
console.log(result.display); // Pre-formatted score outputconsole.log(result.total);   // 0-100console.log(result.grade);   // A-F

Links

License

MIT

來源:packages/mcp-server/README.md,提交 df67118

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

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

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分