
代码提示工程师
STDIO优化AI代码编辑器提示的MCP服务器
优化AI代码编辑器提示的MCP服务器
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.
npm install
You can install this MCP server directly through Smithery by visiting: https://smithery.ai/server/@hireshBrem/prompt-engineer-mcp-server
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.
npm start
Or with MCP Inspector:
npx @modelcontextprotocol/inspector npm start
This tool takes a raw prompt and rewrites it for optimal results with Cursor AI and other AI IDEs.
prompt
(required): The raw user's prompt that needs rewritinglanguage
(required): The programming language of the code{ "name": "rewrite_coding_prompt", "arguments": { "prompt": "Create a function to convert temperature between Celsius and Fahrenheit", "language": "typescript" } }
The server uses Claude 3 Sonnet by Anthropic to intelligently rewrite your prompts for better results. It enhances your prompt by:
Add this to your claude_desktop_config.json
:
{ "mcpServers": { "cursor-prompt-engineer": { "command": "npx", "args": [ "-y", "cursor-prompt-engineer" ] } } }
# 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
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.
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.