PromptDB MCP Server
Click on "Install 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 Serverget 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: Think MCP Server
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
| Name | Required | Description | Default |
|---|---|---|---|
| version | No | Specific version (defaults to latest) | |
| taskname | Yes | The task name identifier |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, 'Retrieve' is the main behavioral disclosure, indicating a read-only operation without side effects. The description does not mention return shape, error behavior, or version-resolution behavior beyond what the schema already states, leaving some assumptions to the agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single six-word sentence with the verb and resource front-loaded. Every word earns its place and there is no redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter read tool with no output schema, the description plus schema is mostly sufficient: the agent knows the required taskname and the optional version. It would be slightly stronger with an explicit statement of what is returned, but nothing essential is missing for a basic invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with both taskname and version already documented, including the 'defaults to latest' note. The tool description adds no additional parameter semantics beyond what the schema provides, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description identifies a specific verb ('Retrieve') and resource ('a prompt') with a clear key qualifier ('by task name'), so an agent can tell this fetches one prompt rather than performing a write. It does not explicitly contrast with listPrompts or setPrompt, so it misses the highest level of sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'By task name' implies the tool is used when you know the task identifier and need its prompt, but the description never states when to prefer this over listPrompts or setPrompt. There are no explicit when/when-not conditions or alternatives, so the agent must infer usage from the name and sibling context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
listPromptsList PromptsA
List all available prompts with their content and versions
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It communicates that the tool returns prompt content and versions and implies a read-only list operation, but it does not disclose ordering, pagination, or whether all versions are returned for each prompt.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, information-dense sentence with no wasted words. The primary action (List all) is front-loaded, and content/versions are specified as the result payload.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter list tool, the description specifies scope and returned data sufficiently for an agent to select and call it. It could add detail about response shape or limits, but the tool is simple enough that this is not a critical gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema is empty, so there are no parameters to document. The 100% schema coverage baseline for zero-parameter tools applies, and the description introduces no param-related ambiguity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action (List), the target resource (all available prompts), and the included payload (content and versions). Its all-encompassing scope clearly distinguishes it from the single-item getPrompt and mutating setPrompt siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The intended use for enumeration is implied by 'List all available prompts', but the description provides no explicit when-to-use guidance or references to alternative tools. An agent can infer the distinction from sibling names, but the description itself doesn't state it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
setPromptSet PromptA
Create or update a prompt for a task
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Optional tags | |
| content | Yes | The prompt content | |
| taskname | Yes | The task name identifier | |
| description | No | Optional description |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral disclosure burden. 'Create or update' usefully signals upsert-like behavior, but it does not clarify whether updating replaces the entire prompt or only provided fields, nor does it mention side effects or prerequisites.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that communicates the core purpose without filler. Every word contributes meaning, and the main action is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple four-parameter tool with no output schema, the description is mostly adequate and the schema covers parameter details. However, it omits the exact update semantics and return behavior, which an agent may need to invoke the tool with confidence.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all four parameters are already documented. The description adds only the conceptual relationship between 'prompt' and 'task', which is helpful but does not substantially extend the schema's parameter explanations.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific action, 'Create or update', and a specific resource, 'a prompt for a task'. This clearly distinguishes setPrompt from its read-only siblings listPrompts and getPrompt, which do not create or update.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage: call this when you want to create or update a prompt for a task. However, it does not explicitly state when not to use it or mention alternatives such as getPrompt for retrieval, leaving some guidance implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v0.0.5- First observed
getPrompt - First observed
listPrompts - First observed
setPrompt
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- PromptOTOAuthcom.promptot
Manage, version, and publish LLM prompts with blocks, variables, and evaluations.
Self-hosted AI prompt library: prompts, collections, tags, teams, chains. 29 MCP tools for agents.
Professional prompt library over remote MCP: 13 verticals, free discovery scope.
- mcpOAuthai.butlerbrain
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceMCP server for PromptHub. Enables publishing, fetching, listing, updating, and searching prompt repositories from Claude Code or Codex.10MIT
- AlicenseNot gradedqualityCmaintenanceProvides prompt management, resource management, and tool call capabilities (content analysis, article analysis) based on the MCP protocol.3MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Langfuse Prompt Management that enables listing and retrieving Langfuse prompts via MCP prompts and tools.MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server for prompt template management, enabling storage, versioning, search, and rendering of prompt templates via MCP tools.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ugmurthy/prompt-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server