Prompt Manager MCP server

Manages and serves customizable prompt templates with variable substitution and tag-based organization for streamlined LLM interactions in development workflows and code reviews.
Back to servers
Setup instructions
Provider
/servers/sparesparrow-prompt-manager
Release date
Mar 05, 2025
Language
TypeScript
Stats
58 stars

The MCP Prompts Server is an extensible system for managing and serving prompts for large language model applications, built on the Model Context Protocol (MCP). It provides centralized storage, versioning, and templating capabilities for your AI prompts.

Installation Options

Using NPX (Simplest Method)

Run the server directly without installation:

npx -y @sparesparrow/mcp-prompts

Using Docker

For file-based storage:

docker run -d --name mcp-server -p 3003:3003 -v $(pwd)/data:/app/data ghcr.io/sparesparrow/mcp-prompts:latest

For PostgreSQL storage:

docker run -d --name mcp-server -p 3003:3003 -v $(pwd)/data:/app/data \
  -e "STORAGE_TYPE=postgres" -e "POSTGRES_URL=your_connection_string" \
  ghcr.io/sparesparrow/mcp-prompts:latest

Multiple services with Docker Compose:

docker-compose -f docker-compose.yml -f docker-compose.extended.yml up -d

Building from Source

git clone https://github.com/sparesparrow/mcp-prompts.git
cd mcp-prompts
npm install
npm run build
npm start

Verify Installation

Check that the server is running:

curl http://localhost:3003/health

Usage

Server Configuration

The server can be configured using environment variables:

# Basic configuration
STORAGE_TYPE=file      # Options: file, memory, postgres
PROMPTS_DIR=./prompts  # For file storage
PORT=3003              # HTTP port
LOG_LEVEL=info         # Options: debug, info, warn, error

# PostgreSQL configuration (if using postgres storage)
POSTGRES_URL=postgres://user:password@localhost:5432/database

# Security options
API_KEY=your_secret_key  # Enable API key authentication
CORS_ORIGIN=*            # Configure CORS
RATE_LIMIT=100           # Requests per minute

Client Configuration Examples

For Cursor, Claude Desktop, or Amazon Q clients (mcp.json):

{
  "mcpServers": {
    "mcp-prompts": {
      "command": "npx",
      "args": ["-y", "@sparesparrow/mcp-prompts"],
      "env": {
        "PROMPTS_DIR": "./my-prompts",
        "STORAGE_TYPE": "file"
      }
    }
  }
}

For VS Code or Hugging Face clients:

{
  "servers": [
    {
      "name": "mcp-prompts",
      "transport": {
        "type": "stdio",
        "command": "npx",
        "args": ["-y", "@sparesparrow/mcp-prompts"]
      },
      "env": {
        "PROMPTS_DIR": "./my-prompts"
      }
    }
  ]
}

Working with Prompts

The server provides an HTTP API and MCP tools for managing prompts.

Creating a Prompt

curl -X POST http://localhost:3003/api/prompts \
  -H "Content-Type: application/json" \
  -d '{
    "id": "greeting",
    "name": "Greeting Template",
    "description": "A simple greeting template",
    "prompt": "Hello, {{name}}! Welcome to {{service}}.",
    "schema": {
      "name": {"type": "string", "description": "User's name"},
      "service": {"type": "string", "description": "Service name"}
    },
    "tags": ["greeting", "welcome"]
  }'

Retrieving a Prompt

curl http://localhost:3003/api/prompts/greeting

Applying a Prompt (Template Substitution)

curl -X POST http://localhost:3003/api/prompts/greeting/apply \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John",
    "service": "MCP Prompts"
  }'

Listing All Prompts

curl http://localhost:3003/api/prompts

Advanced Features

Bulk Import/Export

Import multiple prompts from a JSON file:

curl -X POST http://localhost:3003/api/prompts/bulk/import \
  -H "Content-Type: application/json" \
  -d @prompts-collection.json

Export all prompts:

curl http://localhost:3003/api/prompts/bulk/export > prompts-backup.json

Working with Prompt Versions

Get all versions of a prompt:

curl http://localhost:3003/api/prompts/greeting/versions

Revert to a specific version:

curl -X POST http://localhost:3003/api/prompts/greeting/versions/v2/revert

Integration with Other MCP Servers

MCP Prompts can work alongside other MCP servers. For client-side federation, configure multiple servers in your host application:

{
  "mcpServers": {
    "mcp-prompts": { "command": "npx", "args": ["-y", "@sparesparrow/mcp-prompts"] },
    "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/files"] }
  }
}

For server-side integration, use Docker Compose for orchestration:

version: '3.8'
services:
  mcp-prompts:
    image: ghcr.io/sparesparrow/mcp-prompts:latest
    environment:
      - STORAGE_TYPE=file
      - PROMPTS_DIR=/app/prompts
    volumes:
      - ./prompts:/app/prompts
  filesystem-server:
    image: ghcr.io/modelcontextprotocol/server-filesystem:latest
    volumes:
      - ./prompts:/prompts

Debugging with MCP Inspector

For debugging and testing your MCP server:

npx @modelcontextprotocol/inspector npx -y @sparesparrow/mcp-prompts

The Inspector UI will open at http://localhost:6274, allowing you to browse resources, send test requests, and view logs.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "mcp-prompts" '{"command":"npx","args":["-y","@sparesparrow/[email protected]"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "mcp-prompts": {
            "command": "npx",
            "args": [
                "-y",
                "@sparesparrow/[email protected]"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "mcp-prompts": {
            "command": "npx",
            "args": [
                "-y",
                "@sparesparrow/[email protected]"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later