Promptbook MCP
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., "@Promptbook MCPsearch for prompts about TypeScript refactoring with dependency injection"
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.
π€ Promptbook MCP
Your personal cookbook for AI prompts with RAG-powered semantic search
β¨ What is this?
Promptbook MCP is a plug-and-play server that helps developers who use AI coding assistants (like GitHub Copilot, Claude, etc.) to:
π Store prompts from your AI sessions automatically
π Search prompts by meaning, not just keywords (RAG-powered)
π€ Access your prompt library from any MCP-compatible tool
π Organize prompts by category (refactoring, testing, debugging, etc.)
Perfect for: Developers who reuse AI prompts and want a searchable knowledge base.
π Quick Start
Get running in 30 seconds:
Option 1: Automated Setup (Recommended)
git clone https://github.com/isaacpalomero/promptbook-mcp.git
cd promptbook-mcp
./setup.shThat's it! π
Option 2: Docker
git clone https://github.com/isaacpalomero/promptbook-mcp.git
cd promptbook-mcp
docker-compose up -dDone! Your server is running.
π‘ Use Cases
Problem: You asked ChatGPT/Copilot the perfect prompt for refactoring last week. Now you can't find it.
Solution: Promptbook MCP auto-saves and indexes all your prompts.
# Later, search by meaning
search_prompts("refactor typescript to use dependency injection")
β Returns your exact prompt from last weekReal Examples
Refactoring patterns - Store your best "clean code" prompts
Testing strategies - Find that perfect test structure prompt
Debugging workflows - Access proven debugging prompts
Code review - Reuse comprehensive review prompts
π¦ Installation
Prerequisites
Python 3.9+ OR Docker
2GB RAM minimum
macOS, Linux, or Windows
Detailed Setup
Automated Setup (Recommended)
# Clone repository
git clone https://github.com/isaacpalomero/promptbook-mcp.git
cd promptbook-mcp
# Run setup script
chmod +x setup.sh
./setup.sh
# Activate virtual environment
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Start server
python mcp_server.pyDocker Method
# Clone repository
git clone https://github.com/isaacpalomero/promptbook-mcp.git
cd promptbook-mcp
# Copy environment file
cp .env.example .env
# Start services
docker-compose up -d
# Verify
docker-compose logsManual Setup
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Create directories
mkdir -p prompts sessions
# Index existing prompts (if any)
python prompt_rag.py --index
# Start server
python mcp_server.pyπ― Features
1. Semantic Search (RAG)
Find prompts by meaning, not exact words:
search_prompts("how to add unit tests")
β Finds prompts about "testing", "jest", "pytest", etc.2. Auto-Organization
Drop AI session files β Auto-categorized and indexed:
sessions/
βββ copilot-session-abc123.md β Auto-processed into:
βββ prompts/refactoring/prompt1.md
βββ prompts/testing/prompt2.md
βββ Updated RAG index3. Multi-Provider Embeddings
Choose your embedding backend:
Sentence-Transformers (default, local, CPU)
LMStudio (GPU-accelerated, better quality)
# Use local embeddings (default)
EMBEDDING_PROVIDER=sentence-transformer
# Or use LMStudio
EMBEDDING_PROVIDER=lmstudio
LMSTUDIO_URL=http://localhost:12344. MCP Tools (13 Available)
Access via any MCP client:
Tool | Description |
| Semantic search by meaning |
| Add new prompt directly |
| Modify existing prompt |
| Remove prompt safely |
| Get full content |
| Browse by category |
| Find related prompts |
| View statistics |
| Rebuild search index |
| Process AI session file |
| View full metadata index |
Available categories:
refactoringtestingdebuggingimplementationdocumentationcode-reviewgeneral
π MCP Client Setup
Claude Desktop
Open Claude config file:
# macOS ~/Library/Application Support/Claude/claude_desktop_config.json # Windows %APPDATA%\Claude\claude_desktop_config.jsonAdd Promptbook MCP server:
{ "mcpServers": { "promptbook": { "command": "python", "args": ["/path/to/promptbook-mcp/mcp_server.py"] } } }Restart Claude Desktop
Other MCP Clients
Any MCP-compatible client can connect using the same pattern. See MCP Protocol docs for details.
π Documentation
Setup Guide - Detailed installation steps
Deployment Options - Docker, local, and production setups
Embeddings Guide - Configure RAG providers
Contributing - How to contribute
Changelog - Version history
π¨βπ» For Developers
βοΈ Configuration
All runtime settings are centralized in config.py and exposed through an immutable Config dataclass. The server loads environment variables once at startup.
Environment Variables
Variable | Description | Default |
| Root folder for categorized prompts |
|
| Directory watched for exported sessions |
|
| Persistent ChromaDB path |
|
|
|
|
| Sentence Transformers model name |
|
| LMStudio endpoint + model |
|
| Expected LMStudio embedding size |
|
| Prompt chunking parameters |
|
| Toggle RAG initialization |
|
| Seconds between auto-index checks |
|
| Python logging level |
|
Configuration file:
# Copy example
cp .env.example .env
# Edit settings
vim .envAccess config anywhere in code:
from config import CONFIG
print(CONFIG.prompts_dir) # Validated Path object
print(CONFIG.embedding_provider) # Type-safe enumπ§ͺ Testing & Quality
We enforce strict quality gates:
# Run all tests
pytest
# Run with coverage
pytest --cov=. --cov-report=html
# Run only unit tests
pytest tests/unit/
# Run only integration tests
pytest tests/integration/
# Style check
flake8 --max-line-length=100
# Type check
mypy --strict mcp_server.py prompt_rag.py prompt_organizer.pyQuality Standards
Test Coverage: Minimum 80%
Type Safety:
mypy --strictmust passCode Style: Flake8 compliant
CI Pipeline: All checks run on Python 3.9-3.12
A GitHub Actions workflow (.github/workflows/ci.yml) runs these checks automatically.
π³ Docker Advanced
Multi-Stage Build
The Dockerfile uses a multi-stage build for optimized image size:
# Stage 1: Builder (installs dependencies)
FROM python:3.11-slim as builder
# Stage 2: Runtime (slim final image)
FROM python:3.11-slim
COPY --from=builder /app/.venv /app/.venvResult: Final image < 800 MB
Health Checks
Docker includes automatic health monitoring:
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -m prompt_rag --health || exit 1Volume Mounts
Persist data outside containers:
volumes:
- ./prompts:/app/prompts # Prompt storage
- ./sessions:/app/sessions # Session import
- ./prompts/.vectordb:/app/prompts/.vectordb # RAG databaseBuilding & Running
# Build image
docker build -t promptbook-mcp:latest .
# Run container
docker run --rm -i \
-v "$(pwd)/prompts:/app/prompts" \
-v "$(pwd)/sessions:/app/sessions" \
-e EMBEDDING_PROVIDER=sentence-transformer \
promptbook-mcp:latestποΈ Architecture
Components
βββββββββββββββββββββββββββββββββββββββ
β MCP Client (Claude) β
ββββββββββββββββ¬βββββββββββββββββββββββ
β MCP Protocol
ββββββββββββββββΌβββββββββββββββββββββββ
β mcp_server.py β
β - 13 MCP tools β
β - Request routing β
β - Error handling β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
βββββββββ΄βββββββββ
β β
ββββββββΌβββββββ βββββββΌβββββββββ
βprompt_rag.pyβ βprompt_org.py β
β- RAG search β β- Session β
β- Embeddings β β parsing β
β- ChromaDB β β- Auto-org β
βββββββββββββββ ββββββββββββββββ
β β
βββββββββ¬βββββββββ
β
ββββββββββββββββΌβββββββββββββββββββββββ
β prompts/ β
β βββ refactoring/ β
β βββ testing/ β
β βββ debugging/ β
β βββ .vectordb/ β
βββββββββββββββββββββββββββββββββββββββData Flow
User asks Claude to search prompts
Claude sends MCP request to
mcp_server.pyServer calls
prompt_rag.pyfor semantic searchRAG queries ChromaDB vector database
Results returned to Claude with metadata
User sees relevant prompts instantly
π€ Contributing
We love contributions! π
Quick Start
Fork the repository
Create feature branch:
git checkout -b feature/amazing-featureMake changes and add tests
Run tests:
pytestEnsure quality:
flake8 && mypy --strictCommit:
git commit -m 'feat: add amazing feature'Push:
git push origin feature/amazing-featureOpen Pull Request
See CONTRIBUTING.md for detailed guidelines.
Commit Convention
We follow Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentation onlystyle:Code style changesrefactor:Code refactoringtest:Test changeschore:Build/tooling changes
π License
This project is licensed under the MIT License - see LICENSE file for details.
π Acknowledgments
Built with MCP Protocol
Powered by ChromaDB and Sentence-Transformers
Inspired by the need for better prompt management in AI-assisted development
π Support
π Report bugs
π‘ Request features
π¬ Discussions
π Documentation
Made with β€οΈ for the AI development community
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/isaacpalomero/promptbook-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server