Get the FREE Ultimate OpenClaw Setup Guide →

mcp-prompt -go

一个提供优秀prompt的Model Context Protocol (MCP)的服务器,用于根据用户任务需求提供预设的prompt模板,帮助Cline/Cursor/Windsurf...更高效地执行各种任务。服务器将预设的prompt作为工具(tools)返回,以便在Cursor和Windsurf等编辑器中更好地和使用。提供tool和prompt两种形式

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio smallnest-mcp-prompt-server-go docker run -i mcp-prompt-server-go \
  --env PROMPTS_DIR="prompts (default: prompts/ under repo root)" \
  --env CONFIG_VERBOSE="false"

How to use

This MCP server for prompts (Go version) bundles a collection of prompt templates as MCP tools. Once started (via Docker in this configuration), it exposes the prompts loaded from the prompts/ directory as MCP tools you can invoke through any MCP-enabled editor or launcher. You can ask the system to generate structured outputs, create titles, summaries, or other content by selecting the corresponding MCP tool and providing any required arguments. The server hot-reloads prompts when you update the YAML/JSON templates, so edits take effect without restarting the process.

To use, ensure the server is running and then call a specific prompt by its tool name in your MCP-enabled workflow. Tools are designed to be parameterizable and compatible with popular editors like Raycast, Cursor, Windsurf, and Cherrystudio. For example, you might call a prompt tool to generate a product PRD, produce a catchy title, or generate a visual webpage outline, all without copying long prompt blocks manually.

How to install

Prerequisites:

  • Docker installed on your machine
  • Basic knowledge of running Docker containers
  • Access to the repository with the mcp-prompt-server-go project and its prompts directory

Installation steps:

  1. Clone the repository (or pull the Docker image if you have a prebuilt image):
git clone https://github.com/yourusername/mcp-prompt-server-go.git
cd mcp-prompt-server-go
  1. Build the Go-based project locally (optional if you prefer building a Docker image):
# If you want to build locally
go build ./...
  1. Build or pull a Docker image for the server. If you have a Dockerfile, build it:
# Example if a Dockerfile exists
docker build -t mcp-prompt-server-go:latest .
  1. Run the server via Docker. If using the provided mcp-prompt-server-go image, start it in interactive mode:
docker run -it --rm \
  -v "$(pwd)/prompts:/app/prompts":/app/prompts \
  -e PROMPTS_DIR=/app/prompts \
  mcp-prompt-server-go:latest
  1. Verify the server starts and loads prompts from the prompts/ directory. You should see logs indicating prompts were loaded and MCP tools registered.

Notes:

  • If you customize the prompts path, set the PROMPTS_DIR environment variable accordingly.
  • The repository’s build script (if present) can streamline the process; otherwise, you can rely on Docker as shown.

Additional notes

Tips and common issues:

  • Ensure the prompts/ directory contains valid YAML/JSON templates; syntax errors can prevent loading.
  • If prompts fail to load, check logs for YAML/JSON parsing errors and ensure each prompt has a unique name.
  • Use hot-reload (reload_prompts) to refresh templates without restarting the server.
  • When integrating with editors, you may need to configure the MCP tool name to match the prompt you want to invoke (e.g., prompt-gen-titles).
  • If using Docker, remember to mount the prompts directory into the container or bake them into the image to ensure availability at startup.
  • Environment variables can tweak logging level, prompts path, and transport settings for MCP tools.

Related MCP Servers

Sponsor this space

Reach thousands of developers