Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

prompt-engineer-mcp-server

MCP.Pizza Chef: hireshBrem

The Prompt Engineer MCP server rewrites coding prompts to maximize effectiveness with AI IDEs like Cursor AI, leveraging Claude by Anthropic. It requires an Anthropic API key and integrates seamlessly with MCP workflows to enhance prompt quality for better AI-assisted coding results.

Use This MCP server To

Rewrite raw coding prompts for improved AI IDE comprehension Enhance prompt clarity and structure for Cursor AI integration Automatically optimize prompts for better code generation Integrate prompt rewriting into AI-assisted development workflows Use Claude-powered prompt refinement in real-time coding sessions

README

Coding Prompt Engineer MCP Server

This Model Context Protocol (MCP) server provides a tool to rewrite coding prompts for optimal results with Cursor AI and other AI IDEs, using Claude by Anthropic.

Installation

npm install

Install via Smithery

You can install this MCP server directly through Smithery by visiting: https://smithery.ai/server/@hireshBrem/prompt-engineer-mcp-server

Usage

Setting Environment Variables

The server requires an Anthropic API key to use Claude for formatting. Set it as an environment variable:

export ANTHROPIC_API_KEY=your_anthropic_api_key

If no API key is provided, the server will throw an error indicating the missing API key.

Running the Server

npm start

Or with MCP Inspector:

npx @modelcontextprotocol/inspector npm start

Tool: rewrite_coding_prompt

This tool takes a raw prompt and rewrites it for optimal results with Cursor AI and other AI IDEs.

Parameters

  • prompt (required): The raw user's prompt that needs rewriting
  • language (required): The programming language of the code

Example Usage

{
  "name": "rewrite_coding_prompt",
  "arguments": {
    "prompt": "Create a function to convert temperature between Celsius and Fahrenheit",
    "language": "typescript"
  }
}

How It Works

The server uses Claude 3 Sonnet by Anthropic to intelligently rewrite your prompts for better results. It enhances your prompt by:

  1. Adding clear structure and context
  2. Specifying requirements and expectations
  3. Including language-specific considerations
  4. Optimizing for AI IDE understanding

Features

  • Intelligent Prompt Engineering: Uses Claude 3 Sonnet to rewrite prompts for optimal results
  • Language-Aware: Customizes prompts based on target programming language
  • Easy Integration: Works seamlessly with Cursor and other AI IDEs
  • Low Temperature Setting: Uses 0.2 temperature for consistent, structured output

Configuration

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

NPX

{
  "mcpServers": {
    "cursor-prompt-engineer": {
      "command": "npx",
      "args": [
        "-y",
        "cursor-prompt-engineer"
      ]
    }
  }
}

Local Installation

# Clone the repository
git clone https://github.com/yourusername/cursor-prompt-engineer.git
cd cursor-prompt-engineer

# Install dependencies
npm install

# Run the server
node index.js

Example

Input:

Create a function that sorts an array of objects by a specific property

With arguments:

{
  "prompt": "Create a function that sorts an array of objects by a specific property",
  "language": "typescript"
}

The tool will rewrite the prompt to be more structured and detailed for optimal results with your AI IDE.

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

prompt-engineer-mcp-server FAQ

How do I install the Prompt Engineer MCP server?
Install via npm with 'npm install' or directly through Smithery at smithery.ai/server/@hireshBrem/prompt-engineer-mcp-server.
What environment variables are required to run this server?
You must set the ANTHROPIC_API_KEY environment variable with your Anthropic API key to enable Claude integration.
What happens if I don't provide an Anthropic API key?
The server will throw an error indicating the missing API key and will not run.
Can this server be used with AI models other than Claude?
While designed for Claude by Anthropic, it can be adapted for other LLMs like OpenAI and Gemini with additional configuration.
How do I start the Prompt Engineer MCP server?
Run 'npm start' or use MCP Inspector with 'npx @modelcontextprotocol/inspector npm start'.
What is the main tool provided by this server?
The 'rewrite_coding_prompt' tool rewrites raw coding prompts for optimal results in AI IDEs.
Is this server suitable for real-time prompt optimization?
Yes, it is designed to optimize prompts dynamically during coding sessions.
Does this server support integration with Cursor AI?
Yes, it specifically optimizes prompts for Cursor AI and similar AI IDEs.