Syncs and manages prompt templates from Git repositories, supporting both local and remote repositories with automatic caching, version control, and hot-reload capabilities.
MCP Prompt Manager (Git-Driven)
Git-driven Model Context Protocol (MCP) Server for managing and providing Prompt templates
📋 Introduction
This is a Git-driven Model Context Protocol (MCP) Server designed for managing and providing Prompt templates. It allows you to store Prompts in a separate Git Repository and use them directly in AI editors like Cursor, Claude Desktop, etc., through the MCP protocol.
Key Benefits:
🔄 Team Collaboration: Ensure unified Prompt versions across teams through Git version control
🎯 Dynamic Templates: Support Handlebars syntax to create reusable dynamic Prompts
🚀 Zero-Downtime Reload: Hot-reload support to update Prompts without restarting
🔍 Smart Management: Built-in Prompt version management, state tracking, and group filtering
📊 Complete Monitoring: System health status and Prompt statistics
✨ Features
Git Sync: Prompts are synced directly from the specified Git Repository, ensuring teams use unified Prompt versions.
Handlebars Templates: Support powerful Handlebars syntax to create dynamic, reusable Prompt templates.
Partials Support: Support Handlebars Partials for splitting and reusing Prompt fragments (e.g., role settings, output formats).
Local Cache: Automatically cache Git Repo content to local
.prompts_cachedirectory for faster reads.Cache Expiration Strategy: Automatically clean up expired cache items periodically to prevent memory leaks and ensure data consistency.
Group Filtering: Support filtering prompts by group, loading only what you need.
Error Handling: Complete error statistics and reporting for issue tracking.
Retry Mechanism: Automatic retry for Git operations to improve reliability.
Type Safety: Use Zod to validate configuration and prompt definitions for type safety.
Professional Logging: Use pino logging system with structured logs and multiple log levels.
🚀 Quick Start
Option 1: Marketplace Installation (Easiest)
If you're installing from an MCP marketplace (e.g., mcp.so), follow the marketplace's installation instructions. Typically, you'll need to:
Install via marketplace: Use the marketplace's installation interface
Configure your MCP client: Add the server configuration to your MCP client
Prerequisites
Before installing, ensure you have:
Node.js installed (version 18.0.0 or higher)
pnpm package manager (version 8.0.0 or higher)
A Git repository containing your prompts (or a local path to prompts)
An MCP-compatible client (Cursor, Claude Desktop, VS Code, etc.)
Installation Steps
Install from Marketplace:
Visit your preferred MCP marketplace
Search for "mcp-prompt-manager"
Follow the marketplace's installation instructions
Note the installation path where the server was installed
Locate Installation Path:
After marketplace installation, find where
dist/index.jsis locatedThis is typically in a global node_modules directory or a dedicated installation folder
You'll need the absolute path to this file for configuration
Configure MCP Client:
Open your MCP client's configuration file (see Configuration section for file locations)
Add the server configuration (see example below)
Important: Use absolute paths, not relative paths
Configuration Example
After installation, configure your MCP client (Cursor, Claude Desktop, etc.) with the following:
For Cursor (~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/mcp.json):
Note: Replace
/absolute/path/to/mcp-prompt-manager/dist/index.jswith the actual absolute path where the marketplace installed the server.
Tip: See mcp.json.example for a complete configuration template.
Finding the Installation Path
If you're unsure where the marketplace installed the server:
macOS/Linux:
Windows:
Verification
After configuration:
Restart your MCP client completely
Check server status:
In Cursor: Press
Cmd/Ctrl + Shift + P, search for "MCP: Show servers"In Claude Desktop: Check the MCP servers list in settings
Verify prompts are loaded: Use the client's MCP tools to list available prompts
For detailed configuration instructions for different MCP clients, see the Configuration section below.
Option 2: Docker Deployment (Recommended)
The easiest way to get started is using Docker:
For detailed Docker deployment instructions, see DOCKER.md.
Option 3: Local Installation
This option is recommended for development or when you want full control over the installation.
Prerequisites
Node.js 18.0.0 or higher
pnpm 8.0.0 or higher (required, npm/yarn will fail)
Git (for cloning the repository)
Installation Steps
Clone the Repository:
Install Dependencies:
Note: Installs are enforced with pnpm; npm/yarn will fail because of the preinstall check.
Build the Project:
This compiles TypeScript to JavaScript in the dist/ directory.
Configure Environment Variables:
Copy the example configuration file and create .env:
Edit the .env file to set your Prompt Git Repository path or URL:
Configure MCP Client:
After building, you need to configure your MCP client to use the locally installed server. The path will be:
Replace /path/to/mcp-prompt-manager with the actual absolute path where you cloned the repository.
See the Configuration section below for detailed client-specific configuration instructions.
Quick Start (Development)
For development purposes, you can use these commands:
🛠️ Usage
Testing with Inspector
We provide a convenient command to start the MCP Inspector for testing:
Basic Usage
Important: Inspector runs the compiled dist/index.js, so if you've modified the source code, you need to compile first:
Quick Development Mode
If you're developing, you can use a combined command that automatically compiles before starting Inspector:
This automatically runs build and then starts Inspector, ensuring you're testing the latest compiled code.
Inspector Features
Inspector launches a web interface where you can:
View all loaded prompts
Test prompt output
Check error messages
Verify environment variable settings
Using in Cursor
Configuration File Location
macOS:
Windows:
Linux:
Configuration Steps
Find the configuration file:
Method 1: In Cursor, press
Cmd/Ctrl + Shift + P, search for "MCP: Add server"Method 2: Directly edit the
mcp.jsonfile at the path above
Edit the configuration file:
Important Configuration Notes:
command: Usenodeto execute the compiled JavaScript fileargs: Must be an absolute path pointing todist/index.jsenv: Environment variables (optional, if already set in.env)
Verify Configuration:
Restart Cursor
In Cursor, press
Cmd/Ctrl + Shift + P, search for "MCP: Show servers"Confirm that
mcp-prompt-managershows as connected
Note:
Replace
/path/to/mcp-prompt-managerwith the actual absolute path of this projectIf environment variables are already set in
.env, theenvblock can be omitted, but specifying directly in JSON is usually more robustIf the configuration file doesn't exist, you need to create the
mcp.jsonfile first
Using in Claude Desktop
Configuration File Location
macOS:
Windows:
Linux:
Configuration Steps
Create or edit the configuration file:
If the file doesn't exist, create it first:
Edit the configuration file:
Verify Configuration:
Completely close Claude Desktop (ensure all windows are closed)
Restart Claude Desktop
In conversations, Claude should be able to use your defined prompts
Note:
Configuration file must be valid JSON format
Paths must use absolute paths
After modifying the configuration file, you must completely restart Claude Desktop
Using in VS Code (via Extension)
VS Code can use MCP Server through MCP extensions.
Configuration Steps
Install MCP Extension:
Search for "MCP" or "Model Context Protocol" in VS Code Extension Marketplace
Install the corresponding extension
Configure MCP Server:
Open VS Code settings (
Cmd/Ctrl + ,)Search for "MCP" related settings
Or edit
settings.json:
Using in Continue
Continue is an open-source AI code assistant that supports MCP.
Configuration File Location
macOS:
Windows:
Linux:
Configuration Steps
Edit config.json:
Using in Aider
Aider is an AI code editor that supports MCP.
Configuration Method
In Aider's configuration file (usually ~/.aider/config.json or via environment variables):
Using in Custom Applications (Programmatic)
If you're developing your own application and want to integrate the MCP Server, you can use the MCP SDK:
TypeScript/JavaScript Example
Python Example
MCP Client Quick Reference
Client | Configuration File Location | Config Format | Notes |
Cursor |
|
| Supports UI config |
Claude Desktop |
|
| Requires full restart |
VS Code |
|
| Requires MCP extension |
Continue |
|
| Open-source AI assistant |
Aider |
|
| AI code editor |
Note: The
~in paths represents the user home directory, which expands to:
macOS/Linux:
/Users/usernameor/home/usernameWindows:
C:\Users\username
Universal Configuration Format
All MCP-compatible clients follow the same configuration format:
📝 Environment Variables Reference
Variable | Required | Default | Description |
| Yes* | - | Primary Git repository URL or local path. (*Required if |
| No | - | Comma-separated list of multiple repository URLs (e.g. |
| No | - | Separate repository URL for system-level prompts (e.g. common prompts). |
| No |
| Output language. Options: |
| No | - | Comma-separated list of prompt groups to load (e.g. |
| No |
| Communication method. Options: |
| No |
| Logging verbosity. Options: |
| No | - | Path to write log file (e.g. |
| No |
| directory to store cloned repositories. |
| No |
| Default Git branch to clone. |
| No |
| Number of retries for failed Git operations. |
| No |
| Interval (ms) to check for updates when |
| No |
| Enable auto-reloading when changes are detected in the repository. |
| No |
| Caching mechanism. Options: |
| No | - | Time-to-live for cache items (optional). |
| No |
| Interval (ms) to clean up expired cache items. |
Security Note:
Never commit
.envfiles to version control. The.env.examplefile is provided as a template only.Avoid hardcoding sensitive credentials (passwords, tokens) in
PROMPT_REPO_URL.Use SSH keys (
git@github.com...) for secure, password-less authentication.For production, use Docker Secrets or your platform's secret management system.
Important Configuration Notes
Absolute Paths: When configuring clients like Cursor/Claude, paths to
dist/index.jsmust be absolute.JSON Format: Ensure your config file is valid JSON (no trailing commas).
Precedence:
envdefined in client config JSON overrides.envfiles.Restart: Always restart your AI editor/client after changing configuration.
Verifying MCP Server is Running Properly
Method 1: Using MCP Inspector
This launches a web interface where you can:
View all loaded prompts
Test prompt output
Check error messages
Note: Inspector runs
dist/index.js, so after modifying source code, you must runbuildfirst to see the latest changes.
Method 2: Check Logs
Add environment variables in the configuration file to view detailed logs:
Then check the client's log output (Cursor's output panel or Claude Desktop's logs).
Method 3: Check File System
Verify Git repository has been synced successfully:
You should see files cloned from the Git repository.
Common Configuration Issues
Issue 1: Configuration File Not Found
Solution:
Confirm the application has been started at least once (will automatically create configuration directory)
Manually create the configuration file and directory
Check if the path is correct (note case sensitivity and spaces)
Issue 2: JSON Format Error
Solution:
Use JSON validation tools to check format (e.g., JSONLint)
Ensure all strings use double quotes
Ensure no comma after the last item
Issue 3: Server Cannot Start
Solution:
Confirm
dist/index.jsfile existsConfirm path is absolute
Confirm Node.js is installed and version >= 18
Check if environment variables are correct
Check client error logs
Issue 4: No Prompts Found
Solution:
Confirm
PROMPT_REPO_URLis correctCheck if
MCP_GROUPSsetting includes the groups you wantNote: If
MCP_GROUPSis not set, the system defaults to loading only thecommongroupCheck log messages to confirm if default groups are being used
Set
MCP_GROUPS=laravel,vueetc. to load other groups
Confirm Git repository contains
.yamlor.ymlfilesUse
LOG_LEVEL=debugto view detailed logs and confirm which groups are loaded
📂 Prompt Repository Structure
Your Prompt Repository (where PROMPT_REPO_URL points to) should have the following structure:
Group Filtering Rules
Root directory (
/): Always loadedcommon group (
common/): Always loadedOther groups: Only loaded when specified in
MCP_GROUPSenvironment variable
Default Behavior
When MCP_GROUPS is not set:
System automatically loads the
commongroup (and root directory prompts)Startup logs will explicitly prompt about using default groups
Logs will include messages suggesting to set
MCP_GROUPSto load more groups
Examples
MCP_GROUPS=laravel,vue→ Load root, common, laravel, vueMCP_GROUPS=or not set → Only load root and common (system will prompt about using default)
Prompt Definition File Example (.yaml)
{{ code }}
Parameter Types
Prompts support three parameter types:
string: String type (default)number: Number typeboolean: Boolean type
Registry Feature (Optional)
You can create a registry.yaml file in the root directory of your Prompt Repository to centrally manage prompt visibility and deprecation status.
Registry File Format
Registry Field Descriptions
id: Prompt ID (required)group: Group name (optional)visibility: Visibility settingpublic: Public (default)private: Privateinternal: Internal use
deprecated: Whether deprecated (defaultfalse)
Registry Purpose
Centralized Management: Manage all prompts' visibility and deprecation status in a single file
Override Defaults: Can override default settings in prompt definition files
Version Control: Track prompt lifecycle through Git
Note:
registry.yamlis optional. If it doesn't exist, the system will use default values from prompt definition files.
Prompt Runtime State
Each prompt has a runtime state (runtime_state) indicating the prompt's current availability:
active: Active state, prompt works normally and can be used as an MCP Toollegacy: Legacy state, prompt is still available but marked as old version, recommend using new versioninvalid: Invalid state, prompt definition has issues (e.g., missing required fields, template errors, etc.), cannot be useddisabled: Disabled, prompt is explicitly disabled (e.g., marked as deprecated in registry)warning: Warning state, prompt can work but has some warnings (e.g., version too old)
Prompt Source
Each prompt has a source (source) tag indicating where the metadata comes from:
embedded: Metadata embedded in prompt definition file (usingmetadata:block)registry: Settings fromregistry.yamllegacy: Legacy mode, no metadata, uses default values
Prompt Status
Each prompt has a status (status) indicating the prompt's development stage:
draft: Draft, under developmentstable: Stable version, can be used normallydeprecated: Deprecated, not recommended for uselegacy: Legacy version, still available but recommend upgrading
🔧 MCP Tools and Resources
This project provides multiple MCP tools and resources for managing and querying Prompts.
MCP Tools
1. mcp.reload / mcp.reload_prompts
Reload all Prompts without restarting the server (hot-reload).
Function: Pull latest changes from Git repository, clear cache, reload all Handlebars partials and prompts
Parameters: None
Usage Example:
{ "tool": "mcp.reload", "arguments": {} }
2. mcp.stats / mcp.prompt.stats
Get Prompts statistics.
Function: Returns statistics for all prompts, including counts by runtime state (active, legacy, invalid, disabled, warning)
Parameters: None
Return Content:
total: Total countactive: Active state countlegacy: Legacy state countinvalid: Invalid state countdisabled: Disabled countwarning: Warning state count
3. mcp.list / mcp.prompt.list
List all Prompts with multiple filter options.
Function: Lists all prompt runtimes with complete metadata information
Parameters (optional):
status: Filter by status (draft,stable,deprecated,legacy)group: Filter by group nametag: Filter by tag (prompts must contain this tag)runtime_state: Filter by runtime state (active,legacy,invalid,disabled,warning)
Usage Example:
{ "tool": "mcp.list", "arguments": { "group": "laravel", "runtime_state": "active" } }
4. mcp.inspect
Inspect detailed runtime information for a specific Prompt.
Function: Get complete runtime metadata by Prompt ID, including state, source, version, tags, and use cases
Parameters:
id: Prompt ID (required)
Usage Example:
{ "tool": "mcp.inspect", "arguments": { "id": "code-review" } }
5. mcp.repo.switch
Switch to a different Prompt repository and reload (zero-downtime).
Function: Switch to a new Git repository and reload all prompts
Parameters:
repo_url: Repository URL (required)branch: Branch name (optional)
Usage Example:
{ "tool": "mcp.repo.switch", "arguments": { "repo_url": "/path/to/new/repo", "branch": "main" } }
6. preview_prompt
Preview/render a prompt template with given arguments without executing it (debug utility).
Function: Renders a prompt template with given arguments to show the final text without sending it to an LLM. Use this to verify template logic.
Parameters:
promptId: Prompt ID (required, e.g.,'laravel:code-review')args: JSON object containing the arguments/variables for the template (required)
Returns:
success: Boolean indicating success or failurerenderedText: The rendered prompt texthighlightedText: The rendered text with variables highlighted in Markdown boldstatistics: Object containingrenderedLength(character count) andestimatedTokens(estimated token count)warnings: Array of schema validation warnings (e.g., missing recommended fields)
Usage Example:
{ "tool": "preview_prompt", "arguments": { "promptId": "laravel:code-review", "args": { "code": "function test() { return true; }", "language": "php" } } }Advanced Features:
Schema Validation: Strict validation of arguments against prompt's Zod schema
Token Estimation: Estimates token count (supports both English and Chinese text)
Variable Highlighting: Highlights dynamically replaced variables with Markdown bold formatting
Schema Warnings: Detects and reports missing required or recommended fields
MCP Resources
1. system://health
System health status resource.
URI:
system://healthMIME Type:
application/jsonContent: Includes the following information:
git: Git repository information (URL, path, HEAD commit)prompts: Prompts statistics (total, counts by state, loaded count, group list)registry: Registry status (enabled, source)cache: Cache information (size, cleanup interval)system: System information (uptime, memory usage)
2. prompts://list
Prompts list resource.
URI:
prompts://listMIME Type:
application/jsonContent: Complete metadata list of all prompts, including:
id: Prompt IDtitle: Titleversion: Versionstatus: Statusruntime_state: Runtime statesource: Sourcetags: Tags arrayuse_cases: Use cases arraygroup: Group namevisibility: Visibility
Tool Usage Recommendations
During Development: Use
mcp.reloadto quickly reload prompts without restarting the serverDuring Debugging: Use
mcp.inspectto check detailed information for specific prompts, or usepreview_promptto test template renderingDuring Monitoring: Use
mcp.statsandsystem://healthresource to monitor system statusDuring Querying: Use
mcp.listwith filter conditions to find specific promptsDuring Testing: Use
preview_promptto verify template logic, check token counts, and see variable replacements before actual execution
💻 Development Guide
Architecture Overview
The MCP Prompt Manager follows a modular architecture with clear separation of concerns:
Core Components
Repository Interface (
src/repositories/strategy.ts)Abstract interface for different repository types (Git, Local)
Supports multiple repository strategies with priority-based loading
Handles repository synchronization and file watching
Source Manager (
src/services/sourceManager.ts)Singleton pattern for managing prompt lifecycle
Handles prompt loading, caching, and registration
Compiles Handlebars templates at load time for performance
Manages prompt runtime states and metadata
Cache Layer (
src/cache/)Abstract cache provider interface supporting local and Redis (future)
Local cache with LRU eviction and TTL support
Automatic cleanup of expired cache items
Prompt Storage Flow
Key Modules
Repository Interface: Abstract strategy pattern for Git and local repositories
Source Manager: Centralized prompt lifecycle management with caching
Cache Provider: Pluggable cache system (local memory or Redis)
Loaders: High-level API for loading prompts and partials
MCP Tools: Dynamic tool registration based on loaded prompts
Project Structure
Common Commands
Development Workflow
Modify code in the
src/directory.Run
pnpm run buildto recompile (or usepnpm run inspector:devto auto-compile and test).Run
pnpm run testto run tests.Use
pnpm run inspector:devto verify changes (will auto-compile and start Inspector).Restart MCP Server in Cursor or Claude Desktop to apply changes.
Important Notes:
The
inspectorcommand runsdist/index.js(compiled file)After modifying source code, you must run
buildfirst to see the latest changesUsing
inspector:devcan auto-compile and start, suitable for development
Prompt Repository Validation
We recommend using @carllee1983/prompt-toolkit to validate your prompt repository before deploying to MCP Prompt Manager. This ensures prompt quality and catches errors early in the development process.
Installation
Development Workflow with Validation
Develop Prompts: Create and edit prompts in your repository
Validate Locally: Use the toolkit to validate before committing
prompt-toolkit validate repoCI/CD Validation: Automatically validate in CI/CD pipelines
prompt-toolkit validate repo --exit-code --severity errorDeploy to MCP Prompt Manager: MCP Prompt Manager loads validated prompts
Quick Validation Commands
CI/CD Integration
Add validation to your CI/CD pipeline to catch errors before deployment:
Best Practices
✅ Validate before committing: Run validation locally before pushing changes
✅ Use CI/CD: Automatically validate in CI/CD pipelines to catch errors
✅ Monitor results: Track validation results to maintain repository health
✅ Severity filtering: Use
--severityoption to focus on critical issues✅ JSON output: Use
--format jsonfor machine-readable output in CI/CD
Programmatic Usage
You can also use the toolkit programmatically in your scripts:
For more information, see the prompt-toolkit documentation.
🧪 Testing
The project includes a complete test suite:
Unit Tests: Multiple test files covering all core functionality
Integration Tests: End-to-end testing for prompt loading and MCP tools
Total: 107 tests, all passing
Run tests:
Test Coverage
This project maintains high code quality through comprehensive test coverage with the following thresholds:
Statements: ≥ 80%
Lines: ≥ 75%
Functions: ≥ 75%
Branches: ≥ 70%
Note: Coverage reports use
@vitest/coverage-v8which requires Node.js 19+. Coverage thresholds are enforced to maintain code quality. If coverage falls below thresholds, tests will fail to ensure quality standards.
Viewing Coverage Reports
Local Development: Run
pnpm test:coverageto generate coverage reports, or usepnpm test:coverage:viewto automatically open the HTML coverage report in your browser.CI/CD: Run
pnpm test:coverage:cito generate coverage reports and enforce thresholds. The CI pipeline will fail if coverage thresholds are not met, ensuring code quality standards are maintained before merging or releasing.Coverage Reports: Coverage reports are generated in the
coverage/directory with multiple formats:coverage/index.html- Interactive HTML reportcoverage/coverage-final.json- JSON format for CI integrationcoverage/lcov.info- LCOV format for coverage services
Coverage Commands
Code Quality and CI/CD
This project enforces code quality through multiple layers of checks:
Pre-commit Hooks
Pre-commit hooks automatically run linting and formatting before each commit using Husky and lint-staged:
ESLint: Automatically fixes linting issues in TypeScript files
Prettier: Automatically formats code to ensure consistent style
Type Safety: TypeScript strict mode is enabled (
strict: trueintsconfig.json)
The pre-commit hook runs on staged files only, ensuring fast commit times while maintaining code quality.
Continuous Integration (CI)
GitHub Actions CI workflow runs on every push and pull request:
Node.js Compatibility: Tests across Node.js 16.x, 18.x, and 20.x
Linting: ESLint checks for code quality and style
Type Checking: TypeScript type checking (
tsc --noEmit)Testing: Full test suite with coverage reporting
Coverage Upload: Automatic upload to Codecov
Required Checks for Pull Requests
To ensure code quality, the following checks must pass before a PR can be merged:
Lint: All ESLint rules must pass
Typecheck: TypeScript compilation must succeed with no errors
Tests: All tests must pass with coverage thresholds met
Setting up Required Checks in GitHub:
Go to your repository settings
Navigate to Branches → Branch protection rules
Add or edit a rule for your main branch
Under Require status checks to pass before merging, enable:
Test (Node.js 16.x)orTest (Node.js 18.x)orTest (Node.js 20.x)(at least one)These checks will automatically include lint, typecheck, and test steps
The CI workflow will automatically fail if any of these checks fail, preventing merging of code that doesn't meet quality standards.
🔧 Configuration
Environment Variables
Variable Name | Required | Default Value | Description |
| ✅ | - | Git repository URL or local path |
| ❌ |
| Output language ( |
| ❌ |
| Groups to load (comma-separated), system will prompt about default behavior when not set |
| ❌ |
| Local cache directory |
| ❌ |
| Git branch name |
| ❌ |
| Maximum retry count for Git operations |
| ❌ |
| Cache cleanup interval (milliseconds), periodic cleanup of expired cache items |
| ❌ |
| Log level, production defaults to warnings and errors only |
Cache Expiration Strategy
The system uses a TTL-based periodic cleanup mechanism to manage file list cache, ensuring memory efficiency.
Cache Mechanism
Cache TTL: 5 seconds (hardcoded)
Cleanup Interval: Default 10 seconds (
CACHE_TTL * 2), adjustable viaCACHE_CLEANUP_INTERVALenvironment variableAuto Cleanup: Cleanup mechanism starts automatically when application starts
Graceful Shutdown: Cleanup timer stops automatically when application closes
How It Works
Cache Creation: When
getFilesRecursively()is called, scan results are cached for 5 secondsPeriodic Cleanup: Every 10 seconds (or configured interval), automatically scans and removes expired cache items
Memory Management: Prevents cache from growing indefinitely, avoiding memory leaks
Configuration Examples
Monitor Cache Status
You can view cache cleanup status through logs (requires setting LOG_LEVEL=debug):
Verify Cache Mechanism
See CACHE_VERIFICATION.md for complete verification methods and testing guide.
Security
✅ Input Validation: All environment variables are validated with Zod
✅ Path Security: Prevents path traversal attacks
✅ Group Validation: Group name format validation (only letters, numbers, underscores, dashes allowed)
📝 Logging
The project uses pino as the logging system, supporting structured logging.
Log Levels
fatal: Fatal errors that cause program exiterror: Error messageswarn: Warning messagesinfo: General informationdebug: Debug messagestrace: Trace messagessilent: Completely disable log output
Default Behavior:
Production Environment (
NODE_ENVnot set or notdevelopment): Defaults towarn, only outputs warnings and errorsDevelopment Environment (
NODE_ENV=development): Defaults toinfo, outputs all info level and above logsCan override default value via
LOG_LEVELenvironment variable
Setting Log Level
❓ FAQ & Troubleshooting
Q: How do I install MCP Prompt Manager?
A: There are three installation options:
Marketplace Installation (Easiest): Install from an MCP marketplace like mcp.so
Docker Deployment (Recommended for production): Use Docker Compose for easy deployment
Local Installation (For development): Clone the repository and build locally
See the Quick Start section for detailed instructions.
Q: How do I find the installation path after marketplace installation?
A: Use these commands to locate the installed server:
macOS/Linux:
Windows:
Q: Why do I need to use absolute paths in the configuration?
A: MCP clients execute the server as a separate process and need the full path to locate the executable. Relative paths won't work because the working directory may differ.
Q: The server doesn't appear in my MCP client after configuration.
A: Try these steps:
Verify the path is absolute: Check that
argscontains a full absolute path, not a relative oneCheck Node.js is installed: Run
node --versionto ensure Node.js 18+ is installedVerify the file exists: Ensure
dist/index.jsexists at the specified pathCheck JSON syntax: Validate your configuration file is valid JSON (no trailing commas)
Restart completely: Fully close and restart your MCP client (not just reload)
Check logs: Enable
LOG_LEVEL=debugin your configuration to see detailed error messages
Q: How do I run the server locally?
A: You can use pnpm dev for development (with inspector) or pnpm start for production mode. See package.json scripts for more details.
Q: I'm getting a Git Clone Error (Exit Code 128).
A: This usually means a permission issue or invalid URL.
SSH vs HTTPS: If using SSH (
git@github.com...), ensure your SSH keys are correctly mounted or available. If using HTTPS, ensure you don't need a token (or provide it).Known Hosts: If running in Docker, ensure
ssh-keyscanwas run or yourknown_hostsfile is mounted.Repo Validity: Manually try
git clone <URL>on your machine to verify the URL.
Issue: Git Sync Failed (General)
Solution:
Check if
PROMPT_REPO_URLis correctConfirm network connection is normal
Check if Git credentials are correct
Check logs for detailed error messages
Issue: No Prompts Loaded
Solution:
Check if
MCP_GROUPSsetting is correctConfirm prompt files are in the correct directory structure (
prompts/<group>/...)Check if YAML file format is correct
Check error messages in logs
Issue: Partials Cannot Be Used
Solution:
Confirm partial file extension is
.hbsConfirm partials are in the
partials/directoryCheck if partial file content is correct
Confirm using
{{> partial-name }}syntax in templates
📦 Key Dependencies
@modelcontextprotocol/sdk: MCP SDK, provides MCP Server core functionality
handlebars: Handlebars template engine, supports dynamic Prompt generation
simple-git: Git operations library for syncing Git repositories
js-yaml: YAML parser for parsing Prompt definition files
zod: TypeScript-first schema validation library for configuration and type validation
pino: High-performance structured logging library
dotenv: Environment variable loading utility
📚 Related Resources
@carllee1983/prompt-toolkit - Prompt repository validation toolkit for MCP
📄 License
ISC
🤝 Contributing
Welcome to submit Issues and Pull Requests!
Version: 1.0.0
Last Updated: 2024-11-30