Prompts MCP Server

by tanker327

Not rated
GitHub

About

An MCP server for managing and serving prompts from markdown files with YAML frontmatter support.

Details

Author
tanker327
Categories
Developer Tools, Other, Automation

Setup

Install Prompts MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/tanker327/prompts-mcp-server

Follow the installation instructions in the repository README, then restart your MCP client.

A Model Context Protocol (MCP) server for managing and providing prompts. This server allows users and LLMs to easily add, retrieve, and manage prompt templates stored as markdown files with YAML frontmatter support.

# 1. Install from NPM npm install -g prompts-mcp-server # 2. Add to your MCP client config (e.g., Claude Desktop) # Add this to ~/Library/Application Support/Claude/claude_desktop_config.json: { "mcpServers": { "prompts-mcp-server": { "command": "prompts-mcp-server" } } } # 3. Restart your MCP client and start using the tools!

- Add Prompts: Store new prompts as markdown files with YAML frontmatter
- Retrieve Prompts: Get specific prompts by name
- List Prompts: View all available prompts with metadata preview
- Delete Prompts: Remove prompts from the collection
- File-based Storage: Prompts are stored as markdown files in theprompts/directory
- Real-time Caching: In-memory cache with automatic file change monitoring
- YAML Frontmatter: Support for structured metadata (title, description, tags, etc.)
- TypeScript: Full TypeScript implementation with comprehensive type definitions
- Modular Architecture: Clean separation of concerns with dependency injection
- Comprehensive Testing: 95 tests with 84.53% code coverage

This will make theprompts-mcp-servercommand available in your system.

After installation, you need to configure your MCP client to use it. SeeMCP Client Configuration.

# 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 # Test the installation npm test

- Download the latest release from GitHub
- Extract to your desired location
- Run installation steps from Option 2.

After installation, verify the server works:

# Start the server (should show no errors) npm start # Or test with MCP Inspector npx @modelcontextprotocol/inspector prompts-mcp-server

The server provides the following tools:

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 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)

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

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

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

Once connected to an MCP client, you can use the tools like this:

Method 1: 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.

Method 2: 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] })

Method 3: 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... })
// Get a prompt get_prompt({ name: "code_review" }) // List all prompts (shows metadata preview) list_prompts({}) // Delete a prompt delete_prompt({ name: "old_prompt" })
prompts-mcp-server/ ├── src/ │ ├── index.ts # Main server orchestration │ ├── types.ts # TypeScript type definitions │ ├── cache.ts # Caching system with file watching │ ├── fileOperations.ts # File I/O operations │ └── tools.ts # MCP tool definitions and handlers ├── tests/ │ ├── helpers/ │ │ ├── testUtils.ts # Test utilities │ │ └── mocks.ts # Mock implementations │ ├── cache.test.ts # Cache module tests │ ├── fileOperations.test.ts # File operations tests │ ├── tools.test.ts # Tools module tests │ └── index.test.ts # Integration tests ├── prompts/ # Directory for storing prompt markdown files │ ├── code_review.md │ ├── debugging_assistant.md │ └── api_design.md ├── dist/ # Compiled JavaScript output ├── CLAUDE.md # Development documentation ├── package.json ├── tsconfig.json └── README.md

The server uses a modular architecture with the following components:

- PromptCache: In-memory caching with real-time file change monitoring via chokidar
- PromptFileOperations: File I/O operations with cache integration
- PromptTools: MCP tool definitions and request handlers
- Type System: Comprehensive TypeScript types for all data structures

Prompts can include structured metadata using YAML frontmatter:

--- title: "Prompt Title" description: "Brief description of the prompt" category: "development" tags: ["tag1", "tag2", "tag3"] difficulty: "beginner" | "intermediate" | "advanced" author: "Author Name" version: "1.0" --- # Prompt Content Your prompt content goes here...

This server can be configured with various MCP-compatible applications. Here are setup instructions for popular clients:

Add this to your Claude Desktop configuration file:

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

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

Add to your Cline MCP settings in VS Code:

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

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" } } } } }

For any MCP-compatible application, use these connection details:

- Protocol: Model Context Protocol (MCP)
- Transport: stdio
- Command:prompts-mcp-server
- Environment Variables:

- PROMPTS_FOLDER_PATH: Custom directory for storing prompts (optional, defaults to./prompts)

For development or testing with the MCP Inspector:

# Install MCP Inspector npm install -g @modelcontextprotocol/inspector # Run the server with inspector npx @modelcontextprotocol/inspector prompts-mcp-server

Create adocker-compose.ymlfor containerized deployment:

version: '3.8' services: prompts-mcp-server: build: . environment: - PROMPTS_FOLDER_PATH=/app/prompts volumes: - ./prompts:/app/prompts stdin_open: true tty: true

- The server automatically creates theprompts/directory if it doesn't exist
- Prompt files are automatically sanitized to use safe filenames (alphanumeric characters, hyphens, and underscores only)
- File changes are monitored in real-time and cache is updated automatically
- Prompts directory can be customized via thePROMPTS_FOLDER_PATHenvironment variable

Note: IfPROMPTS_FOLDER_PATHis set, it will be used as the prompts directory. If not set, the server defaults to./promptsrelative to the server location.

- Node.js 18.0.0 or higher
- TypeScript 5.0.0 or higher
- Dependencies:

- @modelcontextprotocol/sdk ^1.0.0
- gray-matter ^4.0.3 (YAML frontmatter parsing)
- chokidar ^3.5.3 (file watching)

The project includes comprehensive tooling for development:

- TypeScript: Strict type checking and modern ES modules
- Vitest: Fast testing framework with 95 tests and 84.53% coverage
- ESLint: Code linting (if configured)
- File Watching: Real-time cache updates during development

# Ensure TypeScript is built npm run build # Check that dist/ directory exists and contains .js files ls dist/

- Verify the server starts without errors:npm start
- Check the correct path is used in client configuration
- Ensure Node.js 18+ is installed:node --version
- 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

- On Linux: Installinotify-tools
- On macOS: No additional setup needed
- On Windows: Ensure Windows Subsystem for Linux (WSL) or native Node.js

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

- Check theGitHub Issues
- Review the test files for usage examples
- Use MCP Inspector for debugging client connections
- Check your MCP client's documentation for configuration details

- The server uses in-memory caching for fast prompt retrieval
- File watching automatically updates the cache when files change
- Large prompt collections (1000+ files) work efficiently due to caching
- Consider using SSD storage for better file I/O performance

👉 Have you built something cool on top ofprompts-mcp-server?
Open an issue or PR to add it here so others can discover your variant!

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Inline review comments for markdown specs and design docs. Agents request human review mid-task via MCP and pause until you send feedback.

Dynamically manage AI personas from markdown files for AI assistants like Claude.

Local-first MCP tools for AI-assisted work receipts, source intake, workspace maps, routing ledgers, action receipts, and MATCH / DRIFT / UNVERIFIABLE verification.

A pyRevit-based MCP server for Autodesk Revit, enabling connection to any MCP-compatible client.

The MCP server for Bitrix24 provides AI assistants with structured access to the Bitrix24 API. It delivers up-to-date method descriptions, parameters, and valid values, allowing assistants to work with precise data instead of guesswork. This reduces code errors and accelerates Bitrix24 integration development.

Connect bugAgent to any MCP-compatible AI client. File, classify, and manage bugs, feature requests, and more directly from your AI coding assistant. No context switching, no copy-paste — just describe the issue and bugAgent handles the rest.

What Shopify did for ecommerce, Chipp does for AI agents. Build, deploy, and monetize AI agents for your business — no engineering team required.

CodeVF MCP lets AI hand off problems to real engineers instantly, so your workflows don’t stall when models hit their limits.

Extentos is a multi-vendor development platform for adding smart-glasses capabilities to existing iOS and Android apps. The simplest analogy is Stripe for smart glasses

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.