prompt-enhancement-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@prompt-enhancement-mcp-server enhance this prompt: write a story about a dragon"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Prompt Enhancement MCP Server
An MCP (Model Context Protocol) server that enhances user prompts using AI. It takes a rough prompt and returns a more detailed, clear, and effective version. Works with any MCP-compatible client like Claude Desktop or Claude Code.
Quick Start
Install and set your API key:
export ANTHROPIC_API_KEY=sk-ant-...Add to your MCP client config (e.g. Claude Desktop):
{ "mcpServers": { "prompt-enhancer": { "command": "npx", "args": ["-y", "prompt-enhancement-mcp-server"], "env": { "ANTHROPIC_API_KEY": "your-key-here" } } } }Use the
enhance_prompttool to improve any prompt.
Related MCP server: Refine Prompt
Installation
# Run directly with npx (recommended)
npx -y prompt-enhancement-mcp-server
# Or install globally
npm install -g prompt-enhancement-mcp-server
# Or install locally
npm install prompt-enhancement-mcp-serverSupported Providers
Provider | Env Variable | Default Model |
Anthropic |
|
|
OpenAI |
|
|
OpenRouter |
|
|
Gemini |
|
|
OpenAI-compatible |
|
|
Set at least one API key as an environment variable.
Configuration
Environment Variables
# API keys (set at least one)
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
OPENROUTER_API_KEY=sk-or-...
GEMINI_API_KEY=...
# Optional settings
PROMPT_ENHANCER_DEFAULT_PROVIDER=anthropic # Which provider to use by default
PROMPT_ENHANCER_CONFIG=/path/to/config.json # Custom config file path
PROMPT_ENHANCER_LOG_LEVEL=info # debug, info, warn, errorOptional Config File
Create ~/.config/prompt-enhancer/config.json for model defaults, custom templates, or OpenAI-compatible endpoints:
{
"defaultProvider": "anthropic",
"providers": {
"anthropic": {
"model": "claude-sonnet-4-5-20250929",
"temperature": 0.7,
"maxTokens": 4096
},
"openai": {
"model": "gpt-4o"
},
"openrouter": {
"model": "anthropic/claude-sonnet-4-5-20250929",
"baseUrl": "https://openrouter.ai/api/v1"
},
"gemini": {
"model": "gemini-2.0-flash"
}
},
"templates": {
"default": "Generate an enhanced version of this prompt (reply with only the enhanced prompt - no conversation, explanations, lead-in, bullet points, placeholders, or surrounding quotes):\n\n${userInput}"
},
"options": {
"maxContextMessages": 10,
"contextTruncateLength": 500
}
}API keys are never stored in the config file -- always use environment variables.
Tool: enhance_prompt
The server exposes a single MCP tool:
Parameter | Type | Required | Description |
| string | Yes | The prompt text to enhance |
| string | No | Provider to use ( |
| string | No | Model override (e.g. |
| array | No | Conversation history ( |
| string | No | Custom template. Use |
Claude Desktop Integration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"prompt-enhancer": {
"command": "npx",
"args": ["-y", "prompt-enhancement-mcp-server"],
"env": {
"ANTHROPIC_API_KEY": "your-key-here"
}
}
}
}Claude Code Integration
Add to ~/.claude/claude_code_config.json or your project's .mcp.json:
{
"mcpServers": {
"prompt-enhancer": {
"command": "npx",
"args": ["-y", "prompt-enhancement-mcp-server"],
"env": {
"OPENAI_API_KEY": "your-key-here",
"PROMPT_ENHANCER_DEFAULT_PROVIDER": "openai"
}
}
}
}Custom Templates
Override the default enhancement template via the config file or the template tool parameter:
{
"templates": {
"default": "Rewrite this prompt to be more specific and actionable:\n\n${userInput}"
}
}Or pass inline when calling the tool:
{
"text": "write a web app",
"template": "Add technical details and edge cases to this prompt:\n\n${userInput}"
}OpenAI-Compatible Endpoints
Connect to Ollama, LM Studio, vLLM, or any OpenAI-compatible API:
{
"providers": {
"openai-compatible": {
"baseUrl": "http://localhost:11434/v1",
"model": "llama3"
}
}
}Then use it:
{
"text": "write a function",
"provider": "openai-compatible"
}Troubleshooting
"Unsupported provider" error
Check that the provider name is one of: anthropic, openai, openrouter, gemini, openai-compatible.
"API key is required" / authentication errors Make sure the corresponding environment variable is set. API keys are loaded from env vars, not the config file.
Timeouts or rate limit errors The server retries transient errors up to 3 times with exponential backoff. If you're consistently hitting rate limits, try a different provider or model.
No output / server won't start
Check PROMPT_ENHANCER_LOG_LEVEL=debug for detailed logging. Logs go to stderr (MCP protocol reserves stdout for communication).
Development
git clone <repo-url>
cd prompt-enhancement-mcp-server
npm install
npm run build
npm testLicense
Apache-2.0
Available Tools
1 toolenhance_promptC
Enhances a user prompt using AI to make it more detailed, clear, and effective
Inputs: text (required), model, context, provider, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of misselection or overlap. Its purpose is unambiguous.
The single tool follows a clean verb_noun snake_case convention (enhance_prompt). No inconsistencies are possible with one tool.
One tool matches the narrowly stated purpose but is thin even for that scope. There is no room for variants (e.g. tone, length, format options) that a prompt-enhancement service would plausibly offer.
The core enhancement operation is covered, but the surface is a single dead-end call with no options for enhancement style, target format, or refinement iterations. Usable but notably shallow for the domain.
Maintenance
Related MCP Connectors
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Your prompt library in any MCP client: list, fetch, save and version prompt templates.
Turn rough ideas into structured prompts for ChatGPT, Claude, Gemini, image and video AI.
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceThis MCP server provides research-backed prompt optimization tools and professional domain templates designed to improve AI performance through strategies like Tree of Thoughts and Medprompt. It enables users to analyze, auto-optimize, and refine prompts using advanced reasoning patterns and safety-critical alignment techniques.25MIT
- AlicenseAqualityDmaintenanceAn MCP server that uses Claude 3.5 Sonnet to transform ordinary prompts into structured, professionally engineered instructions for any LLM. It enhances AI interactions by adding context, requirements, and structural clarity to raw user inputs.13MIT
- AlicenseAqualityBmaintenanceAn MCP server that transforms vague prompts into platform-optimized prompts for 58 AI platforms across 7 categories. Send a raw prompt. Get back a version specifically optimized for Midjourney, DALL-E, Sora, Runway, ElevenLabs, Claude, ChatGPT, or any of the 58 supported platforms — with the right syntax, parameters, and structure each platform expects.23129 npm13Apache 2.0
- AlicenseAqualityDmaintenanceAn advanced MCP server that intelligently enhances prompts using 44+ metaprompt strategies, with LLM-driven strategy selection and enterprise-grade features.853 npm9MIT