Refine Prompt

Refine Prompt

An 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.

Category
访问服务器

README

<p align="center"> <img src="https://img.icons8.com/color/96/000000/lighting-bolt--v2.png" alt="Refine Prompt Logo" width="120" height="120"/> </p>

<h1 align="center">✨ Refine Prompt ✨</h1>

<p align="center"> <b>Transform ordinary prompts into powerful, structured instructions for any LLM</b> </p>

<p align="center"> <a href="https://github.com/felippefarias/refine-prompt/actions"><img src="https://img.shields.io/github/actions/workflow/status/felippefarias/refine-prompt/main.yml?style=flat-square" alt="Build Status"></a> <a href="https://github.com/felippefarias/refine-prompt/blob/main/LICENSE"><img src="https://img.shields.io/github/license/felippefarias/refine-prompt?style=flat-square" alt="License"></a> <a href="https://www.npmjs.com/package/refine-prompt"><img src="https://img.shields.io/npm/v/refine-prompt?style=flat-square" alt="NPM Version"></a> <a href="https://smithery.ai/server/@FelippeFarias/refine-prompt"><img src="https://smithery.ai/badge/@FelippeFarias/refine-prompt" alt="Smithery Badge"></a> </p>

<p align="center"> <a href="#-installation">Installation</a> • <a href="#-getting-started">Getting Started</a> • <a href="#-how-it-works">How It Works</a> • <a href="#-features">Features</a> • <a href="#-examples">Examples</a> • <a href="#-license">License</a> </p>


📋 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

npm install refine-prompt

🛠️ Via Smithery

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

📁 Via Local Repository

# 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:

export ANTHROPIC_API_KEY=your_anthropic_api_key

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

⚙️ Running the Server

npm start

Or with MCP Inspector:

npx @modelcontextprotocol/inspector npm start

🔧 Tool: rewrite_prompt - The Power of Refinement

<p align="center"> <img src="https://img.icons8.com/fluent/48/000000/wrench.png" alt="Tool Icon" width="48" height="48"/> </p>

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

Parameter Description Required
prompt Your raw prompt that needs refinement (must include "refine" keyword)
language For code-related prompts, specify the target programming language

📋 Example Usage

<details> <summary><b>For general prompts</b></summary>

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

</details>

<details> <summary><b>For code-related prompts</b></summary>

{
  "name": "rewrite_prompt",
  "arguments": {
    "prompt": "refine, Create a function to convert temperature between Celsius and Fahrenheit",
    "language": "typescript"
  }
}

</details>


🧠 How It Works

<p align="center"> <img src="https://img.icons8.com/color/96/000000/artificial-intelligence.png" alt="AI" width="64" height="64"/> </p>

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

<div align="center">

Feature Description
🤖 AI-Powered Refinement Leverages Claude 3.5 Sonnet's advanced capabilities to transform your prompts
🔑 Activation with Keywords Simply include "refine" in your prompt to trigger the enhancement
🌐 Universal Compatibility Optimizes prompts for any type of task or domain
💻 Code-Specific Intelligence Provides specialized enhancements for programming tasks when language is specified
🔄 Seamless Integration Works flawlessly with any LLM-powered application or workflow
🎯 Precision-Focused Uses 0.2 temperature setting to ensure reliable, consistent output quality
📊 Structural Clarity Adds logical organization, clear instructions, and proper formatting

</div>


⚙️ Configuration

🖥️ Usage with Claude Desktop

Add this to your claude_desktop_config.json:

<details> <summary><b>NPX</b></summary>

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

</details>

<details> <summary><b>Local Installation</b></summary>

# 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

</details>


📊 Examples

📝 General Prompt Enhancement

<table> <tr> <th>Input</th> <th>Arguments</th> </tr> <tr> <td>

refine, Summarize the main points of the article titled "The Future of AI"

</td> <td>

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

</td> </tr> </table>

💻 Code-Related Prompt Enhancement

<table> <tr> <th>Input</th> <th>Arguments</th> </tr> <tr> <td>

refine, Create a function that sorts an array of objects by a specific property

</td> <td>

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

</td> </tr> </table>

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


🚀 Elevate Your AI Interactions

<p align="center"> <img src="https://img.icons8.com/fluent/96/000000/rocket.png" alt="Rocket" width="64" height="64"/> </p>

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

<p align="center"> <img src="https://img.icons8.com/ios/50/000000/certificate.png" alt="License" width="32" height="32"/> </p>

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选