Content
# MCP Prompt Server
> 🚀 **Important Upgrade Notice!**
We are launching a new upgraded service based on the MCP Prompt Server usage scenario: [mypromptmcp.com](https://mypromptmcp.com/).
Through this platform, you can freely manage your prompt words online, and allow flexible combination and packaging into MCP services, which can be easily integrated into different AI Agents or tools (such as Cursor, Windsurf, Cline, etc.) to achieve cross-platform calls and efficient collaboration.
Experience more powerful prompt management and distribution capabilities now, visit [mypromptmcp.com](https://mypromptmcp.com/) for details!
> ⚠️ **Important Reminder:**
>
> MCP Prompt Server can still be used normally, but we will no longer perform function upgrades and maintenance in the future. If you want to continue to get the latest features and experience, it is recommended to migrate and use [mypromptmcp.com](https://mypromptmcp.com/).
[English Version](README_EN.md)
This is a server based on Model Context Protocol (MCP) that provides preset prompt templates based on user task requirements to help Cline/Cursor/Windsurf... perform various tasks more efficiently. The server returns preset prompts as tools so that they can be better used in editors such as Cursor and Windsurf.
## Features
- Provides preset prompt templates for tasks such as code review, API documentation generation, and code refactoring
- Provides all prompt templates as MCP tools instead of MCP prompts format
- Supports dynamic parameter replacement to make prompt templates more flexible
- Allows developers to freely add and modify prompt templates
- Provides tool API to reload prompts and query available prompts
- Optimized for editors such as Cursor and Windsurf for better integration
## Directory Structure
```
prompt-server/
├── package.json # Project dependencies and scripts
├── src/ # Source code directory
│ ├── index.js # Server entry file
│ └── prompts/ # Preset prompt template directory
│ ├── code_review.yaml
│ ├── api_documentation.yaml
│ ├── code_refactoring.yaml
│ ├── test_case_generator.yaml
│ └── project_architecture.yaml
└── README.md # Project documentation
```
## Installation and Usage
1. Install dependencies:
```bash
cd prompt-server
npm install
```
2. Start the server:
```bash
npm start
```
The server will run on standard input/output and can be connected to by Cursor, Windsurf, or other MCP clients.
## Adding New Prompt Templates
You can create new prompt templates by adding new YAML or JSON files to the `src/prompts` directory. Each template file should contain the following:
```yaml
name: prompt_name # Unique identifier for calling this prompt
description: prompt description # Description of the prompt function
arguments: # List of arguments (optional)
- name: arg_name # Argument name
description: arg description # Argument description
required: true/false # Required or not
messages: # List of prompt messages
- role: user/assistant # Message role
content:
type: text # Content type
text: | # Text content, can contain parameter placeholders {{arg_name}}
Your prompt text here...
```
After adding a new file, the server will automatically load it the next time it starts, or you can use the `reload_prompts` tool to reload all prompts.
## Usage Examples
### Calling the code review tool in Cursor or Windsurf
```json
{
"name": "code_review",
"arguments": {
"language": "javascript",
"code": "function add(a, b) { return a + b; }"
}
}
```
### Calling the API documentation generation tool in Cursor or Windsurf
```json
{
"name": "api_documentation",
"arguments": {
"language": "python",
"code": "def process_data(data, options=None):\n # 处理数据\n return result",
"format": "markdown"
}
}
```
## Tool API
The server provides the following management tools:
- `reload_prompts`: Reload all preset prompts
- `get_prompt_names`: Get all available prompt names
In addition, all prompt templates defined in the `src/prompts` directory are provided to the client as tools.
## Integration with Editors
### Cursor
In Cursor, you need to edit the MCP configuration file:
1. Find or create Cursor's MCP configuration file (usually located in the `~/.cursor/` directory)
2. Add the following:
```json
{
"servers": [
{
"name": "Prompt Server",
"command": ["node", "/path/to/prompt-server/src/index.js"],
"transport": "stdio",
"initialization_options": {}
}
]
}
```
Make sure to replace `/path/to/prompt-server` with your actual project path.
3. Save the configuration and restart the editor
4. Now you should be able to see all available prompt tools in the tool panel
### Windsurf
In Windsurf, access the MCP configuration as follows:
1. Navigate to Windsurf - Settings > Advanced Settings, or
2. Use the command palette > Open Windsurf settings page
3. Scroll to the Cascade section, you will see the option to add a new server
4. Click the "Add Server" button, then select "Add Custom Server+"
5. Alternatively, you can directly edit the `~/.codeium/windsurf/mcp_config.json` file and add the following:
```json
{
"mcpServers": {
"prompt-server": {
"command": "node",
"args": [
"/path/to/prompt-server/src/index.js"
],
"transport": "stdio"
}
}
}
```
Make sure to replace `/path/to/prompt-server` with your actual project path.
6. After adding the server, click the refresh button
7. Now you should be able to see all available prompt tools in the tool panel
## Extension Suggestions
1. Add more prompt templates for professional fields
2. Implement prompt version control
3. Add prompt categories and tags
4. Implement prompt usage statistics and analysis
5. Add user feedback mechanism
Connection Info
You Might Also Like
markitdown
Python tool for converting files and office documents to Markdown.
Fetch
Retrieve and process content from web pages by converting HTML into markdown format.
chatbox
User-friendly Desktop Client App for AI Models/LLMs (GPT, Claude, Gemini, Ollama...)
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
continue
Continue is an open-source project for seamless server management.
semantic-kernel
Build and deploy intelligent AI agents with Semantic Kernel's orchestration...