PromptDB MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PromptDB MCP Server get the code review prompt"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PromptDB MCP Server
A Model Context Protocol (MCP) server that provides prompt storage and retrieval functionality. Store, version, and manage your prompts with rich metadata and caching for optimal performance.
Features
Prompt Storage: Store prompts as individual JSON files with rich metadata
Version Management: Automatic versioning with history preservation
Caching: In-memory LRU cache for performance optimization
Rich Metadata: Tags, descriptions, timestamps, and version tracking
MCP Integration: Full compatibility with MCP-enabled applications
Dual Transport Support: Both stdio and SSE (Server-Sent Events) transports
Cloud Deployment: Ready for deployment to Vercel, Netlify, and other cloud platforms
Related MCP server: PromptBranch MCP
Pre-populated Prompts
The server comes with a set of pre-populated prompts ready for immediate use. You can retrieve them using the getPrompt tool with the following task names:
assistantcode-reviewdocumentationsummarise-paperto-flash-cards
Installation
Global Installation
# Using pnpm (recommended)
pnpm add -g promptdb-mcp-server
# Using npm
npm install -g promptdb-mcp-serverLocal Development
# Clone and install dependencies
git clone <repository-url>
cd promptdb-mcp-server
pnpm install
# Build the project
pnpm build
# Start the server
pnpm startTransport Options
The PromptDB MCP Server supports two transport methods:
1. Stdio Transport (Default)
For local development and MCP clients that support process communication:
# Default stdio transport
promptdb-mcp-server
# or explicitly
promptdb-mcp-server --transport stdio2. SSE Transport (Server-Sent Events)
For web applications and cloud deployment:
# SSE transport on port 3000
promptdb-mcp-server --transport sse --port 3000
# Using environment variables
export TRANSPORT_TYPE=sse
export PORT=3000
promptdb-mcp-serverMCP Configuration
Stdio Transport Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"promptdb": {
"command": "promptdb-mcp-server",
"args": []
}
}
}SSE Transport Configuration
For MCP clients that support HTTP/SSE transport:
{
"mcpServers": {
"promptdb": {
"transport": "sse",
"url": "http://localhost:3000/sse"
}
}
}Cloud Deployment
Vercel Deployment
# Build and deploy
pnpm build
vercel deploy
# Set environment variables in Vercel dashboard:
# TRANSPORT_TYPE=sse
# PORT=3000Netlify Deployment
# Build and deploy
pnpm build
netlify deploy --prod --dir=dist
# Set TRANSPORT_TYPE=sse in Netlify dashboardSSE Endpoints
When running in SSE mode, the server provides:
SSE Endpoint:
http://localhost:3000/sse- MCP communicationHealth Check:
http://localhost:3000/health- Server statusServer Info:
http://localhost:3000/- Server metadata
Tools
listPrompts
List all available prompts with their content and versions.
Parameters: None
Returns: Array of prompts with taskname, content, and version
getPrompt
Retrieve a specific prompt by task name.
Parameters:
taskname(required): The task name identifierversion(optional): Specific version (defaults to latest)
Returns: Full prompt metadata including content, timestamps, tags, and description
setPrompt
Create or update a prompt for a task.
Parameters:
taskname(required): The task name identifiercontent(required): The prompt contentdescription(optional): Human-readable descriptiontags(optional): Array of searchable tags
Returns: Confirmation with version information
Data Model
Prompt Structure
interface PromptMetadata {
content: string; // The prompt content
created: string; // ISO timestamp of creation
updated: string; // ISO timestamp of last update
version: string; // Semantic version (1.0, 1.1, etc.)
tags: string[]; // Searchable tags
description: string; // Human-readable description
}File Organization
Latest version:
prompts/{taskname}.jsonHistorical versions:
prompts/{taskname}_v{version}.jsonAutomatic archiving of previous versions
Version Management
New prompts start at version
1.0Content updates increment minor version (
1.0→1.1→1.2)Previous versions are automatically archived
Latest version is always accessible without specifying version
Usage Examples
Storing a Prompt
{
"tool": "setPrompt",
"arguments": {
"taskname": "code-review",
"content": "Review this code for best practices, security issues, and performance optimizations...",
"description": "Comprehensive code review prompt",
"tags": ["code", "review", "security", "performance"]
}
}Retrieving a Prompt
{
"tool": "getPrompt",
"arguments": {
"taskname": "code-review"
}
}Listing All Prompts
{
"tool": "listPrompts",
"arguments": {}
}Development
Project Structure
promptdb-mcp-server/
├── src/
│ ├── index.ts # Main entry point
│ ├── server.ts # MCP server setup
│ ├── tools/ # Tool implementations
│ ├── storage/ # File system operations
│ ├── cache/ # In-memory caching
│ └── utils/ # Validation helpers
├── prompts/ # Prompt storage directory
├── package.json
├── tsconfig.json
└── vite.config.tsDevelopment Commands
# Install dependencies
pnpm install
# Build project
pnpm build
# Development with watch mode
pnpm dev
# Start server (stdio transport)
pnpm start
# Start with SSE transport
pnpm start:sse
# Development with SSE transport
pnpm dev:sse
# Clean build artifacts
pnpm cleanTesting
Use the MCP Inspector or any MCP-compatible client to test the server:
Start the server:
pnpm startConnect via MCP Inspector
Test the available tools
Performance
Caching Strategy
Cache Hit: Immediate return from memory
Cache Miss: Load from file system, cache result
Cache Invalidation: Automatic on prompt updates
Memory Management: LRU eviction at 100 items
File System Optimization
Asynchronous file operations throughout
On-demand directory creation
Robust error handling
Concurrent access safety
Error Handling
The server handles various error conditions gracefully:
File system permission errors
Invalid JSON parsing
Concurrent access conflicts
Cache consistency issues
Input validation errors
Troubleshooting
Common Issues
Server not starting: Check Node.js version (18+) and dependencies
Tool not found: Verify server is properly connected to MCP client
Directory creation errors:
Error:
ENOENT: no such file or directory, mkdir '/prompts'Solution: The server creates a
promptsdirectory in the current working directory. Ensure the MCP client has write permissions to the directory where it's running.Alternative: The server will automatically create the directory with proper permissions
File permissions: Ensure write access to prompts directory
JSON parsing errors: Validate prompt file format
SSE Transport Issues
Port already in use:
# Find process using port lsof -i :3000 # Kill process kill -9 <PID>CORS errors: The server includes CORS headers by default for cross-origin requests
Connection timeout: Check firewall settings and ensure the port is accessible
Build errors: Ensure all dependencies are installed with
pnpm installCloud deployment issues:
Verify environment variables are set correctly
Check build logs for errors
Ensure
dist/directory is included in deployment
Testing SSE Transport
# Test health endpoint
curl http://localhost:3000/health
# Test server info
curl http://localhost:3000/
# Test SSE connection
curl -N http://localhost:3000/sseDirectory Configuration
The server creates prompts in the current working directory by default:
When run locally:
./prompts/in the project directoryWhen installed globally:
./prompts/in the directory where the MCP client runsThe server automatically creates the directory if it doesn't exist
Validation Errors
Task names must be alphanumeric with hyphens/underscores only
Content cannot be empty
Version format must be X.Y (e.g., 1.0, 2.1)
License
MIT License - see LICENSE file for details
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
Support
For issues and questions:
Create an issue on GitHub
Check the documentation
Review the implementation plan
Available Tools
3 toolsgetPromptGet PromptA
Retrieve a prompt by task name
Inputs: taskname (required), version.
listPromptsList PromptsA
List all available prompts with their content and versions
Inputs: no named parameters.
setPromptSet PromptA
Create or update a prompt for a task
Inputs: content (required), taskname (required), tags, description.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct role: listPrompts returns all prompts, getPrompt retrieves a single prompt by task name, and setPrompt creates or updates a prompt. There is no meaningful overlap or ambiguity between these operations.
All three tool names follow a consistent camelCase verb-noun pattern: listPrompts, getPrompt, setPrompt. The naming makes each tool's behavior predictable and easy to infer.
Three tools is well-scoped for a focused prompt management server. Each tool covers a core operation and none feel redundant or unnecessary.
The set covers listing, reading, and creating/updating prompts, but there is no delete operation, which leaves the CRUD lifecycle incomplete. Version information is mentioned in listPrompts but there is no dedicated tool for managing or retrieving specific versions.
Maintenance
Related MCP Connectors
Your prompt library in any MCP client: list, fetch, save and version prompt templates.
Team prompt library with version control and reviews. Save, search and reuse prompts via MCP.
Generate contextual prompts and reusable agent skills, evaluate prompts with the 16-dimension Prompt Score, and manage saved work in PromptDrive. Twelve MCP tools also provide authorized access to private Memory for source-grounded answers. Connect over Streamable HTTP using OAuth 2.1 and PKCE. Generation consumes account quota and automatically saves successful results; Memory access follows account permissions and plan limits.
Manage, version, and publish LLM prompts with blocks, variables, and evaluations.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables prompt versioning, evaluation, and management via MCP, CLI, and REST APIs, with support for multiple LLM providers.MIT

PromptBranch MCPofficial
AlicenseNot gradedqualityBmaintenanceLocal-first MCP server for versioning, searching, evaluating, and improving AI prompts. Agents can fetch prompts, report outcomes, add notes, and propose human-approved variations.10MIT- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to list, retrieve, compile, create, and update prompts, including managing versions, labels, tags, configuration, and production promotion.MIT
- FlicenseNot gradedqualityAmaintenanceEnables MCP clients to discover, retrieve, and compile Langfuse prompts, and provides equivalent tools for clients that lack prompt support.-