SP

stevengonsalvez/promptregistry-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

7 stars 6 forks Качество 71 Тренд 29

lightweight , file based prompt server for developers

Обзор

is a lightweight, file-based Model Context Protocol (MCP) prompt server designed for developers. It runs via stdio, making it perfect for local development and integration with CLIs or desktop AI assistants that support MCP. It allows you to manage your prompts in a single directory, keeping your workflow simple and portable. * * All prompts are stored in a single directory. You can control the location with the PROMPT_REGISTRY_PROJECT_DIR environment variable. If not set, prompts are stored in ~/.promptregistry/ in your home directory. * Prompts are simple JSON files – easy to read, edit, and version control. * * Exposes prompts via standard prompts/list (lists all prompts). * Allows prompts to be used via standard prompts/get (applies template variables). * Notifies clients of changes via notifications/prompts/list_changed. * * add_prompt: Add new prompts. * get_prompt_file_content: View the raw JSON of a prompt. * update_prompt: Modify prompts. * delete_prompt: Remove prompts.

README

Показан фрагмент оригинального README. Открыть оригинал.

Prompt Registry: Your Personal Prompt Registry Server 🏰✍️

MCP Prompt Registry is a lightweight, file-based Model Context Protocol (MCP) prompt server designed for developers. It runs via stdio, making it perfect for local development and integration with CLIs or desktop AI assistants that support MCP. It allows you to manage your prompts in a single directory, keeping your workflow simple and portable.

✨ Features

  • Single Prompt Storage Directory:
    • All prompts are stored in a single directory. You can control the location with the PROMPT_REGISTRY_PROJECT_DIR environment variable. If not set, prompts are stored in ~/.promptregistry/ in your home directory.
  • File-Based: Prompts are simple JSON files – easy to read, edit, and version control.
  • Standard MCP Compliance:
    • Exposes prompts via standard prompts/list (lists all prompts).
    • Allows prompts to be used via standard prompts/get (applies template variables).
    • Notifies clients of changes via notifications/prompts/list_changed.
  • Management via MCP Tools:
    • add_prompt: Add new prompts.
    • get_prompt_file_content: View the raw JSON of a prompt.
    • update_prompt: Modify prompts.
    • delete_prompt: Remove prompts.
    • filter_prompts_by_tags: Discover prompts by tags.
  • Stdio Interface: Communicates over standard input/output, ideal for local tools.
  • Template Variables: Supports {{variable_name}} syntax in prompt content.
  • Zod Schema Validation: Robust validation for tool arguments.

Prerequisites

  • Node.js: Version 18 or higher.
  • npm (or yarn).
  • (Optional) Docker: If you want to run the server in a container.

📁 Directory Structure for Prompts

The server uses a single directory for all prompts:

  1. If the environment variable PROMPT_REGISTRY_PROJECT_DIR is set, prompts are stored in that directory.
  2. If not set, prompts are stored in ~/.promptregistry/ in your home directory. On first startup, or if prompts are missing, the server will attempt to copy predefined prompts from a local default_prompts_data/ directory (if present) into ~/.promptregistry/.

Prompt JSON File Structure (your-prompt-id.json):

{
  "id": "your-prompt-id",
  "description": "A brief description for MCP listing",
  "content": "Your prompt template, e.g., Explain {{concept}} like I'm {{age}}.",
  "tags": ["tag1", "category_a"],
  "variables": {
    "concept": { "description": "The concept to explain", "required": true },
    "age": { "description": "The target audience's age", "required": false }
Открыть полный README на GitHub

Установка

npx mcp-promptregistry
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

// Example client configuration JSON { "mcpServers": { "mcp-promptregistry": { "command": "npx", "args": [ "mcp-promptregistry" ], "env": { "PROMPT_REGISTRY_PROJECT_DIR": "/path/to/your/prompts" } } } }