prompyai-mcp 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -90
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,70 +1,71 @@
|
|
|
1
1
|
# prompyai-mcp
|
|
2
2
|
|
|
3
|
-
Context-aware prompt intelligence MCP server for Claude CLI. Scores your
|
|
3
|
+
Context-aware prompt intelligence MCP server for Claude CLI. Scores your prompts against your real codebase and rewrites them with AI.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```bash
|
|
8
|
+
claude mcp add prompyai -- npx prompyai-mcp serve
|
|
9
|
+
```
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
- **Suggestions** with concrete examples tailored to your project
|
|
11
|
-
- **Enhanced prompt** rewritten with the improvements applied
|
|
11
|
+
No sign-up. No config. Works immediately. Requires Node.js 20+.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
Prompt Score: 28/100 [F]
|
|
15
|
-
Session context: 12 file references carried forward
|
|
16
|
-
|
|
17
|
-
Specificity 6/25 ===...........
|
|
18
|
-
Context 5/25 ==............
|
|
19
|
-
Clarity 10/25 ======........
|
|
20
|
-
Anchoring 7/25 ====..........
|
|
21
|
-
|
|
22
|
-
This prompt is too vague for good results. Critical fixes:
|
|
23
|
-
1. Replace "fix" with what's actually broken
|
|
24
|
-
> "debug the JWT validation error in @src/middleware/auth.ts"
|
|
25
|
-
2. Describe expected vs actual behavior
|
|
26
|
-
> "should return 200 but returns 401 when token has role claim"
|
|
27
|
-
|
|
28
|
-
Enhanced prompt:
|
|
29
|
-
```
|
|
30
|
-
In @src/middleware/auth.ts, the JWT validation returns 401 for valid
|
|
31
|
-
tokens. Update validateToken to extract the role claim correctly.
|
|
32
|
-
Ensure existing vitest tests pass.
|
|
33
|
-
```
|
|
34
|
-
```
|
|
13
|
+
## What It Does
|
|
35
14
|
|
|
36
|
-
|
|
15
|
+
Every time you write a prompt in Claude CLI, PrompyAI automatically:
|
|
16
|
+
|
|
17
|
+
1. **Scores it** (0–100) across Specificity, Context Completeness, Task Clarity, and File & Folder Anchoring
|
|
18
|
+
2. **Suggests improvements** tailored to your project
|
|
19
|
+
3. **Rewrites the prompt** with real file paths, verified symbols, and codebase context
|
|
37
20
|
|
|
38
|
-
```bash
|
|
39
|
-
npm install -g prompyai-mcp
|
|
40
21
|
```
|
|
22
|
+
Prompt Score: 43/100 [D]
|
|
41
23
|
|
|
42
|
-
|
|
24
|
+
Specificity 3/25 ==..............
|
|
25
|
+
Context Completeness 13/25 ========........
|
|
26
|
+
Task Clarity 15/25 =========.......
|
|
27
|
+
File & Folder Anchoring 10/25 ======..........
|
|
43
28
|
|
|
44
|
-
|
|
29
|
+
Key improvements:
|
|
30
|
+
1. Expand your prompt with more context
|
|
31
|
+
2. Add file paths using @mentions
|
|
32
|
+
3. Specify what format you expect the output in
|
|
45
33
|
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
Try something more like:
|
|
35
|
+
|
|
36
|
+
"Build the VS Code extension in packages/vscode-extension/ that integrates
|
|
37
|
+
with the PrompyAI MCP server at packages/mcp-server/. It should provide
|
|
38
|
+
real-time prompt scoring in the editor sidebar, show score breakdowns
|
|
39
|
+
(specificity, context, clarity, anchoring), and offer a 'rewrite prompt'
|
|
40
|
+
action. Use the shared types from packages/shared/."
|
|
48
41
|
```
|
|
49
42
|
|
|
50
|
-
|
|
43
|
+
## AI Enhancement — Works for Everyone
|
|
51
44
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
45
|
+
PrompyAI uses a two-layer architecture:
|
|
46
|
+
|
|
47
|
+
- **API key users** (`ANTHROPIC_API_KEY` set) → PrompyAI calls Claude Haiku directly for fast AI rewrites
|
|
48
|
+
- **Subscription users** (no API key) → PrompyAI returns rich codebase context to Claude, which generates the enhanced prompt using your existing session
|
|
49
|
+
|
|
50
|
+
All users get AI-enhanced output. No separate API key required.
|
|
51
|
+
|
|
52
|
+
## How It Knows Your Codebase
|
|
53
|
+
|
|
54
|
+
PrompyAI indexes your project locally:
|
|
55
|
+
|
|
56
|
+
- **File tree** — structure, key folders, recently modified files
|
|
57
|
+
- **Tech stack** — language, framework, ORM, test runner detection
|
|
58
|
+
- **Code symbols** — functions, classes, interfaces extracted via the TypeScript Compiler API
|
|
59
|
+
- **Git state** — branch, dirty files, recent changes
|
|
60
|
+
- **Session history** — reads Claude Code conversation transcripts for multi-turn context
|
|
61
|
+
|
|
62
|
+
All indexing happens locally. Nothing is sent externally (except optional anonymous telemetry).
|
|
62
63
|
|
|
63
64
|
## MCP Tools
|
|
64
65
|
|
|
65
66
|
### `evaluate_prompt`
|
|
66
67
|
|
|
67
|
-
|
|
68
|
+
Auto-called on every user message. Scores your prompt against your project.
|
|
68
69
|
|
|
69
70
|
| Parameter | Required | Description |
|
|
70
71
|
|-----------|----------|-------------|
|
|
@@ -73,11 +74,9 @@ Automatically called on every user message. Scores a prompt against your project
|
|
|
73
74
|
| `active_file` | no | Currently open file path |
|
|
74
75
|
| `session_id` | no | Claude Code session ID for multi-turn context |
|
|
75
76
|
|
|
76
|
-
Returns a JSON result with a pre-formatted `display` field that Claude shows directly.
|
|
77
|
-
|
|
78
77
|
### `get_context`
|
|
79
78
|
|
|
80
|
-
Returns
|
|
79
|
+
Returns your project summary: tech stack, recent files, key folders.
|
|
81
80
|
|
|
82
81
|
| Parameter | Required | Description |
|
|
83
82
|
|-----------|----------|-------------|
|
|
@@ -85,50 +84,29 @@ Returns a summary of your project: detected tech stack, recently modified files,
|
|
|
85
84
|
|
|
86
85
|
### `prompyai_toggle`
|
|
87
86
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
| Parameter | Required | Description |
|
|
91
|
-
|-----------|----------|-------------|
|
|
92
|
-
| `enabled` | yes | `true` to enable, `false` to disable |
|
|
93
|
-
|
|
94
|
-
## Scoring Dimensions
|
|
87
|
+
Turn auto-evaluation on or off. Say "pause prompyai" or "enable prompyai" in Claude CLI.
|
|
95
88
|
|
|
96
|
-
|
|
89
|
+
## Desktop Config
|
|
97
90
|
|
|
98
|
-
|
|
99
|
-
|-----------|----------|
|
|
100
|
-
| **Specificity** | Concrete actions vs vague verbs, output format, constraints |
|
|
101
|
-
| **Context** | File references, error messages, expected vs actual behavior |
|
|
102
|
-
| **Clarity** | Single focused task, success criteria, unambiguous language |
|
|
103
|
-
| **Anchoring** | File paths, project entity references, hot file mentions |
|
|
91
|
+
Alternatively, add to `~/.claude/claude_desktop_config.json`:
|
|
104
92
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- **Rate limiting** — 100 AI calls/day per machine, graceful fallback
|
|
115
|
-
- **Anonymous telemetry** — Usage stats only, opt-out with `PROMPYAI_TELEMETRY=false`
|
|
116
|
-
|
|
117
|
-
## AI-Powered Suggestions
|
|
118
|
-
|
|
119
|
-
When `ANTHROPIC_API_KEY` is set, PrompyAI uses Claude Haiku to generate context-aware suggestions grounded in your project structure. Without an API key, it falls back to smart template-based suggestions from the heuristic analysis.
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
export ANTHROPIC_API_KEY=sk-ant-...
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"mcpServers": {
|
|
96
|
+
"prompyai": {
|
|
97
|
+
"command": "npx",
|
|
98
|
+
"args": ["prompyai-mcp", "serve"]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
123
102
|
```
|
|
124
103
|
|
|
125
104
|
## Environment Variables
|
|
126
105
|
|
|
127
106
|
| Variable | Required | Description |
|
|
128
107
|
|----------|----------|-------------|
|
|
129
|
-
| `ANTHROPIC_API_KEY` | No | Enables AI
|
|
108
|
+
| `ANTHROPIC_API_KEY` | No | Enables direct AI suggestions via Claude Haiku (optional) |
|
|
130
109
|
| `PROMPYAI_TELEMETRY` | No | Set to `false` to opt out of anonymous telemetry |
|
|
131
|
-
| `PROMPYAI_TELEMETRY_URL` | No | Override telemetry endpoint URL |
|
|
132
110
|
|
|
133
111
|
## CLI Commands
|
|
134
112
|
|
|
@@ -138,12 +116,6 @@ prompyai doctor # Run environment diagnostics
|
|
|
138
116
|
--workspace <path> # Workspace to check (default: cwd)
|
|
139
117
|
```
|
|
140
118
|
|
|
141
|
-
## Rate Limits
|
|
142
|
-
|
|
143
|
-
- **Per machine:** 100 AI-enhanced evaluations per day
|
|
144
|
-
- **Global:** Monthly cost cap
|
|
145
|
-
- **When limits hit:** Heuristic scoring continues, AI suggestions paused
|
|
146
|
-
|
|
147
119
|
## Programmatic API
|
|
148
120
|
|
|
149
121
|
```typescript
|
|
@@ -160,6 +132,12 @@ console.log(result.total); // 0-100
|
|
|
160
132
|
console.log(result.grade); // A-F
|
|
161
133
|
```
|
|
162
134
|
|
|
135
|
+
## Links
|
|
136
|
+
|
|
137
|
+
- **Website:** [prompyai.com](https://prompyai.com)
|
|
138
|
+
- **GitHub:** [github.com/samouh-waleed/PrompyAI](https://github.com/samouh-waleed/PrompyAI)
|
|
139
|
+
- **MCP Registry:** [io.github.samouh-waleed/prompyai](https://registry.modelcontextprotocol.io)
|
|
140
|
+
|
|
163
141
|
## License
|
|
164
142
|
|
|
165
143
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prompyai-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"mcpName": "io.github.samouh-waleed/prompyai",
|
|
5
5
|
"description": "Context-aware prompt intelligence MCP server for Claude CLI — scores your prompts against your real codebase",
|
|
6
6
|
"type": "module",
|