A Model Context Protocol (MCP) server that helps your LLM instantly rewrite disappointing responses into one clean, high-quality prompt — running fully on your local machine.
This MCP server analyzes the recent conversation, identifies what you actually wanted, and generates a single, first-person improved prompt designed to produce a much better answer from the assistant.
No noise.
No confusion.
Just one perfect next prompt — every time.
The server reads:
- The recent conversation window
- The last user message
- An optional user comment explaining the dislike
It then determines:
- What you were trying to achieve
- Why the assistant’s last answer failed
- What clarity or structure was missing
Your MCP server always generates one optimized prompt that is:
- Written in first person
- (“Explain to me…”, “Give me…”, “Help me…”)
- Self-contained
- Works even if the AI never saw the earlier conversation
- Clear, specific, and free of meta references
- No “the user”, “previous messages”, or “the conversation above”
- Structured when needed
- Steps, examples, analogies, UX guidelines, etc.
You may also receive up to two short alternatives, but the main one is always clearly the best.
No matter what phrase you use:
- “use the tool”
- “give me a better prompt”
- “rewrite this prompt”
- “fix the prompt”
…the MCP server always returns one definitive best prompt.
This repository contains the local MCP server (TypeScript version) used with Claude Desktop.
It runs fully on your machine using tsx — no cloud hosting required.
git clone https://github.com/d180/PromptSuggestion-Claude-Desktop.git
cd PromptSuggestion-Claude-Desktopnpm installCreate a .env file inside the project root:
GEMINI_API_KEY=your_key_hereThat’s all you need locally.
Claude Desktop loads MCP connections from this file:
macOS
~/Library/Application Support/Claude/claude_desktop_config.json
Windows
%APPDATA%/Claude/claude_desktop_config.json.json
{
"mcpServers": {
"prompt-suggestion": {
"command": "npx",
"args": [
"tsx",
"PATH_TO_YOUR_PROJECT/src/stdio.ts"
],
"env": {
"GEMINI_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}Replace:
PATH_TO_YOUR_PROJECT→ Your actual local folder pathYOUR_API_KEY_HERE→ Your Gemini API key
Then restart Claude Desktop.
Your tool will appear automatically when Claude asks for MCP permissions.
When chatting with Claude, simply type any of the following:
- "Use the tool and give me a better prompt."
- "Rewrite this prompt using the MCP tool."
- "Fix this prompt."
- "Give me a cleaner prompt for this."
Claude Desktop will:
- Detect the MCP intent
- Call your local MCP server
- Request permission to run it
- Return the improved prompt
The MCP server always returns:
{
"summary": "...",
"root_causes": ["..."],
"suggested_prompt": "THE BEST FIRST-PERSON PROMPT",
"alternatives": ["..."],
"confidence": "0.0 - 1.0"
}The best improved prompt is always in:
"suggested_prompt"
- No ChatGPT developer mode required
- Claude’s memory stays ON
- Runs entirely on your machine
- No cloud, no accounts, no hosting
- Extremely fast and private