Prompt Registry
About
A lightweight, file-based server for managing and serving prompts via stdio.
Details
- Author
- stevengonsalvez
- Categories
- Developer Tools, AI, Knowledge Base
Jump to
Setup
Install Prompt Registry in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/stevengonsalvez/promptregistry-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
Prompt Registry: Your Personal Prompt Registry Server 🏰✍️
MCP Prompt Registryis a lightweight, file-basedModel Context Protocol (MCP)prompt server designed for developers. It runs viastdio, 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.
- Single Prompt Storage Directory:
- All prompts are stored in a single directory. You can control the location with thePROMPT_REGISTRY_PROJECT_DIRenvironment variable. If not set, prompts are stored in~/.promptregistry/in your home directory.
- Exposes prompts via standardprompts/list(lists all prompts).
- Allows prompts to be used via standardprompts/get(applies template variables).
- Notifies clients of changes vianotifications/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.
- filter_prompts_by_tags: Discover prompts by tags.
- Node.js:Version 18 or higher.
- npm(oryarn).
- (Optional) Docker:If you want to run the server in a container.
The server uses a single directory for all prompts:
- If the environment variablePROMPT_REGISTRY_PROJECT_DIRis set, prompts are stored in that directory.
- 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 localdefault_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 } }, "metadata": { "version": "1.1", "author": "You" } }
To install Prompt Registry for Claude Desktop automatically viaSmithery:
npx -y @smithery/cli install @stevengonsalvez/promptregistry-mcp --client claude
1. Using the Published NPM Package (Recommended for Clients)
Ifpromptregistry-mcpis published to npm, clients can easily run it.
- Ensure Node.js and npx are installed.
- Configure your MCP client (like Claude Desktop or Amazon Q) to use it. See examples below.
2. Local/Manual Installation (For Development or Direct Use)
-Clone the repository or download the files:(Assuming you haveserver.ts,package.json,tsconfig.json, and an optionaldefault_prompts_data/directory)
Install dependencies:Navigate to the server's root directory in your terminal:
This will create adist/directory with the compiled JavaScript.
- For development (usestsxto run TypeScript directly, with auto-restart on changes):
npm run dev
The server will start listening onstdinand outputting tostdout. Console messages from the server (like "Server is running...") will appear onstderr.
It will create the prompt directory (either as specified byPROMPT_REGISTRY_PROJECT_DIRor~/.promptregistry/) if it doesn't exist.
-
Build the Docker image:Ensure you have Docker installed. From the server's root directory:
(You can changemcp-promptregistrytopromptregistry-mcpor your preferred image name)
docker run -i -t --rm mcp-promptregistry
The container will have its own internal prompt directory. To persist prompts outside the container or use existing local prompts:
# Example: Mount local directory into the container docker run -i -t --rm \ -v "$HOME/.promptregistry:/root/.promptregistry" \ mcp-promptregistry
(Note: The home directory for therootuser inside the Alpine container is/root)
Here's how you might configure clients like Claude Desktop or Amazon Q to use your MCP Prompt Registry. The exact JSON structure might vary slightly based on the client's implementation, but the core idea is to define a stdio server.
Option A: Using the (Hypothetically) Published NPM Packagepromptregistry-mcp
If this server were published to npm aspromptregistry-mcp, the configuration would be very clean:
// Example client configuration JSON { "mcpServers": { "mcp-promptregistry": { "command": "npx", "args": [ "mcp-promptregistry" ], "env": { "PROMPT_REGISTRY_PROJECT_DIR": "/path/to/your/prompts" } } } }
This assumespromptregistry-mcpwhen run vianpxcorrectly starts the stdio server.
Option B: Running from Local (Compiled) Source
If you've built the server locally and want to point your client to it:
// Example client configuration JSON { "mcpServers": { "localPromptRegistry": { "command": "node", "args": [ "/full/path/to/your/mcp-promptregistry/dist/server.js" ], "env": {} } } }
Replace/full/path/to/your/mcp-promptregistry/with the actual absolute path to where you cloned/built the server.
Important Considerations for Client Configuration:
- Absolute Paths:When specifying paths for local commands (Option B), always use absolute paths, as the client application might execute the command from a different working directory.
- Environment Variables (env):UsePROMPT_REGISTRY_PROJECT_DIRto control where prompts are stored.
- Client-Specific Structure:The top-level key (e.g.,"mcpServers") and the exact structure can vary between different MCP client applications. Adapt thecommand,args, andenvto fit the client's requirements. The key is how it invokes your stdio server.
The most direct way to test. Run your server, then paste JSON-RPC messages into the same terminal and press Enter.
{"jsonrpc":"2.0","id":"list1","method":"prompts/list"}
The server's JSON-RPC response will appear onstdout. Server logs will appear onstderr.
{"jsonrpc":"2.0","id":"add1","method":"tools/call","params":{"name":"add_prompt","arguments":{"id":"my-test-prompt","content":"Test content: {{var1}}","tags":["test"],"variables":{"var1":{"description":"A test variable"}}}}}
The[MCP Inspectoris a GUI tool that can connect to MCP servers.
-
To connect to a locally running server (compiled):
mcp-inspector --stdio "node /path/to/your/mcp-promptregistry/dist/server.js"
mcp-inspector --stdio "docker run -i --rm mcp-promptregistry"
(Replacemcp-promptregistrywith your image name if different. Ensuremcp-inspectoris installed and in your PATH.)
The Inspector allows you to see available prompts and tools, make requests, and view responses interactively.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





