MuLIAICHI/mcp-prompts-library
If you are the rightful owner of mcp-prompts-library and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Model Context Protocol (MCP) server provides a library of reusable, high-quality prompt templates for various tasks, compatible with Claude Desktop and other MCP clients.
š Prompt Library MCP Server
A comprehensive Model Context Protocol (MCP) server providing reusable, high-quality prompt templates for various development, writing, and analysis tasks. Use these prompts directly in Claude Desktop or any MCP-compatible client.
š Table of Contents
- Features
- Installation
- Configuration
- Available Prompts
- Usage
- Adding Custom Prompts
- Troubleshooting
- Contributing
⨠Features
- 20+ Professional Prompts across multiple categories
- Modular Architecture - Easy to extend and customize
- Comprehensive Responses - Detailed, structured outputs
- Flexible Arguments - Customize prompts for your specific needs
- MCP Compatible - Works with Claude Desktop, Cursor, and other MCP clients
š ļø Installation
Prerequisites
- Python 3.8 or higher
- Claude Desktop (or another MCP-compatible client)
Step 1: Clone or Download
# Create project directory
mkdir prompt-library-mcp
cd prompt-library-mcp
Step 2: Set Up Virtual Environment
# Create virtual environment
python -m venv venv
# Activate it
# On Mac/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
Step 3: Install Dependencies
# Create requirements.txt with:
echo "mcp>=1.0.0" > requirements.txt
# Install
pip install -r requirements.txt
Step 4: Create Project Structure
prompt-library-mcp/
āāā prompts/
ā āāā __init__.py
ā āāā code_prompts.py
ā āāā writing_prompts.py
ā āāā analysis_prompts.py
āāā server.py
āāā requirements.txt
āāā README.md
Copy all the provided files into their respective locations.
āļø Configuration
Connect to Claude Desktop
-
Locate your config file:
- Mac:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Mac:
-
Edit the config file (create if it doesn't exist):
{
"mcpServers": {
"prompt-library": {
"command": "python",
"args": ["/absolute/path/to/your/prompt-library-mcp/server.py"]
}
}
}
Important: Replace the path with your actual absolute path!
Mac/Linux example:
"args": ["/Users/yourname/prompt-library-mcp/server.py"]
Windows example:
"args": ["C:\\Users\\YourName\\prompt-library-mcp\\server.py"]
- Restart Claude Desktop completely
š Available Prompts
š» Code Prompts (10 prompts)
Prompt Name | Description | Key Arguments |
---|---|---|
code-review | Comprehensive code review with best practices | code, language, focus |
debug-helper | Debug code and find solutions | code, error |
refactor-code | Refactor for better quality | code, goal |
add-tests | Generate unit tests | code, framework |
explain-code | Explain code clearly | code, level |
api-design | Design or review APIs | requirements, style |
optimize-performance | Performance optimization | code, bottleneck |
security-audit | Security vulnerability analysis | code, context |
database-schema | Database design and review | requirements, database |
git-commit-message | Generate commit messages | changes, style |
āļø Writing Prompts (4 prompts)
Prompt Name | Description | Key Arguments |
---|---|---|
blog-post | Generate engaging blog posts | topic, tone, length |
email-writer | Craft professional emails | purpose, recipient, key_points |
documentation | Create technical documentation | subject, audience |
social-media | Social media content | platform, topic, style |
š Analysis Prompts (4 prompts)
Prompt Name | Description | Key Arguments |
---|---|---|
data-analysis | Analyze data and provide insights | data_description, goal |
competitive-analysis | Competitor and market analysis | industry, competitors |
swot-analysis | Perform SWOT analysis | subject, context |
bug-report-analysis | Analyze and prioritize bugs | bug_report |
šÆ Usage
In Claude Desktop
- Open Claude Desktop
- Click the š attachment icon in the chat input
- Select "Attach from MCP"
- Choose "prompt-library"
- Select your desired prompt (e.g., "code-review")
- Fill in the required arguments:
- code: Paste your code
- language: (optional) e.g., "python"
- focus: (optional) e.g., "security"
- Click Submit
- Send your message or just hit enter to use the prompt
Example Usage
Code Review Example
1. Attach from MCP ā prompt-library ā code-review
2. Fill in:
- code: [paste your Python function]
- language: python
- focus: performance
3. Submit
4. Send message (or just hit enter)
Claude will then perform a comprehensive code review focused on performance!
Blog Post Example
1. Attach from MCP ā prompt-library ā blog-post
2. Fill in:
- topic: "Getting Started with Machine Learning"
- tone: friendly
- length: medium
3. Submit and send
Testing the Server
To test if the server is working:
# Activate virtual environment
source venv/bin/activate # or venv\Scripts\activate on Windows
# Run the server
python server.py
If no errors appear, it's working! Press Ctrl+C
to stop.
š§ Adding Custom Prompts
Step 1: Define Your Prompt
Add to the appropriate file (e.g., prompts/code_prompts.py
):
"your-prompt-name": {
"name": "your-prompt-name",
"description": "What your prompt does",
"arguments": [
{
"name": "input",
"description": "Input description",
"required": True
},
{
"name": "optional_param",
"description": "Optional parameter",
"required": False
}
]
}
Step 2: Add Generation Logic
In the same file, add to the generate_code_prompt()
function:
elif name == "your-prompt-name":
input_text = args.get("input", "")
optional = args.get("optional_param", "default_value")
return f"""Your detailed prompt template here:
**Input:** {input_text}
**Parameter:** {optional}
Please provide:
1. First section
2. Second section
3. Third section
"""
Step 3: Restart the Server
Restart Claude Desktop to load the new prompt.
š Troubleshooting
Server Not Showing Up in Claude
Solution:
- Check the config file path is correct
- Use absolute paths, not relative
- Verify Python is in your PATH
- Restart Claude Desktop completely (quit and reopen)
"Command not found" Error
Solution:
- Use the full path to Python:
or
"command": "/usr/bin/python3"
"command": "C:\\Python39\\python.exe"
Prompts Not Loading
Solution:
- Test the server directly:
python server.py
- Check for Python errors
- Verify all files are in place
- Make sure virtual environment is activated when testing
Virtual Environment Issues
Mac/Linux:
source venv/bin/activate
python server.py
Windows:
venv\Scripts\activate
python server.py
Check Claude Logs
Mac:
tail -f ~/Library/Logs/Claude/mcp*.log
Windows:
type %APPDATA%\Claude\logs\mcp*.log
š Advanced Configuration
Using Specific Python Version
{
"mcpServers": {
"prompt-library": {
"command": "/usr/local/bin/python3.11",
"args": ["/path/to/server.py"]
}
}
}
Multiple MCP Servers
{
"mcpServers": {
"prompt-library": {
"command": "python",
"args": ["/path/to/prompt-library-mcp/server.py"]
},
"other-server": {
"command": "node",
"args": ["/path/to/other-server/index.js"]
}
}
}
š Prompt Categories Explained
Code Prompts
Perfect for developers who need assistance with:
- Code reviews and quality checks
- Debugging and error resolution
- Refactoring and optimization
- Test generation
- API and database design
Writing Prompts
Ideal for content creators needing:
- Blog posts and articles
- Professional emails
- Technical documentation
- Social media content
Analysis Prompts
Great for strategic work like:
- Data insights and analysis
- Competitive research
- SWOT analysis
- Bug triage and prioritization
š¤ Contributing
Want to add your own prompts or improve existing ones?
- Fork the repository
- Add your prompts following the existing structure
- Test thoroughly
- Submit a pull request with:
- Description of new prompts
- Example usage
- Any new dependencies
š Best Practices
Writing Good Prompts
- Be Specific: Clear, detailed instructions
- Structure Output: Use numbered lists and sections
- Provide Examples: Show what good output looks like
- Allow Flexibility: Optional parameters for customization
- Think User-First: What would help the user most?
Organizing Prompts
- Group by category (code, writing, analysis)
- Use clear naming (verb-noun format)
- Write good descriptions (users see these in Claude)
- Document arguments (explain what each does)
š Support
- Issues? Check the troubleshooting section
- Questions? Review the usage examples
- Not working? Check Claude Desktop logs
- Need help? Check the MCP documentation at https://modelcontextprotocol.io
š Happy Prompting!
Start using your prompt library and boost your productivity with Claude Desktop. Customize, extend, and make it your own!
Pro Tip: Try combining multiple prompts in a conversation for complex workflows. For example:
- Use
api-design
to design an API - Then use
add-tests
to create tests for it - Finally use
documentation
to document everything!