Get the FREE Ultimate OpenClaw Setup Guide →

prompt-engineer

Write 10x better prompts using Prompt Engineer MCP server.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio hireshbrem-prompt-engineer-mcp-server node index.js \
  --env ANTHROPIC_API_KEY="Your Anthropic Claude API key (required)"

How to use

This MCP server provides an intelligent prompt rewriting tool designed to optimize coding prompts for Cursor AI and other AI IDEs using Anthropic’s Claude model. The core feature, rewrite_coding_prompt, accepts a raw programming prompt and its target language, then outputs a structured, detailed prompt aimed at improving accuracy and results when used with code assistants. It’s particularly useful when you want to transform vague prompts into actionable, well-scoped instructions for code generation tasks across languages like JavaScript, TypeScript, Python, and more. The server is designed to integrate smoothly with MCP Inspector and supports running via npm start or directly with npx for quick testing.

To use the tool, pass a JSON payload containing the prompt and language to the rewrite_coding_prompt endpoint. The response will present a rewritten prompt that adds clarity, specifies requirements, and includes language-specific considerations to maximize results in AI IDEs or Cursor-like environments.

How to install

Prerequisites:

  • Node.js (LTS version) and npm installed on your machine
  • Optional: access to an Anthropic API key for Claude integration

Install steps:

  1. Install dependencies npm install

  2. Set required environment variable (Anthropic API key)

    • On Unix/Linux/macOS: export ANTHROPIC_API_KEY=your_anthropic_api_key
    • On Windows (PowerShell): $env:ANTHROPIC_API_KEY = "your_anthropic_api_key"
  3. Run the server npm start

Alternative (for testing via MCP Inspector): npx @modelcontextprotocol/inspector npm start

Note: If the ANTHROPIC_API_KEY is not provided, the server will error indicating the missing API key.

Additional notes

Tips and common considerations:

  • The server relies on Anthropic Claude for rewriting prompts; ensure your API key is valid and has access to Claude.
  • The rewrite_coding_prompt tool expects two arguments: prompt (the raw coding prompt) and language (the target programming language).
  • If you need to run via NPX in MCP contexts, ensure the package name used in NPX matches your deployment (cursor-prompt-engineer as referenced in this project).
  • For local development, you can clone and run index.js as the entry point, adjusting the environment as needed for different workflows.
  • When debugging, check logs for missing API key or rate limits from Anthropic, and verify that npm install completed successfully to ensure all dependencies are present.

Related MCP Servers

Sponsor this space

Reach thousands of developers