Prompts Library MCP server

Manages prompt templates as markdown files with YAML frontmatter, providing structured organization, real-time file watching, and CRUD operations for systematic prompt library management and team collaboration.
Back to servers
Setup instructions
Provider
Eric Wu
Release date
Jun 14, 2025
Language
Go
Stats
10 stars

The Prompts MCP Server provides a convenient way to manage and retrieve prompt templates through the Model Context Protocol (MCP). This server stores prompts as markdown files with YAML frontmatter and offers tools for adding, retrieving, listing, and deleting prompts.

Installation

Install from NPM (Recommended)

npm install -g prompts-mcp-server

After installation, you need to configure your MCP client to use the server.

Install from GitHub (Development)

# Clone the repository
git clone https://github.com/tanker327/prompts-mcp-server.git
cd prompts-mcp-server

# Install dependencies
npm install

# Build the TypeScript code
npm run build

Verify Installation

Test that the server works correctly:

# Start the server
npm start

# Or test with MCP Inspector
npx @modelcontextprotocol/inspector prompts-mcp-server

MCP Client Configuration

Claude Desktop

Add this to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "prompts-mcp-server": {
      "command": "prompts-mcp-server",
      "env": {
        "PROMPTS_FOLDER_PATH": "/path/to/your/prompts/directory"
      }
    }
  }
}

Cline (VS Code Extension)

{
  "cline.mcp.servers": {
    "prompts-mcp-server": {
      "command": "prompts-mcp-server",
      "env": {
        "PROMPTS_FOLDER_PATH": "/path/to/your/prompts/directory"
      }
    }
  }
}

Continue.dev

In your ~/.continue/config.json:

{
  "mcpServers": [
    {
      "name": "prompts-mcp-server",
      "command": "prompts-mcp-server",
      "env": {
        "PROMPTS_FOLDER_PATH": "/path/to/your/prompts/directory"
      }
    }
  ]
}

Zed Editor

In your Zed settings (~/.config/zed/settings.json):

{
  "assistant": {
    "mcp_servers": {
      "prompts-mcp-server": {
        "command": "prompts-mcp-server",
        "env": {
          "PROMPTS_DIR": "/path/to/your/prompts/directory"
        }
      }
    }
  }
}

Available Tools

add_prompt

Add a new prompt to the collection. If no YAML frontmatter is provided, default metadata will be automatically added.

  • name (string): Name of the prompt
  • content (string): Content of the prompt in markdown format with optional YAML frontmatter

create_structured_prompt

Create a new prompt with guided metadata structure and validation.

  • name (string): Name of the prompt
  • title (string): Human-readable title for the prompt
  • description (string): Brief description of what the prompt does
  • category (string, optional): Category (defaults to "general")
  • tags (array, optional): Array of tags for categorization (defaults to ["general"])
  • difficulty (string, optional): "beginner", "intermediate", or "advanced" (defaults to "beginner")
  • author (string, optional): Author of the prompt (defaults to "User")
  • content (string): The actual prompt content (markdown)

get_prompt

Retrieve a prompt by name.

  • name (string): Name of the prompt to retrieve

list_prompts

List all available prompts with metadata preview. No parameters required.

delete_prompt

Delete a prompt by name.

  • name (string): Name of the prompt to delete

Usage Examples

Quick Prompt Creation with Automatic Metadata

// Add a prompt without frontmatter - metadata will be added automatically
add_prompt({
  name: "debug_helper",
  content: `# Debug Helper

Help me debug this issue by:
1. Analyzing the error message
2. Suggesting potential causes
3. Recommending debugging steps`
})
// This automatically adds default frontmatter with title "Debug Helper", category "general", etc.

Structured Prompt Creation with Full Metadata Control

// Create a prompt with explicit metadata using the structured tool
create_structured_prompt({
  name: "code_review",
  title: "Code Review Assistant",
  description: "Helps review code for best practices and potential issues",
  category: "development",
  tags: ["code", "review", "quality"],
  difficulty: "intermediate",
  author: "Development Team",
  content: `# Code Review Prompt

Please review the following code for:
- Code quality and best practices
- Potential bugs or issues
- Performance considerations
- Security vulnerabilities

## Code to Review
[Insert code here]`
})

Manual Frontmatter (Preserves Existing Metadata)

// Add a prompt with existing frontmatter - no changes made
add_prompt({
  name: "custom_prompt",
  content: `---
title: "Custom Assistant"
category: "specialized"
tags: ["custom", "specific"]
difficulty: "advanced"
---

# Custom Prompt Content
Your specific prompt here...`
})

Basic Operations

// Get a prompt
get_prompt({ name: "code_review" })

// List all prompts (shows metadata preview)
list_prompts({})

// Delete a prompt
delete_prompt({ name: "old_prompt" })

Server Configuration

The server automatically creates the prompts/ directory if it doesn't exist. Prompt files are stored with sanitized filenames, and file changes are monitored in real-time to update the cache automatically.

Environment Variables

Variable Description Default
PROMPTS_FOLDER_PATH Custom directory to store prompt files ./prompts
NODE_ENV Environment mode production

Troubleshooting

Common Issues

"Module not found" errors

# Ensure TypeScript is built
npm run build

# Check that dist/ directory exists and contains .js files
ls dist/

MCP client can't connect

  1. Verify the server starts without errors: npm start
  2. Check the correct path is used in client configuration
  3. Ensure Node.js 18+ is installed: node --version
  4. Test with MCP Inspector: npx @modelcontextprotocol/inspector prompts-mcp-server

Permission errors with prompts directory

# Ensure the prompts directory is writable
mkdir -p ./prompts
chmod 755 ./prompts

Debug Mode

Enable debug logging by setting environment variables:

# Enable debug mode
DEBUG=* node dist/index.js

# Or with specific debug namespace
DEBUG=prompts-mcp:* node dist/index.js

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "prompts-mcp-server" '{"command":"prompts-mcp-server"}'

See the official Claude Code MCP documentation for more details.

For Cursor

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.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "prompts-mcp-server": {
            "command": "prompts-mcp-server"
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "prompts-mcp-server": {
            "command": "prompts-mcp-server"
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later