MCP Prompt Library Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Prompt Library Server
A personal prompt library with semantic search capabilities using ChromaDB and the Model Context Protocol (MCP). This server allows you to store, search, and retrieve prompts using semantic similarity, making it easy to find relevant prompts even when you don't remember the exact wording.
Features
Semantic Search: Find similar prompts using natural language queries
Persistent Storage: All prompts are stored in a local ChromaDB database
MCP Integration: Works seamlessly with Claude Desktop and other MCP clients
Rich Metadata: Track source, creation time, and statistics for each prompt
Easy Retrieval: Get specific prompts by ID or search by content
Related MCP server: Fast Context MCP
Installation
Prerequisites
Python 3.8 or higher
pip or uv package manager
Setup
Clone the repository:
git clone <repository-url> cd MCP_Prompt_LibraryInstall dependencies:
# Using uv (recommended) uv sync # Or using pip pip install -r requirements.txtEnvironment Setup (optional):
# Set custom ChromaDB path (defaults to ./chroma_db) export CHROMA_DB_PATH="/path/to/your/chroma_db"
Usage
Running the Server
The server can be run in two ways:
Direct execution (for testing):
python prompt_library_mcp_server.pyAs an MCP server (recommended): Configure your MCP client (e.g., Claude Desktop) to use this server.
Claude Desktop Configuration
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"prompt-library": {
"command": "/path/to/your/project/.venv/bin/python",
"args": ["/path/to/your/project/prompt_library_mcp_server.py"],
"env": {
"CHROMA_DB_PATH": "/path/to/your/project/chroma_db"
}
}
}
}Important: Make sure to use the Python interpreter from your virtual environment and update the paths to match your actual project location.
Available Tools
The server provides three main tools:
1. store_prompt
Add a new prompt to your library.
Parameters:
prompt(required): The prompt text to storesource(optional): Where this prompt was used (e.g., "claude", "gpt4", "cursor")
Example:
{
"prompt": "Explain the attention mechanism in transformers",
"source": "claude"
}2. search_prompts
Search for similar prompts using semantic similarity.
Parameters:
keywords(required): Keywords to search for in previous promptslimit(optional): Number of results to return (default: 8, max: 20)
Example:
{
"keywords": "transformer attention",
"limit": 5
}3. get_prompt
Retrieve a specific prompt by its ID.
Parameters:
prompt_id(required): The unique identifier for the prompt
Example:
{
"prompt_id": "prompt_1234567890"
}Testing
Run the test suite to verify functionality:
python test_server.pyThis will:
Test prompt storage and retrieval
Test semantic search functionality
Verify error handling
Clean up test data automatically
Database Structure
The server uses ChromaDB for persistent storage with the following structure:
Collection:
prompt_libraryDocuments: The actual prompt text
Metadata:
prompt_id: Unique identifiertimestamp: Creation timestamp (ISO format)source: Where the prompt was usedcharacter_count: Number of charactersword_count: Number of words
API Response Format
All responses are returned as JSON with the following structure:
Search Response
{
"search_keywords": "query terms",
"found": 3,
"total_prompts_in_library": 15,
"prompts": [
{
"id": "prompt_1234567890",
"prompt": "Full prompt text...",
"similarity": "95.2%",
"created": "2024-01-15T10:30:00",
"source": "claude",
"preview": "First 100 characters..."
}
]
}Store Response
{
"status": "success",
"prompt_id": "prompt_1234567890",
"source": "claude",
"stats": {
"characters": 150,
"words": 25
},
"total_prompts": 16
}Get Response
{
"status": "found",
"prompt_id": "prompt_1234567890",
"prompt_text": "Full prompt text...",
"metadata": {
"created": "2024-01-15T10:30:00",
"source": "claude",
"character_count": 150,
"word_count": 25
}
}Development
Project Structure
MCP_Prompt_Library/
├── prompt_library_mcp_server.py # Main server implementation
├── test_server.py # Test suite
├── requirements.txt # Python dependencies
├── pyproject.toml # Project configuration
├── README.md # This file
└── chroma_db/ # ChromaDB database filesAdding New Features
New Tools: Add tool definitions in
setup_handlers()Database Changes: Modify the metadata structure in
store_prompt()Search Improvements: Enhance the
search_prompts()method
Error Handling
The server includes comprehensive error handling:
Graceful handling of empty collections
Proper error messages for missing prompts
Exception catching with informative error responses
Troubleshooting
Common Issues
"spawn python ENOENT": Make sure to use the virtual environment Python path in your MCP configuration
"No such file or directory": Verify the paths in your MCP configuration match your actual project location
Import errors: Ensure all dependencies are installed in your virtual environment
Debugging
Check the MCP server logs in Claude Desktop
Run
test_server.pyto verify functionalityUse direct execution mode for debugging
License
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 B Chahal
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
Team prompt library with version control and reviews. Save, search and reuse prompts via MCP.
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA local-only MCP server that uses SQLite to store, search, and manage a personal library of AI prompts. It enables developers to organize and reuse prompts across multiple AI clients like Claude and Cursor while keeping all data on their local machine.8 npm1MIT
- AlicenseBqualityDmaintenanceEnables AI-driven semantic code search via natural language queries, integrating with MCP clients like Claude Desktop to retrieve relevant code context from any codebase.1MIT
- AlicenseNot gradedqualityCmaintenanceProvides persistent long-term memory and local RAG document search for Claude Desktop, fully offline. Enables memory save/search and document retrieval via MCP.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.11MIT