Prompt Gen Mcp
About
Transform simple questions into comprehensive, context-aware prompts
Details
- Author
- prompt-gen-mcp
- Downloads
- 336
- Categories
- Other
Jump to
- Local code context scanning (100% private, code never leaves your machine)
- AI-powered selection of optimal prompt engineering techniques
- Structured enhanced output with relevance scoring and code examples
- Integration with Cursor IDE via true MCP architecture
- Fallback support for offline operation
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Prompt Gen McpCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install dependencies (pip install mcp sentence-transformers httpx groq), obtain API keys (PromptGen, GROQ, Tavily), configure Cursorβs MCP settings file with the server command and environment variables, then restart Cursor. Once running, press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux) and invoke the MCP: enhance_prompt command with your question.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"prompt gen mcp": {
"prompt-gen": {
"command": "python",
"args": [
"/full/path/to/prompt-gen-mcp/src/prompt_gen_mcp/server.py"
],
"env": {
"GROQ_API_KEY": "gsk_your_groq_api_key_here",
"TAVILY_API_KEY": "tvly_your_tavily_api_key_here",
"PROMPTGEN_API_KEY": "pg_sk_your_promptgen_api_key_here"
}
}
}
}
}
McpServers
{
"prompt-gen": {
"command": "python",
"args": [
"/full/path/to/prompt-gen-mcp/src/prompt_gen_mcp/server.py"
],
"env": {
"GROQ_API_KEY": "gsk_your_groq_api_key_here",
"TAVILY_API_KEY": "tvly_your_tavily_api_key_here",
"PROMPTGEN_API_KEY": "pg_sk_your_promptgen_api_key_here"
}
}
}
PromptGen MCP - Local Server
Transform simple questions into comprehensive, context-aware prompts using advanced prompt engineering techniques fetched from PromptGen API and your local code context.
π Quick Start
1. Get Your PromptGen API Key
1. Visit: https://promptgenmcp-production.up.railway.app 2. Sign up and generate your API key 3. Copy your API key starting withpg_sk_
2. Get Other Required API Keys
- GROQ API Key: Get from https://console.groq.com/ - Tavily API Key: Get from https://tavily.com/3. Install Dependencies
# Navigate to the directory
cd prompt-gen-mcp
Install dependencies
pip install mcp sentence-transformers httpx groq
4. Configure Cursor
Copy the configuration to your Cursor MCP settings file (~/.cursor/mcp_servers.json):
{
"mcpServers": {
"prompt-gen": {
"command": "python",
"args": ["/full/path/to/prompt-gen-mcp/src/prompt_gen_mcp/server.py"],
"env": {
"PROMPTGEN_API_KEY": "pg_sk_your_key_here",
"GROQ_API_KEY": "gsk_your_groq_key_here",
"TAVILY_API_KEY": "tvly_your_tavily_key_here"
}
}
}
}
Important: Replace /full/path/to/prompt-gen-mcp/ with the actual full path to this directory.
5. Restart Cursor
Completely restart Cursor (not just reload) for the MCP server to be recognized.6. Start Using
1. Open any project in Cursor 2. PressCmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
3. Type: "MCP: enhance_prompt"
4. Ask: "How do I optimize this React component?"
π‘ What You Get
π Transformation Example
| Before | After |
|------------|----------|
| "How do I optimize this React component?" | Comprehensive Enhanced Prompt |
Enhanced Output:
# π Enhanced Prompt for: How do I optimize this React component?
π Question Analysis
- Types: optimization, implementation
- Complexity: medium
- Domain: frontend
- Intent: optimize performance
π― Selected Prompt Engineering Techniques
1. π Plan and Solve (Score: 0.847)
Description: Break down complex problems into structured planning and systematic solving phases
Application: Plan: Identify optimization targets. Solve: Apply specific React patterns.
2. π Few-Shot Learning (Score: 0.823)
Description: Provide examples to guide the response
Application: Here are optimization examples: useMemo, React.memo, useCallback...
π Relevant Code Context
File 1: src/components/UserProfile.tsx (Relevance: 0.892)
typescript
const UserProfile = ({ userId }) => {
const [user, setUser] = useState(null);
useEffect(() => {
fetchUser(userId).then(setUser);
}, [userId]);
return <div>{user?.name}</div>;
};
β¨ Enhanced Analysis Request
[Structured instructions for comprehensive response with context-aware suggestions...]
π Feature Comparison
| Feature | Basic Prompt | Enhanced Prompt |
|---------|-------------|----------------|
| Context Awareness | β None | β
Full codebase context |
| Technique Selection | β Manual | β
AI-powered optimal selection |
| Privacy | β οΈ Varies | β
Code stays local |
| Structured Output | β Basic | β
Comprehensive analysis |
| Code Examples | β Generic | β
From your actual project |
| Relevance Scoring | β None | β
Semantic similarity matching |
π Architecture & Privacy
- π Local Processing: All code scanning happens on your machine
- π API Integration: Only technique selection uses PromptGen API
- π’ No Code Shared: Your code never leaves your machine
- π― Smart Selection: AI chooses optimal techniques from hosted database
- π Context Aware: Automatically includes relevant code from your project
βοΈ How It Works
Architecture Overview
mermaidflowchart TD
A[User Question] --> B[Local MCP Server]
B --> C[Code Context Scanner]
B --> D[PromptGen API]
C --> E[Local Code Analysis]
D --> F[Technique Selection]
E --> G[Enhanced Prompt]
F --> G
G --> H[User Receives Enhanced Prompt]
style A fill:#e1f5fe
style B fill:#f3e5f5
style C fill:#e8f5e8
style D fill:#fff3e0
style G fill:#fce4ec
style H fill:#e0f2f1
Interaction Flow
mermaidsequenceDiagram
participant U as User
participant M as MCP Server
participant C as Code Scanner
participant P as PromptGen API
participant Q as Qdrant DB
U->>M: Ask question
M->>C: Scan local workspace
M->>P: Request techniques for question
P->>Q: Query vectorized techniques
Q-->>P: Return relevant techniques
C-->>M: Local code context
P-->>M: Optimal techniques
M->>M: Combine context + techniques
M->>U: Enhanced prompt with context
Note over C,M: Code never leaves your machine
Note over P,Q: Only question text sent to API
Privacy-First Flow:
1. Local MCP scans your code privately on your machine
2. PromptGen API provides optimal techniques from hosted Qdrant database
3. Local processing combines everything into enhanced prompt
4. No code leaves your machine - only question text sent to get techniques
π― Use Cases
- Code Optimization: Get structured analysis with relevant code context
- Architecture Decisions: Receive comprehensive comparisons with examples
- Debugging Help: Get systematic debugging approaches with code snippets
- Learning: Understand concepts with examples from your actual codebase
π§ Troubleshooting
MCP Server Not Working:
bashTest the server directly
python src/prompt_gen_mcp/server.py
Check dependencies
pip install mcp sentence-transformers httpx groq ``
API Key Issues:
- Ensure
PROMPTGEN_API_KEY starts with pg_sk_
- Get valid GROQ key from https://console.groq.com/
- Get valid Tavily key from https://tavily.com/
Cursor Not Finding MCP:
- Ensure complete Cursor restart (not just reload)
- Check
~/.cursor/mcp_servers.json` syntax- Verify file paths are absolute
- Look for MCP status in Cursor's bottom status bar
No Code Context:
- Ensure you're in a project directory
- Check file permissions
- Verify supported file types (.py, .js, .ts, .tsx, .jsx, .md, .txt)
π Features
- β
PromptGen API Integration (hosted technique database)
- β
Local Code Context Scanning (100% private)
- β
Privacy-Preserving Architecture
- β
Intelligent Technique Selection
- β
LLM-Powered Question Analysis
- β
True MCP Architecture (self-contained)
- β
Fallback Support (works offline)
ποΈ Architecture Benefits
Proper MCP Design:
- β
Single self-contained server process
- β
Cursor manages server lifecycle automatically
- β
No manual background service management
- β
Clean startup/shutdown with Cursor
API Integration:
- β
Uses PromptGen API for techniques (no local llms.txt)
- β
Hosted Qdrant database with vectorized techniques
- β
User authentication via API keys
- β
Usage tracking and billing support
π€ Contributing
1. Fork the repository
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request
π License
MIT License - see LICENSE file for details.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



