trackmcp
Back to directory
FelippeFarias

refine-prompt

View on GitHub

Refine Prompt

3 stars JavaScriptOthers Updated Sep 7, 2025

Documentation

โœจ Refine Prompt โœจ

Transform ordinary prompts into powerful, structured instructions for any LLM

โ€ข

โ€ข

โ€ข

โ€ข

โ€ข


๐Ÿ“‹ Overview

Refine Prompt is an intelligent prompt engineering tool that transforms ordinary prompts into powerful, structured instructions for any large language model (LLM). Using Claude's advanced capabilities, it enhances your prompts to produce exceptional results across all AI platforms.

> ๐Ÿ”‘ Important: Your prompt must include the keyword "refine" to activate the enhancement process.

>

> Example: `"refine, Create a function that calculates the factorial of a number"`


๐Ÿš€ Installation

๐Ÿ“ฆ Via NPM

bash
npm install refine-prompt

๐Ÿ› ๏ธ Via Smithery

You can install this MCP server directly through Smithery by visiting:

Smithery - Refine Prompt

๐Ÿ“ Via Local Repository

bash
# Clone the repository
git clone https://github.com/felippefarias/refine-prompt.git
cd refine-prompt

# Install dependencies
npm install

๐Ÿ Getting Started

๐Ÿ”‘ API Key Setup

Refine Prompt requires an Anthropic API key to access Claude's advanced capabilities:

bash
export ANTHROPIC_API_KEY=your_anthropic_api_key

Without an API key, the tool will display an error message.

โš™๏ธ Running the Server

bash
npm start

Or with MCP Inspector:

bash
npx @modelcontextprotocol/inspector npm start

๐Ÿ”ง Tool: rewrite_prompt - The Power of Refinement

Transform your ideas into expertly crafted prompts. This powerful tool analyzes your input and generates a professionally engineered prompt that maximizes AI understanding and response quality.

๐Ÿ“ Parameters

ParameterDescriptionRequired
`prompt`Your raw prompt that needs refinement (must include "refine" keyword)โœ…
`language`For code-related prompts, specify the target programming languageโŒ

๐Ÿ“‹ Example Usage

For general prompts

json
{
  "name": "rewrite_prompt",
  "arguments": {
    "prompt": "refine, Summarize the main points of the article titled \"The Future of AI\""
  }
}

For code-related prompts

json
{
  "name": "rewrite_prompt",
  "arguments": {
    "prompt": "refine, 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. Every prompt must include the keyword "refine" to trigger the enhancement process.

It enhances your prompt by:

1. ๐Ÿ“ Adding clear structure and context

2. ๐Ÿ“ Specifying requirements and expectations

3. ๐Ÿ” Including domain-specific considerations

4. ๐ŸŒ Optimizing for any LLM understanding


โœจ Features


โš™๏ธ Configuration

๐Ÿ–ฅ๏ธ Usage with Claude Desktop

Add this to your `claude_desktop_config.json`:

NPX

json
{
  "mcpServers": {
    "refine-prompt": {
      "command": "npx",
      "args": [
        "-y",
        "refine-prompt"
      ]
    }
  }
}

Local Installation

bash
# Clone the repository
git clone https://github.com/felippefarias/refine-prompt.git
cd refine-prompt

# Install dependencies
npm install

# Run the server
node index.js

๐Ÿ“Š Examples

๐Ÿ“ General Prompt Enhancement

Input

Arguments

code
refine, Summarize the main points of the article titled "The Future of AI"
json
{
  "prompt": "refine, Summarize the main points of the article titled \"The Future of AI\""
}

Input

Arguments

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

The tool will rewrite both prompts to be more structured and detailed for optimal results with any LLM.


๐Ÿš€ Elevate Your AI Interactions

Refine Prompt bridges the gap between human thinking and AI understanding. By transforming your natural language instructions into expertly engineered prompts, it helps you unlock the full potential of any language model. Whether you're a developer, content creator, researcher, or AI enthusiast, Refine Prompt gives you the power to communicate with AI more effectively.


๐Ÿ“„ License

Refine Prompt is licensed under the MIT License. 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.

Frequently asked questions

What is refine-prompt?

refine-prompt is Refine Prompt

How do I install refine-prompt?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is refine-prompt open source?

Yes โ€” it is hosted on GitHub at https://github.com/FelippeFarias/refine-prompt and has 3 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP