Smart Prompts MCP Server
Click on "Deploy 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., "@Smart Prompts MCP Server find prompts for code review"
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.
Smart Prompts MCP Server
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.
π Key Features
Core Capabilities
π GitHub Integration: Fetch prompts directly from GitHub repositories (public/private)
π Smart Discovery: Advanced search with category and tag filtering
π Prompt Composition: Combine multiple prompts into workflows
π Usage Tracking: Analytics on prompt usage patterns
β‘ Real-time Updates: Automatic synchronization with GitHub
π€ AI Guidance: Enhanced tool descriptions and workflow recommendations
MCP Protocol Support
Tools: 7 specialized tools for prompt management
Resources: 13+ resource endpoints for browsing and discovery
Prompts: Dynamic templates with Handlebars support
Related MCP server: code2prompt-mcp
π Prerequisites
Before installation, ensure you have:
Node.js 18+ installed
npm or yarn package manager
Git installed and configured
GitHub account (for GitHub integration)
GitHub Personal Access Token (for private repos or to avoid rate limits)
π Installation
Step 1: Clone and Install
# Clone the repository
git clone https://github.com/hmcts/ai-in-sdlc-smart-prompts-mcp.git
cd ai-in-sdlc-smart-prompts-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Verify installation
./verify-install.shStep 2: Configure Environment
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 usageStep 3: MCP Client Configuration
For Claude Desktop (macOS)
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"smart-prompts": {
"command": "node",
"args": ["/absolute/path/to/ai-in-sdlc-smart-prompts-mcp/dist/index.js"],
"env": {
"GITHUB_OWNER": "your-username",
"GITHUB_REPO": "your-prompts-repo",
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}For Roo Cline (VS Code)
Add to Roo Cline MCP settings:
"smart-prompts": {
"command": "node",
"args": ["/absolute/path/toai-in-sdlc-smart-prompts-mcp/dist/index.js"],
"env": {
"GITHUB_OWNER": "your-username",
"GITHUB_REPO": "your-prompts-repo",
"GITHUB_TOKEN": "ghp_your_token_here"
}
}π Prompt Organization Best Practices
Recommended Folder Structure
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 indexNaming Conventions
Files: Use kebab-case (e.g.,
api-documentation-generator.md)Prompt Names: Use snake_case in frontmatter (e.g.,
api_documentation_generator)Categories: Use lowercase with hyphens (e.g.,
content-creation)Keep names descriptive but concise
π Prompt File Format
---
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π οΈ Available Tools
π
search_prompts- Always start here! Search by keyword, category, or tagsπ
list_prompt_categories- Browse available categories with countsπ
get_prompt- Retrieve specific prompt (use exact name from search)β¨
create_github_prompt- Create new prompts in GitHubπ
compose_prompts- Combine multiple promptsβ
prompts_help- Get contextual help and guidanceβ
check_github_status- Verify GitHub connection
Recommended Workflow
1. 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π§ Troubleshooting
Common Issues
1. "GitHub access failed" Error
# 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.js2. "Rate limit exceeded" Error
Add a GitHub token to increase rate limits
Reduce cache refresh interval
Use
CACHE_TTLto cache longer
3. "No prompts found"
Check repository structure matches expected format
Verify GITHUB_PATH if using subdirectory
Ensure .md files have YAML frontmatter
4. MCP Client Not Connecting
Use absolute paths in configuration
Check Node.js is in PATH
Verify all environment variables
Check logs:
tail -f ~/.claude/logs/mcp.log
5. Slow Performance
Increase
CACHE_TTLfor less frequent updatesReduce repository size (archive old prompts)
Use categories to limit search scope
π Scaling Considerations
Current Limitations
GitHub API Rate Limits
60 requests/hour (unauthenticated)
5,000 requests/hour (authenticated)
Each directory fetch = 1 request
Search Limitations
No native semantic search in GitHub
Linear search through all files
Performance degrades with 100+ prompts
Scaling Strategies
For 50-200 Prompts
β Current implementation works well
Use categories and tags for organization
Implement local caching
Add GitHub token for higher rate limits
For 200-1000 Prompts
π Implement Index File
# INDEX.md in repo root prompts: - name: api_generator path: development/api-generator.md category: development tags: [api, codegen]π Add Search Index
Generate search index on build
Store in
search-index.jsonUpdate via GitHub Actions
For 1000+ Prompts
ποΈ Database Layer
SQLite for local caching
Full-text search capabilities
Sync with GitHub periodically
π Elasticsearch/Algolia Integration
Proper search infrastructure
Faceted search
Relevance ranking
Future Scaling Features (Roadmap)
Search Index Generation
GitHub Action to build index
Download single index file
Local semantic search
Lazy Loading
Fetch categories on demand
Progressive enhancement
Virtual scrolling for large lists
CDN Support
Cache prompts at edge
Reduce GitHub API calls
Faster global access
π Future MCP Server Ideas
Building on the GitHub integration pattern, here are potential MCP servers:
1. Code Snippets MCP Server
Store and manage reusable code snippets in GitHub
Language-specific organization
Syntax highlighting
Dependency management
Version history
2. Documentation Templates MCP
GitHub-based documentation template library
README generators
API documentation templates
Project documentation
Auto-generated from code
3. AI Personas MCP Server
Manage AI personality configurations
Expertise definitions
Communication styles
Behavioral traits
Team sharing
4. Project Scaffolding MCP
Full project template management
Technology stacks
Boilerplate code
Best practices
Configuration presets
5. Learning Resources MCP
Curated educational content
Tutorials and guides
Code examples
Progress tracking
Skill-based recommendations
6. Configuration Manager MCP
Version-controlled app configs
Environment management
Secret handling
Team synchronization
Rollback support
7. Workflow Automation MCP
GitHub Actions integration
Workflow templates
CI/CD pipelines
Automation scripts
Cross-repo orchestration
8. Knowledge Base MCP
Team knowledge management
Q&A pairs
Troubleshooting guides
Best practices
Searchable wiki
π§ͺ Testing
The server includes comprehensive testing to ensure reliability and performance.
Test Suite Features
100% test coverage of critical functionality
Performance benchmarks with detailed metrics
Visual test reports with interactive charts
Automated CI/CD via GitHub Actions
Running Tests
# 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:verifyTest Reports
Test results are automatically generated in multiple formats:
JSON: Detailed results for analysis (
test-results/latest.json)Markdown: Human-readable reports (
test-results/latest.md)HTML: Interactive visual reports (
test-results/latest.html)
View the latest test results:
π§ͺ Development
# Development mode with hot reload
npm run dev
# Build for production
npm run build
# Start production server
npm startπ€ Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Priority Areas
Search Improvements
Implement fuzzy search
Add search result ranking
Support for regex patterns
Performance Optimization
Implement connection pooling
Add request batching
Optimize cache strategies
UI/Visualization
Web interface for browsing
Prompt preview tool
Usage analytics dashboard
π License
MIT License - see LICENSE file for details.
π Acknowledgments
Original prompts-mcp-server by @tanker327
Model Context Protocol by Anthropic
Built with inspiration from the MCP community
π Support
Issues: GitHub Issues
Discussions: GitHub Discussions
Examples: jezweb/prompts
Available Tools
7 toolscheck_github_statusA
Check GitHub connection status and write access. Use this to verify GitHub operations are available.
Inputs: no named parameters.
compose_promptsA
π Combine Prompts: Combine multiple existing prompts into a single prompt. Perfect for creating complex multi-step workflows. π WORKFLOW: Use search_prompts to find prompt names first, then compose them.
Inputs: prompts (required), separator.
create_github_promptA
β¨ Create New Prompt: Create a new prompt and save it directly to the GitHub repository. π― WORKFLOW: Always use search_prompts first to check if a similar prompt already exists. Only create new prompts when needed to avoid duplicates.
Inputs: name (required), title (required), content (required), description (required), +6 more.
get_promptA
π Get Full Prompt: Retrieve a specific prompt by its exact name. β οΈ IMPORTANT: Use search_prompts first to find the correct prompt name, then use this tool. Returns the complete prompt content with metadata and template variables.
Inputs: name (required).
list_prompt_categoriesA
π Overview: List all available prompt categories with prompt counts. Use this to explore the library structure and see what categories exist before searching or creating prompts. Great for discovering new areas.
Inputs: no named parameters.
prompts_helpA
Get help understanding how to use the Smart Prompts tools effectively. Returns guidance on tool usage, examples, and best practices.
Inputs: topic.
search_promptsA
π ALWAYS START HERE: Search for prompts by keyword, category, or tags. Returns matching prompts with their metadata. This is the recommended first step before using get_prompt or creating new prompts. Helps avoid duplicates and find exactly what you need.
Inputs: tags, query, category.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose: help, list categories, search, get, create, check status, and compose. No overlap; descriptions clarify workflow order.
Most tools follow verb_noun snake_case (list_prompt_categories, search_prompts, get_prompt, etc.), but 'prompts_help' reverses to noun_verb, breaking the pattern.
7 tools is well-scoped for a prompt management server: discovery, retrieval, creation, composition, and status checking. Not too few or too many.
Covers discovery, retrieval, creation, and composition, but lacks update, delete, or list-all prompts, leaving notable gaps for full lifecycle management.
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Your prompt library in any MCP client: list, fetch, save and version prompt templates.
MCP server for generating rough-draft project plans from natural-language prompts.
A MCP server built for developers enabling Git based project management with project and personalβ¦
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that enables clients to extract LLM-friendly prompts from documentation in GitHub repositories or hosted websites.2Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that analyzes codebases and generates contextual prompts, making it easier for AI assistants to understand and work with code repositories.19MIT
- AlicenseAqualityFmaintenanceAn enhanced MCP server that fetches prompts from GitHub repositories with intelligent discovery, composition, and management features.712MIT
- AlicenseNot gradedqualityDmaintenanceA self-hosted remote MCP server that provides reusable prompts and development conventions across various AI tools. It features a modular architecture for organizing and namespacing custom prompts to streamline AI-assisted coding workflows.MIT