PromptGen MCP Local Server

PromptGen MCP Local Server

prompt-gen-mcp•byprompt-gen-mcp

A local MCP server that turns simple questions into enhanced prompts by combining PromptGen API-selected prompt engineering techniques with relevant context from your local codebase.

License: MIT License•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Scans the local workspace for relevant code and builds enhanced prompts that include that code context alongside selected techniques.
  • •Analyzes the user's question to identify type, complexity, domain, and intent, then selects prompt engineering techniques such as Plan and Solve or Few-Shot Learning.
  • •Fetches technique selection from the hosted PromptGen API while keeping code scanning local, sending only question text to the API.
  • •Provides an offline fallback and supports multiple local file types for context scanning.

BEST FOR

  • •Developers in Cursor wanting structured analysis of code optimization questions using their own project context.
  • •Engineers comparing architecture options or seeking systematic debugging approaches with examples from their codebase.
  • •Learners who want concept explanations grounded in their actual local code.

ABOUT PROMPT-GEN-MCP

PromptGen MCP Local Server is cataloged as an MCP server attributed to prompt-gen-mcp. A local MCP server that turns simple questions into enhanced prompts by combining PromptGen API-selected prompt engineering techniques with relevant context from your local codebase. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for PromptGen MCP Local Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does my source code get sent to the PromptGen API?

No; code scanning happens locally on your machine, and only the question text is sent to the API to retrieve techniques.

Does the server work without the PromptGen API?

It includes fallback support and can work offline.

Upstream README

View this exact version on GitHub

README.md · 11c0095465e9 · Fetched 2026-11-13 12:03:16 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

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 with pg_sk_

2. Get Other Required API Keys

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. Press Cmd+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

BeforeAfter
"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

FeatureBasic PromptEnhanced 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

flowchart 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

sequenceDiagram
    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:

# Test the server directly
python src/prompt_gen_mcp/server.py

# Check dependencies
pip install mcp sentence-transformers httpx groq

API Key Issues:

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.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for PromptGen MCP Local Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/prompt-gen-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools