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
71 stars

The MCP Prompts Server is a comprehensive solution for managing, versioning, and serving prompts for LLM applications, built on the Model Context Protocol (MCP). It provides centralized storage for your prompts with versioning control and template capabilities.

Installation Options

Using NPX (Recommended)

The simplest way to get started is using NPX:

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

For multi-server setup 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
pnpm install
pnpm run build
pnpm start

Verifying Installation

Once the server is running, you can check its health:

curl http://localhost:3003/health

Usage

Client Configuration

MCP Prompts can be configured in various MCP clients like Cursor, Claude Desktop, or VS Code using the mcp.json configuration file:

Basic Configuration (Cursor, Claude Desktop, Amazon Q)

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

VS Code Configuration

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

Using with Docker

For Docker installations, your configuration might look like:

{
  "mcpServers": {
    "mcp-prompts": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "${PWD}/prompts:/app/prompts",
        "-e", "PROMPTS_DIR=/app/prompts",
        "-e", "POSTGRES_URL",
        "sparesparrow/mcp-prompts:latest"
      ],
      "env": {
        "POSTGRES_URL": "${POSTGRES_URL}"
      }
    }
  }
}

Environment Variables

Configure the server with environment variables:

STORAGE_TYPE=file          # Options: file, postgres, memory
PROMPTS_DIR=./data/prompts # Directory for prompt storage (for file storage)
POSTGRES_URL=postgres://   # PostgreSQL connection URL (for postgres storage)
PORT=3003                  # HTTP server port
LOG_LEVEL=info             # Logging level (debug, info, warn, error)

Integrating with Other MCP Servers

You can use MCP Prompts alongside other MCP servers in a federated setup:

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

Advanced Usage

Using MCP Prompts with PostgreSQL and Inspector

For more advanced setups, you can create a TypeScript-based MCP server with PostgreSQL:

// server.ts
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { Pool } from "pg";
import { z } from "zod";

const db = new Pool({ connectionString: process.env.DATABASE_URL });

const server = new McpServer({
  name: "mcp-prompts-postgres",
  version: "1.0.0"
});

server.registerTool(
  "getPromptFromDb",
  {
    title: "Get prompt from DB",
    description: "Returns a prompt template stored in Postgres",
    inputSchema: { id: z.string() }
  },
  async ({ id }) => {
    const { rows } = await db.query(
      "SELECT text FROM prompts WHERE id = $1",
      [id]
    );
    return {
      content: [{ type: "text", text: rows[0]?.text ?? "Not found" }]
    };
  }
);

await server.connect(new StdioServerTransport());

Debugging with MCP Inspector

After building your server, you can use the MCP Inspector to debug it:

npx @modelcontextprotocol/inspector node dist/server.js

The Inspector UI will open at http://localhost:6274 and allow you to browse resources, prompts, tools, and send test requests.

Exposing the Server Remotely

To expose your MCP server via SSE or HTTP:

# Create a stdio → SSE bridge on port 8080
npx -y @modelcontextprotocol/proxy --stdio "node dist/server.js" --sse 8080

Features Overview

MCP Prompts offers:

  • Full prompt CRUD operations via MCP tools
  • Template system for applying variables to prompts
  • Multiple storage backends (file, PostgreSQL, memory)
  • Versioning for tracking prompt history
  • Rate limiting and security features
  • OpenAPI documentation and strong type safety
  • Health checks and metrics
  • Docker and Docker Compose support
  • Integration with the broader MCP ecosystem

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