This server provides pre-defined prompt templates based on the Model Context Protocol (MCP), designed to help Cline, Cursor, Windsurf and other compatible editors execute various tasks more efficiently. The server delivers these templates as MCP tools, allowing for more flexible and integrated usage within supported editors.
cd prompt-server
npm install
npm start
The server runs on standard input/output, ready to be connected to Cursor, Windsurf, or other MCP clients.
To integrate with Cursor, modify the MCP configuration file:
~/.cursor/
directory){
"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.
To configure with Windsurf:
~/.codeium/windsurf/mcp_config.json
file, adding:{
"mcpServers": {
"prompt-server": {
"command": "node",
"args": [
"/path/to/prompt-server/src/index.js"
],
"transport": "stdio"
}
}
}
Replace /path/to/prompt-server
with your actual project path.
To use the code review tool in Cursor or Windsurf:
{
"name": "code_review",
"arguments": {
"language": "javascript",
"code": "function add(a, b) { return a + b; }"
}
}
To generate API documentation:
{
"name": "api_documentation",
"arguments": {
"language": "python",
"code": "def process_data(data, options=None):\n # Process data\n return result",
"format": "markdown"
}
}
You can create new prompt templates by adding YAML or JSON files to the src/prompts
directory. Each template file should include:
name: prompt_name # Unique identifier for calling this prompt
description: prompt description # Description of prompt functionality
arguments: # Parameter list (optional)
- name: arg_name # Parameter name
description: arg description # Parameter description
required: true/false # Whether required
messages: # Prompt message list
- role: user/assistant # Message role
content:
type: text # Content type
text: | # Text content, can include parameter placeholders {{arg_name}}
Your prompt text here...
After adding new files, the server will automatically load them on next startup, or you can use the reload_prompts
tool to refresh all prompts.
The server provides the following management tools:
reload_prompts
: Reloads all preset promptsget_prompt_names
: Gets all available prompt namesAdditionally, all prompt templates defined in the src/prompts
directory are made available as tools to clients.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.