
Smart Prompts
STDIOGitHub-based MCP server for intelligent prompt discovery, composition, and management.
GitHub-based MCP server for intelligent prompt discovery, composition, and management.
An enhanced MCP (Model Context Protocol) server that fetches prompts from GitHub repositories with intelligent discovery, composition, and management features. This is an enhanced fork of prompts-mcp-server with GitHub integration and advanced features.
Before installation, ensure you have:
# Clone the repository git clone https://github.com/jezweb/smart-prompts-mcp.git cd smart-prompts-mcp # Install dependencies npm install # Build the project npm run build # Verify installation ./verify-install.sh
Create a .env
file in the project root:
# Required: GitHub Configuration GITHUB_OWNER=your-username # Your GitHub username or org GITHUB_REPO=your-prompts-repo # Repository containing prompts GITHUB_BRANCH=main # Branch to use (default: main) GITHUB_PATH= # Subdirectory path (optional) GITHUB_TOKEN=ghp_xxxxx # Personal access token (recommended) # Optional: Cache Configuration CACHE_TTL=300000 # Cache time-to-live in ms (default: 5 min) CACHE_REFRESH_INTERVAL=60000 # Auto-refresh interval in ms (default: 1 min) # Optional: Feature Flags ENABLE_SEMANTIC_SEARCH=true # Advanced search features ENABLE_PROMPT_COMPOSITION=true # Prompt combination features ENABLE_USAGE_TRACKING=true # Track prompt usage
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
:
{ "mcpServers": { "smart-prompts": { "command": "node", "args": ["/absolute/path/to/smart-prompts-mcp/dist/index.js"], "env": { "GITHUB_OWNER": "your-username", "GITHUB_REPO": "your-prompts-repo", "GITHUB_TOKEN": "ghp_your_token_here" } } } }
Add to Roo Cline MCP settings:
"smart-prompts": { "command": "node", "args": ["/absolute/path/to/smart-prompts-mcp/dist/index.js"], "env": { "GITHUB_OWNER": "your-username", "GITHUB_REPO": "your-prompts-repo", "GITHUB_TOKEN": "ghp_your_token_here" } }
your-prompts-repo/
├── README.md # Repository overview
├── ai-prompts/ # AI and meta-prompts
│ ├── meta-prompt-builder.md
│ └── prompt-engineer.md
├── development/ # Development prompts
│ ├── backend/
│ │ ├── api-design.md
│ │ └── database-schema.md
│ ├── frontend/
│ │ ├── react-component.md
│ │ └── vue-composition.md
│ └── testing/
│ ├── unit-test-writer.md
│ └── e2e-test-suite.md
├── content-creation/ # Content prompts
│ ├── blog-post-writer.md
│ └── youtube-metadata.md
├── business/ # Business prompts
│ ├── proposal-generator.md
│ └── email-templates.md
└── INDEX.md # Optional: Category index
api-documentation-generator.md
)api_documentation_generator
)content-creation
)--- name: api_documentation_generator title: REST API Documentation Generator description: Generate comprehensive API documentation with examples category: documentation tags: [api, rest, documentation, openapi, swagger] difficulty: intermediate author: jezweb version: 1.0 arguments: - name: api_spec description: The API specification or endpoint details required: true - name: format description: Output format (markdown, openapi, etc) required: false default: markdown --- # API Documentation Generator Generate comprehensive documentation for {{api_spec}} in {{format}} format. Include: - Endpoint descriptions - Request/response examples - Authentication details - Error codes - Rate limiting information
search_prompts
- Always start here! Search by keyword, category, or tagslist_prompt_categories
- Browse available categories with countsget_prompt
- Retrieve specific prompt (use exact name from search)create_github_prompt
- Create new prompts in GitHubcompose_prompts
- Combine multiple promptsprompts_help
- Get contextual help and guidancecheck_github_status
- Verify GitHub connection1. search_prompts → Find existing prompts
2. get_prompt → View full content
3. compose_prompts → Combine if needed
4. create_github_prompt → Only if nothing exists
# Check your token has repo scope # Verify token in .env file GITHUB_TOKEN=ghp_your_actual_token # Test GitHub access GITHUB_TOKEN=your_token node test-server.js
CACHE_TTL
to cache longertail -f ~/.claude/logs/mcp.log
CACHE_TTL
for less frequent updatesGitHub API Rate Limits
Search Limitations
# INDEX.md in repo root prompts: - name: api_generator path: development/api-generator.md category: development tags: [api, codegen]
search-index.json
Search Index Generation
Lazy Loading
CDN Support
Building on the GitHub integration pattern, here are potential MCP servers:
Store and manage reusable code snippets in GitHub
GitHub-based documentation template library
Manage AI personality configurations
Full project template management
Curated educational content
Version-controlled app configs
GitHub Actions integration
Team knowledge management
The server includes comprehensive testing to ensure reliability and performance.
# Run full test suite npm test # Watch mode for development npm run test:watch # Generate coverage report npm run test:coverage # Run performance benchmark npm run test:perf # Verify installation npm run test:verify
Test results are automatically generated in multiple formats:
test-results/latest.json
)test-results/latest.md
)test-results/latest.html
)View the latest test results:
# Development mode with hot reload npm run dev # Build for production npm run build # Start production server npm start
We welcome contributions! See CONTRIBUTING.md for guidelines.
Search Improvements
Performance Optimization
UI/Visualization
MIT License - see LICENSE file for details.
Made with ❤️ for the MCP community