
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

An MCP server that syncs prompt templates from Git repositories and exposes them to MCP clients, supporting Handlebars templates, group filtering, caching, and hot-reload.
Git-driven MCP server for managing and serving prompt templates is cataloged as an MCP server attributed to carllee1983. An MCP server that syncs prompt templates from Git repositories and exposes them to MCP clients, supporting Handlebars templates, group filtering, caching, and hot-reload. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: ISC. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Git-driven MCP server for managing and serving prompt templates are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
The mcp.reload tool pulls the latest changes from the Git repository, clears the cache, and reloads all Handlebars partials and prompts without restarting the server.
The root directory and common group are always loaded, while other groups are only loaded when specified in the MCP_GROUPS environment variable.
README.md · c90bfa86f1e0 · 采集于 2026-11-13 12:05:22 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
Git-driven Model Context Protocol (MCP) Server for managing and providing Prompt templates
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:
.prompts_cache directory for faster reads.If you're installing from an MCP marketplace (e.g., mcp.so), follow the marketplace's installation instructions. Typically, you'll need to:
Before installing, ensure you have:
Install from Marketplace:
Locate Installation Path:
dist/index.js is locatedConfigure MCP Client:
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):
{
"mcpServers": {
"mcp-prompt-manager": {
"command": "node",
"args": ["/absolute/path/to/mcp-prompt-manager/dist/index.js"],
"env": {
"PROMPT_REPO_URL": "https://github.com/yourusername/your-prompts-repo.git",
"MCP_LANGUAGE": "en",
"MCP_GROUPS": "common",
"LOG_LEVEL": "info"
}
}
}
}
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.
If you're unsure where the marketplace installed the server:
macOS/Linux:
# Search for the installed file
find ~ -name "index.js" -path "*/mcp-prompt-manager/dist/index.js" 2>/dev/null
# Or check common installation locations
ls -la ~/.local/share/mcp-prompt-manager/dist/index.js
ls -la /usr/local/lib/node_modules/mcp-prompt-manager/dist/index.js
Windows:
# Search for the installed file
Get-ChildItem -Path $env:USERPROFILE -Filter "index.js" -Recurse -ErrorAction SilentlyContinue | Where-Object { $_.FullName -like "*mcp-prompt-manager\dist\index.js" }
After configuration:
Cmd/Ctrl + Shift + P, search for "MCP: Show servers"For detailed configuration instructions for different MCP clients, see the Configuration section below.
The easiest way to get started is using Docker:
# 1. Clone the repository
git clone <project URL>
cd mcp-prompt-manager
# 2. Copy environment variables example
cp .env.docker.example .env
# 3. Edit .env and set your Git repository URL
# PROMPT_REPO_URL=https://github.com/yourusername/your-prompts-repo.git
# 4. Start with Docker Compose
docker-compose up -d
# 5. View logs
docker-compose logs -f
For detailed Docker deployment instructions, see DOCKER.md.
This option is recommended for development or when you want full control over the installation.
git clone https://github.com/CarlLee1983/mcp-prompt-manager.git
cd mcp-prompt-manager
# Use pnpm (required - npm/yarn will fail)
pnpm install
Note: Installs are enforced with pnpm; npm/yarn will fail because of the preinstall check.
pnpm run build
This compiles TypeScript to JavaScript in the dist/ directory.
Copy the example configuration file and create .env:
cp .env.example .env
Edit the .env file to set your Prompt Git Repository path or URL:
# Git Repository source (required)
# Local path example
PROMPT_REPO_URL=/Users/yourname/Desktop/my-local-prompts
# Or remote Git URL examples
# PROMPT_REPO_URL=https://github.com/yourusername/my-prompts.git
# PROMPT_REPO_URL=git@github.com:yourusername/my-prompts.git
# Output language setting (optional, default: en)
MCP_LANGUAGE=en # or zh
# Group filter setting (optional, defaults to loading only common group when not set)
# Example: MCP_GROUPS="laravel,vue,react"
# Note: When not set, the system will explicitly prompt in logs about using default groups
MCP_GROUPS=laravel,vue
# Custom storage directory (optional, default: .prompts_cache)
STORAGE_DIR=/custom/path
# Git branch (optional, default: main)
GIT_BRANCH=main
# Git retry count (optional, default: 3)
GIT_MAX_RETRIES=3
# Cache cleanup interval (optional, default: 10000 milliseconds)
# Set the interval time (in milliseconds) for periodic cleanup of expired cache items
# Default is 10 seconds (CACHE_TTL * 2) to ensure expired items are cleaned up promptly
# Recommended values: 5000-30000 milliseconds, adjust based on usage frequency
CACHE_CLEANUP_INTERVAL=10000
# Log level (optional)
# Options: fatal, error, warn, info, debug, trace, silent
# Notes:
# - stderr only outputs warn/error/fatal level logs (to avoid being marked as error)
# - info/debug/trace level logs only output to file (if LOG_FILE is set)
# - If LOG_FILE is not set, info level logs are completely suppressed (to avoid confusion)
# - Production environment defaults to warn (only warnings and errors), development defaults to info
# - Setting silent completely disables log output
LOG_LEVEL=info
# Log file path (optional, strongly recommended)
# After setting this variable, all level logs will be written to file (JSON format)
# stderr still only outputs warn/error/fatal (to avoid being marked as error)
# Can be absolute or relative path (relative to project root)
# Examples:
# LOG_FILE=/tmp/mcp-prompt-manager.log
# LOG_FILE=logs/mcp.log
# Note: File is written in append mode, will not overwrite existing content
# Recommendation: Set this variable to view complete logs (including info level)
LOG_FILE=logs/mcp.log
After building, you need to configure your MCP client to use the locally installed server. The path will be:
/path/to/mcp-prompt-manager/dist/index.js
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.
For development purposes, you can use these commands:
# Install dependencies
pnpm install
# Build the project
pnpm run build
# Start development server with Inspector
pnpm dev
# Run tests
pnpm test:run
# Lint code
pnpm lint
We provide a convenient command to start the MCP Inspector for testing:
Important: Inspector runs the compiled dist/index.js, so if you've modified the source code, you need to compile first:
# 1. Compile first (if source code was modified)
pnpm run build
# 2. Start Inspector
pnpm run inspector
If you're developing, you can use a combined command that automatically compiles before starting Inspector:
pnpm run inspector:dev
This automatically runs build and then starts Inspector, ensuring you're testing the latest compiled code.
Inspector launches a web interface where you can:
macOS:
~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/mcp.json
Windows:
%APPDATA%\Cursor\User\globalStorage\cursor.mcp\mcp.json
Linux:
~/.config/Cursor/User/globalStorage/cursor.mcp/mcp.json
Find the configuration file:
Cmd/Ctrl + Shift + P, search for "MCP: Add server"mcp.json file at the path aboveEdit the configuration file:
{
"mcpServers": {
"mcp-prompt-manager": {
"command": "node",
"args": ["/path/to/mcp-prompt-manager/dist/index.js"],
"env": {
"PROMPT_REPO_URL": "/Users/yourname/Desktop/my-local-prompts",
"MCP_LANGUAGE": "zh",
"MCP_GROUPS": "laravel,vue"
}
}
}
}
Important Configuration Notes:
command: Use node to execute the compiled JavaScript fileargs: Must be an absolute path pointing to dist/index.jsenv: Environment variables (optional, if already set in .env)Verify Configuration:
Cmd/Ctrl + Shift + P, search for "MCP: Show servers"mcp-prompt-manager shows as connectedNote:
- Replace
/path/to/mcp-prompt-managerwith the actual absolute path of this project- If environment variables are already set in
.env, theenvblock can be omitted, but specifying directly in JSON is usually more robust- If the configuration file doesn't exist, you need to create the
mcp.jsonfile first
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Linux:
~/.config/Claude/claude_desktop_config.json
If the file doesn't exist, create it first:
# macOS/Linux
mkdir -p ~/Library/Application\ Support/Claude
touch ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-prompt-manager": {
"command": "node",
"args": ["/path/to/mcp-prompt-manager/dist/index.js"],
"env": {
"PROMPT_REPO_URL": "/Users/yourname/Desktop/my-local-prompts",
"MCP_LANGUAGE": "zh",
"MCP_GROUPS": "laravel,vue"
}
}
}
}
Note:
- Configuration file must be valid JSON format
- Paths must use absolute paths
- After modifying the configuration file, you must completely restart Claude Desktop
VS Code can use MCP Server through MCP extensions.
Install MCP Extension:
Configure MCP Server:
Cmd/Ctrl + ,)settings.json:{
"mcp.servers": {
"mcp-prompt-manager": {
"command": "node",
"args": ["/absolute/path/to/mcp-prompt-manager/dist/index.js"],
"env": {
"PROMPT_REPO_URL": "/path/to/your/repo",
"MCP_LANGUAGE": "zh",
"MCP_GROUPS": "laravel,vue"
}
}
}
}
Continue is an open-source AI code assistant that supports MCP.
macOS:
~/.continue/config.json
Windows:
%APPDATA%\Continue\config.json
Linux:
~/.config/Continue/config.json
Edit config.json:
{
"mcpServers": {
"mcp-prompt-manager": {
"command": "node",
"args": ["/absolute/path/to/mcp-prompt-manager/dist/index.js"],
"env": {
"PROMPT_REPO_URL": "/path/to/your/repo",
"MCP_LANGUAGE": "zh",
"MCP_GROUPS": "laravel,vue"
}
}
}
}
Aider is an AI code editor that supports MCP.
In Aider's configuration file (usually ~/.aider/config.json or via environment variables):
{
"mcp_servers": {
"mcp-prompt-manager": {
"command": "node",
"args": ["/absolute/path/to/mcp-prompt-manager/dist/index.js"],
"env": {
"PROMPT_REPO_URL": "/path/to/your/repo"
}
}
}
}
If you're developing your own application and want to integrate the MCP Server, you can use the MCP SDK:
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js"
import { spawn } from "child_process"
// Create MCP Client
const client = new Client(
{
name: "my-app",
version: "1.0.0",
},
{
capabilities: {},
}
)
// Create transport (using stdio)
const transport = new StdioClientTransport({
command: "node",
args: ["/path/to/mcp-prompt-manager/dist/index.js"],
env: {
PROMPT_REPO_URL: "/path/to/repo",
MCP_LANGUAGE: "en",
},
})
// Connect
await client.connect(transport)
// List available prompts
const prompts = await client.listPrompts()
console.log("Available prompts:", prompts)
// Get specific prompt
const prompt = await client.getPrompt({
name: "code-review",
arguments: {
code: "const x = 1",
language: "TypeScript",
},
})
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
async def main():
# Configure server parameters
server_params = StdioServerParameters(
command="node",
args=["/path/to/mcp-prompt-manager/dist/index.js"],
env={
"PROMPT_REPO_URL": "/path/to/repo",
"MCP_LANGUAGE": "en"
}
)
# Create session
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
# Initialize
await session.initialize()
# List prompts
prompts = await session.list_prompts()
print(f"Available prompts: {prompts}")
# Get prompt
prompt = await session.get_prompt(
name="code-review",
arguments={
"code": "const x = 1",
"language": "TypeScript"
}
)
print(f"Prompt result: {prompt}")
| Client | Configuration File Location | Config Format | Notes |
|---|---|---|---|
| Cursor | ~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/mcp.json (macOS) | mcpServers | Supports UI config |
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) | mcpServers | Requires full restart |
| VS Code | settings.json | mcp.servers | Requires MCP extension |
| Continue | ~/.continue/config.json | mcpServers | Open-source AI assistant |
| Aider | ~/.aider/config.json | mcp_servers | AI code editor |
Note: The
~in paths represents the user home directory, which expands to:
- macOS/Linux:
/Users/usernameor/home/username- Windows:
C:\Users\username
All MCP-compatible clients follow the same configuration format:
{
"mcpServers": {
"mcp-prompt-manager": {
"command": "node",
"args": ["/absolute/path/to/mcp-prompt-manager/dist/index.js"],
"env": {
"PROMPT_REPO_URL": "your-repo-url-or-path",
"MCP_LANGUAGE": "en",
"MCP_GROUPS": "common",
"LOG_LEVEL": "info"
}
}
}
}
| Variable | Required | Default | Description |
|---|---|---|---|
PROMPT_REPO_URL | Yes* | - | Primary Git repository URL or local path. (*Required if PROMPT_REPO_URLS is not set) |
PROMPT_REPO_URLS | No | - | Comma-separated list of multiple repository URLs (e.g. url1,url2). |
SYSTEM_REPO_URL | No | - | Separate repository URL for system-level prompts (e.g. common prompts). |
MCP_LANGUAGE | No | en | Output language. Options: en, zh. |
MCP_GROUPS | No | - | Comma-separated list of prompt groups to load (e.g. laravel,vue). If unset, checks System Repo or default behaviors. |
TRANSPORT_TYPE | No | stdio | Communication method. Options: stdio, http, sse. |
LOG_LEVEL | No | info | Logging verbosity. Options: debug, info, warn, error, silent. |
LOG_FILE | No | - | Path to write log file (e.g. logs/mcp.log). Highly recommended for debugging. |
STORAGE_DIR | No | .prompts_cache | directory to store cloned repositories. |
GIT_BRANCH | No | main | Default Git branch to clone. |
GIT_MAX_RETRIES | No | 3 | Number of retries for failed Git operations. |
GIT_POLLING_INTERVAL | No | 300000 | Interval (ms) to check for updates when WATCH_MODE=true. |
WATCH_MODE | No | false | Enable auto-reloading when changes are detected in the repository. |
CACHE_PROVIDER | No | local | Caching mechanism. Options: local, redis. |
CACHE_TTL | No | - | Time-to-live for cache items (optional). |
CACHE_CLEANUP_INTERVAL | No | 10000 | 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.
dist/index.js must be absolute.env defined in client config JSON overrides .env files.cd /path/to/mcp-prompt-manager
# If source code was modified, compile first
pnpm run build
# Start Inspector (or use inspector:dev for auto-compile)
pnpm run inspector
# or
pnpm run inspector:dev
This launches a web interface where you can:
Note: Inspector runs
dist/index.js, so after modifying source code, you must runbuildfirst to see the latest changes.
Add environment variables in the configuration file to view detailed logs:
{
"mcpServers": {
"mcp-prompt-manager": {
"command": "node",
"args": ["/path/to/mcp-prompt-manager/dist/index.js"],
"env": {
"PROMPT_REPO_URL": "/path/to/repo",
"LOG_LEVEL": "debug"
}
}
}
}
Then check the client's log output (Cursor's output panel or Claude Desktop's logs).
Verify Git repository has been synced successfully:
ls -la /path/to/mcp-prompt-manager/.prompts_cache
You should see files cloned from the Git repository.
Solution:
Solution:
Solution:
dist/index.js file existsSolution:
PROMPT_REPO_URL is correctMCP_GROUPS setting includes the groups you want
MCP_GROUPS is not set, the system defaults to loading only the common groupMCP_GROUPS=laravel,vue etc. to load other groups.yaml or .yml filesLOG_LEVEL=debug to view detailed logs and confirm which groups are loadedYour Prompt Repository (where PROMPT_REPO_URL points to) should have the following structure:
my-prompts/
├── partials/ # Store Handlebars partials (.hbs)
│ ├── role-expert.hbs
│ └── output-format.hbs
├── common/ # common group (always loaded)
│ ├── common-prompt.yaml
│ └── partials/
│ └── common-partial.hbs
├── laravel/ # laravel group (must be specified in MCP_GROUPS)
│ └── laravel-prompt.yaml
├── vue/ # vue group (must be specified in MCP_GROUPS)
│ └── vue-prompt.yaml
├── root-prompt.yaml # Root directory (always loaded)
└── another-prompt.yml
/): Always loadedcommon/): Always loadedMCP_GROUPS environment variableWhen MCP_GROUPS is not set:
common group (and root directory prompts)MCP_GROUPS to load more groupsMCP_GROUPS=laravel,vue → Load root, common, laravel, vueMCP_GROUPS= or not set → Only load root and common (system will prompt about using default).yaml)id: "code-review"
title: "Code Review"
description: "Help me review code"
args:
code:
type: "string"
description: "Code to review"
language:
type: "string"
description: "Programming language"
template: |
{{> role-expert }}
You are a senior {{language}} engineer.
Please review the following code:
{{ code }}
Prompts support three parameter types:
string: String type (default)number: Number typeboolean: Boolean typeYou can create a registry.yaml file in the root directory of your Prompt Repository to centrally manage prompt visibility and deprecation status.
prompts:
- id: "code-review"
group: "common"
visibility: "public" # public, private, internal
deprecated: false
- id: "old-prompt"
visibility: "private"
deprecated: true
id: Prompt ID (required)group: Group name (optional)visibility: Visibility setting
public: Public (default)private: Privateinternal: Internal usedeprecated: Whether deprecated (default false)Note:
registry.yamlis optional. If it doesn't exist, the system will use default values from prompt definition files.
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)Each prompt has a source (source) tag indicating where the metadata comes from:
embedded: Metadata embedded in prompt definition file (using metadata: block)registry: Settings from registry.yamllegacy: Legacy mode, no metadata, uses default valuesEach 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 upgradingThis project provides multiple MCP tools and resources for managing and querying Prompts.
mcp.reload / mcp.reload_promptsReload all Prompts without restarting the server (hot-reload).
{
"tool": "mcp.reload",
"arguments": {}
}
mcp.stats / mcp.prompt.statsGet Prompts statistics.
total: Total countactive: Active state countlegacy: Legacy state countinvalid: Invalid state countdisabled: Disabled countwarning: Warning state countmcp.list / mcp.prompt.listList all Prompts with multiple filter options.
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){
"tool": "mcp.list",
"arguments": {
"group": "laravel",
"runtime_state": "active"
}
}
mcp.inspectInspect detailed runtime information for a specific Prompt.
id: Prompt ID (required){
"tool": "mcp.inspect",
"arguments": {
"id": "code-review"
}
}
mcp.repo.switchSwitch to a different Prompt repository and reload (zero-downtime).
repo_url: Repository URL (required)branch: Branch name (optional){
"tool": "mcp.repo.switch",
"arguments": {
"repo_url": "/path/to/new/repo",
"branch": "main"
}
}
preview_promptPreview/render a prompt template with given arguments without executing it (debug utility).
promptId: Prompt ID (required, e.g., 'laravel:code-review')args: JSON object containing the arguments/variables for the template (required)success: Boolean indicating success or failurerenderedText: The rendered prompt texthighlightedText: The rendered text with variables highlighted in Markdown boldstatistics: Object containing renderedLength (character count) and estimatedTokens (estimated token count)warnings: Array of schema validation warnings (e.g., missing recommended fields){
"tool": "preview_prompt",
"arguments": {
"promptId": "laravel:code-review",
"args": {
"code": "function test() { return true; }",
"language": "php"
}
}
}
system://healthSystem health status resource.
system://healthapplication/jsongit: 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)prompts://listPrompts list resource.
prompts://listapplication/jsonid: Prompt IDtitle: Titleversion: Versionstatus: Statusruntime_state: Runtime statesource: Sourcetags: Tags arrayuse_cases: Use cases arraygroup: Group namevisibility: Visibilitymcp.reload to quickly reload prompts without restarting the servermcp.inspect to check detailed information for specific prompts, or use preview_prompt to test template renderingmcp.stats and system://health resource to monitor system statusmcp.list with filter conditions to find specific promptspreview_prompt to verify template logic, check token counts, and see variable replacements before actual executionThe MCP Prompt Manager follows a modular architecture with clear separation of concerns:
Repository Interface (src/repositories/strategy.ts)
Source Manager (src/services/sourceManager.ts)
Cache Layer (src/cache/)
┌─────────────────────────────────────────────────────────────┐
│ Git Repository │
│ (Remote URL or Local Path) │
└────────────────────┬───────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Repository Strategy │
│ • GitRepositoryStrategy: Clone/Pull from remote │
│ • LocalRepositoryStrategy: Watch local file system │
└────────────────────┬───────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Local Storage (.prompts_cache) │
│ • Cached repository files │
│ • File system cache (TTL-based) │
└────────────────────┬───────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Source Manager │
│ 1. Scan YAML files │
│ 2. Parse prompt definitions │
│ 3. Compile Handlebars templates │
│ 4. Validate with Zod schemas │
│ 5. Cache compiled templates │
└────────────────────┬───────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ MCP Server │
│ • Register prompts as MCP Tools │
│ • Provide MCP Resources (health, list) │
│ • Handle tool invocations │
└────────────────────┬───────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ MCP Clients │
│ (Cursor, Claude Desktop, etc.) │
└─────────────────────────────────────────────────────────────┘
mcp-prompt-manager/
├── src/
│ ├── index.ts # Main entry point
│ ├── config/
│ │ └── env.ts # Environment variable configuration and validation
│ ├── services/
│ │ ├── control.ts # MCP control tool handlers
│ │ ├── git.ts # Git sync service
│ │ ├── health.ts # Health status service
│ │ ├── loaders.ts # Prompt and Partials loader
│ │ └── sourceManager.ts # Core prompt lifecycle manager
│ ├── repositories/
│ │ ├── strategy.ts # Repository interface
│ │ ├── gitStrategy.ts # Git repository strategy
│ │ ├── localStrategy.ts # Local file system strategy
│ │ └── repoManager.ts # Repository manager
│ ├── cache/
│ │ ├── cacheProvider.ts # Cache interface
│ │ ├── localCache.ts # Local memory cache
│ │ └── cacheFactory.ts # Cache factory
│ ├── types/
│ │ ├── prompt.ts # Prompt type definitions
│ │ ├── promptMetadata.ts # Prompt metadata types
│ │ ├── promptRuntime.ts # Prompt runtime types
│ │ └── registry.ts # Registry type definitions
│ └── utils/
│ ├── fileSystem.ts # File system utilities (with cache)
│ ├── logger.ts # Logging utilities
│ ├── errorFormatter.ts # Error formatting utilities
│ └── repoConfig.ts # Repository configuration utilities
├── test/ # Test files
│ ├── config.test.ts
│ ├── loaders.test.ts
│ ├── sourceManager.test.ts
│ ├── cache.test.ts
│ ├── fileSystem.test.ts
│ └── integration.test.ts # Integration tests
├── dist/ # Compiled output
├── package.json
├── tsconfig.json
└── vitest.config.ts
# Compile TypeScript
npm run build
# or
pnpm run build
# Start MCP Inspector for debugging
# Note: Need to run build first, or use inspector:dev for auto-compile
pnpm run build && pnpm run inspector
# or use development mode (auto-compile)
pnpm run inspector:dev
# Run tests
npm run test
# or
pnpm test
# Run tests (once)
npm run test:run
# or
pnpm test:run
# Open test UI
npm run test:ui
# or
pnpm test:ui
# Format code
npm run format
# or
pnpm format
# Check code format
npm run format:check
# or
pnpm format:check
src/ directory.pnpm run build to recompile (or use pnpm run inspector:dev to auto-compile and test).pnpm run test to run tests.pnpm run inspector:dev to verify changes (will auto-compile and start Inspector).Important Notes:
- The
inspectorcommand runsdist/index.js(compiled file)- After modifying source code, you must run
buildfirst to see the latest changes- Using
inspector:devcan auto-compile and start, suitable for development
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.
# Install globally
npm install -g @carllee1983/prompt-toolkit
# or
pnpm add -g @carllee1983/prompt-toolkit
prompt-toolkit validate repo
prompt-toolkit validate repo --exit-code --severity error
# Validate entire repository
prompt-toolkit validate repo
# Validate with specific severity (show warnings and errors)
prompt-toolkit validate repo --severity warning
# Validate and exit with error code (for CI/CD)
prompt-toolkit validate repo --exit-code
# Validate single prompt file
prompt-toolkit validate file path/to/prompt.yaml
# Validate registry file
prompt-toolkit validate registry --repo-root /path/to/repo
# Validate partials directory
prompt-toolkit validate partials --partials-path partials
Add validation to your CI/CD pipeline to catch errors before deployment:
# .github/workflows/validate-prompts.yml
name: Validate Prompts
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install prompt-toolkit
run: npm install -g @carllee1983/prompt-toolkit
- name: Validate repository
run: prompt-toolkit validate repo --exit-code --severity error
--severity option to focus on critical issues--format json for machine-readable output in CI/CDYou can also use the toolkit programmatically in your scripts:
import { validatePromptRepo } from "@carllee1983/prompt-toolkit"
const result = validatePromptRepo("/path/to/prompt-repo")
if (result.success) {
console.log("Repository validation passed!")
} else {
console.error("Validation errors:", result.errors)
}
For more information, see the prompt-toolkit documentation.
The project includes a complete test suite:
Run tests:
# Watch mode
pnpm test
# Run once
pnpm test:run
# Open UI
pnpm test:ui
This project maintains high code quality through comprehensive test coverage with the following thresholds:
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.
Local Development: Run pnpm test:coverage to generate coverage reports, or use pnpm test:coverage:view to automatically open the HTML coverage report in your browser.
CI/CD: Run pnpm test:coverage:ci to 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# Generate coverage report (local development)
pnpm test:coverage
# Generate coverage report with threshold enforcement (CI)
pnpm test:coverage:ci
# Generate coverage report and open HTML report
pnpm test:coverage:view
This project enforces code quality through multiple layers of checks:
Pre-commit hooks automatically run linting and formatting before each commit using Husky and lint-staged:
strict: true in tsconfig.json)The pre-commit hook runs on staged files only, ensuring fast commit times while maintaining code quality.
GitHub Actions CI workflow runs on every push and pull request:
tsc --noEmit)To ensure code quality, the following checks must pass before a PR can be merged:
Setting up Required Checks in GitHub:
Test (Node.js 16.x) or Test (Node.js 18.x) or Test (Node.js 20.x) (at least one)The CI workflow will automatically fail if any of these checks fail, preventing merging of code that doesn't meet quality standards.
| Variable Name | Required | Default Value | Description |
|---|---|---|---|
PROMPT_REPO_URL | ✅ | - | Git repository URL or local path |
MCP_LANGUAGE | ❌ | en | Output language (en or zh) |
MCP_GROUPS | ❌ | common | Groups to load (comma-separated), system will prompt about default behavior when not set |
STORAGE_DIR | ❌ | .prompts_cache | Local cache directory |
GIT_BRANCH | ❌ | main | Git branch name |
GIT_MAX_RETRIES | ❌ | 3 | Maximum retry count for Git operations |
CACHE_CLEANUP_INTERVAL | ❌ | 10000 | Cache cleanup interval (milliseconds), periodic cleanup of expired cache items |
LOG_LEVEL | ❌ | warn (prod) / info (dev) | Log level, production defaults to warnings and errors only |
The system uses a TTL-based periodic cleanup mechanism to manage file list cache, ensuring memory efficiency.
CACHE_TTL * 2), adjustable via CACHE_CLEANUP_INTERVAL environment variablegetFilesRecursively() is called, scan results are cached for 5 seconds# Set shorter cleanup interval (for testing)
CACHE_CLEANUP_INTERVAL=2000 # Cleanup every 2 seconds
# Set longer cleanup interval (for production, reduce cleanup frequency)
CACHE_CLEANUP_INTERVAL=30000 # Cleanup every 30 seconds
You can view cache cleanup status through logs (requires setting LOG_LEVEL=debug):
[DEBUG] Cache cleanup mechanism started { interval: 10000 }
[DEBUG] Cache cleanup completed { cleaned: 2 }
See CACHE_VERIFICATION.md for complete verification methods and testing guide.
The project uses pino as the logging system, supporting structured logging.
fatal: Fatal errors that cause program exiterror: Error messageswarn: Warning messagesinfo: General informationdebug: Debug messagestrace: Trace messagessilent: Completely disable log outputDefault Behavior:
NODE_ENV not set or not development): Defaults to warn, only outputs warnings and errorsNODE_ENV=development): Defaults to info, outputs all info level and above logsLOG_LEVEL environment variable# Set in .env
LOG_LEVEL=debug
# Or set in environment variables
export LOG_LEVEL=debug
A: There are three installation options:
See the Quick Start section for detailed instructions.
A: Use these commands to locate the installed server:
macOS/Linux:
find ~ -name "index.js" -path "*/mcp-prompt-manager/dist/index.js" 2>/dev/null
Windows:
Get-ChildItem -Path $env:USERPROFILE -Filter "index.js" -Recurse -ErrorAction SilentlyContinue | Where-Object { $_.FullName -like "*mcp-prompt-manager\dist\index.js" }
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.
A: Try these steps:
args contains a full absolute path, not a relative onenode --version to ensure Node.js 18+ is installeddist/index.js exists at the specified pathLOG_LEVEL=debug in your configuration to see detailed error messagesA: You can use pnpm dev for development (with inspector) or pnpm start for production mode. See package.json scripts for more details.
A: This usually means a permission issue or invalid URL.
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).ssh-keyscan was run or your known_hosts file is mounted.git clone <URL> on your machine to verify the URL.Solution:
PROMPT_REPO_URL is correctSolution:
MCP_GROUPS setting is correctprompts/<group>/...)Solution:
.hbspartials/ directory{{> partial-name }} syntax in templatesISC
Welcome to submit Issues and Pull Requests!
Version: 1.0.0
Last Updated: 2024-11-30
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Git-driven MCP server for managing and serving prompt templates from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcp-prompt-manager)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.