Supports containerized deployment of the prompts MCP server with volume mounting for prompt storage
Mentioned as an available code linting tool for development of the MCP server
Provides installation directly from the GitHub repository, with access to releases, issues, and documentation
Provides specific configuration path for Claude Desktop integration on macOS
Stores prompts as markdown files with YAML frontmatter for structured metadata
Runs the MCP server using Node.js with specific version requirements (18.0.0+)
Implemented fully in TypeScript with comprehensive type definitions and strict type checking
Uses Vitest as the testing framework with watch mode for development
Supports structured metadata using YAML frontmatter in prompt files
Prompts MCP Server
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.
Quick Start
Features
- 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 the
prompts/
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
Installation
Option 1: From GitHub (Recommended)
Option 2: Direct Download
- Download the latest release from GitHub
- Extract to your desired location
- Run installation steps above
Option 3: Development Setup
Verification
After installation, verify the server works:
Testing
Run the comprehensive test suite:
Run tests with coverage:
Watch mode for development:
MCP Tools
The server provides the following 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
Once connected to an MCP client, you can use the tools like this:
Method 1: Quick prompt creation with automatic metadata
Method 2: Structured prompt creation with full metadata control
Method 3: Manual frontmatter (preserves existing metadata)
Other operations
File Structure
Architecture
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
YAML Frontmatter Support
Prompts can include structured metadata using YAML frontmatter:
MCP Client Configuration
This server can be configured with various MCP-compatible applications. Here are setup instructions for popular clients:
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
Cline (VS Code Extension)
Add to your Cline MCP settings in VS Code:
Continue.dev
In your ~/.continue/config.json
:
Zed Editor
In your Zed settings (~/.config/zed/settings.json
):
Custom MCP Client
For any MCP-compatible application, use these connection details:
- Protocol: Model Context Protocol (MCP)
- Transport: stdio
- Command:
node /path/to/prompts-mcp-server/dist/index.js
- Environment Variables:
PROMPTS_DIR
: Custom directory for storing prompts (optional, defaults to./prompts
)
Development/Testing Setup
For development or testing with the MCP Inspector:
Docker Configuration
Create a docker-compose.yml
for containerized deployment:
Server Configuration
- The server automatically creates the
prompts/
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 the
PROMPTS_DIR
environment variable
Environment Variables
Variable | Description | Default |
---|---|---|
PROMPTS_DIR | Directory to store prompt files | ./prompts |
NODE_ENV | Environment mode | production |
Requirements
- 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)
Development
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
Troubleshooting
Common Issues
"Module not found" errors
MCP client can't connect
- 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 node dist/index.js
Permission errors with prompts directory
File watching not working
- On Linux: Install
inotify-tools
- On macOS: No additional setup needed
- On Windows: Ensure Windows Subsystem for Linux (WSL) or native Node.js
Debug Mode
Enable debug logging by setting environment variables:
Getting Help
- Check the GitHub Issues
- Review the test files for usage examples
- Use MCP Inspector for debugging client connections
- Check your MCP client's documentation for configuration details
Performance Tips
- 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
License
MIT
You must be authenticated.
local-only server
The server can only run on the client's local machine because it depends on local resources.
A Model Context Protocol server for managing prompt templates as markdown files with YAML frontmatter, allowing users and LLMs to easily add, retrieve, and manage prompts.
Related MCP Servers
- AsecurityAlicenseAqualityA server based on Model Context Protocol that provides predefined prompt templates for tasks like code review and API documentation generation, enabling more efficient workflows in Cursor/Windsurf editors.Last updated -105JavaScriptMIT License
- AsecurityFlicenseAqualityA Python server implementing the Model Context Protocol to provide customizable prompt templates, resources, and tools that enhance LLM interactions in the continue.dev environment.Last updated -2Python
- -securityAlicense-qualityA Model Context Protocol server that generates prompts based on Git repository content, including a command to generate PR descriptions from diffs.Last updated -1PythonMIT License
- -securityFlicense-qualityA Model Context Protocol server that provides greeting tools, resources, and prompts, demonstrating client-server interaction using TypeScript.Last updated -TypeScript