TP

tanker327/prompts-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

17 stars 8 forks 品質 72 トレンド 21MIT

MCP server for managing and providing prompts with TypeScript, caching, and comprehensive testing

概要

A Model Context Protocol (MCP) server for managing and providing prompts. This server allows users and LLMs to easily add, retrieve, and manage prompt templates stored as markdown files with YAML frontmatter support. - : Store new prompts as markdown files with YAML frontmatter - : Get specific prompts by name - : View all available prompts with metadata preview - : Remove prompts from the collection - : Prompts are stored as markdown files in the prompts/ directory - : In-memory cache with automatic file change monitoring - : Support for structured metadata (title, description, tags, etc.) - : Full TypeScript implementation with comprehensive type definitions - : Clean separation of concerns with dependency injection - : 95 tests with 84.53% code coverage This will make the prompts-mcp-server command available in your system. After installation, you need to configure your MCP client to use it. See MCP Client Configuration. 1. Download the latest release from GitHub 2.

README

以下は原文 README の抜粋です。原文を見る。

Prompts MCP Server

A Model Context Protocol (MCP) server for managing and providing prompts. This server allows users and LLMs to easily add, retrieve, and manage prompt templates stored as markdown files with YAML frontmatter support.

Quick Start

# 1. Install from NPM
npm install -g prompts-mcp-server

# 2. Add to your MCP client config (e.g., Claude Desktop)
# Add this to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
  "mcpServers": {
    "prompts-mcp-server": {
      "command": "prompts-mcp-server"
    }
  }
}

# 3. Restart your MCP client and start using the tools!

Features

  • Add Prompts: Store new prompts as markdown files with YAML frontmatter
  • Retrieve Prompts: Get specific prompts by name
  • List Prompts: View all available prompts with metadata preview
  • Delete Prompts: Remove prompts from the collection
  • File-based Storage: Prompts are stored as markdown files in the prompts/ directory
  • Real-time Caching: In-memory cache with automatic file change monitoring
  • YAML Frontmatter: Support for structured metadata (title, description, tags, etc.)
  • TypeScript: Full TypeScript implementation with comprehensive type definitions
  • Modular Architecture: Clean separation of concerns with dependency injection
  • Comprehensive Testing: 95 tests with 84.53% code coverage

Installation

Install the package globally from NPM:

npm install -g prompts-mcp-server

This will make the prompts-mcp-server command available in your system.

After installation, you need to configure your MCP client to use it. See MCP Client Configuration.

Option 2: From GitHub (for development)

# Clone the repository
git clone https://github.com/tanker327/prompts-mcp-server.git
cd prompts-mcp-server

# Install dependencies
npm install

# Build the TypeScript code
npm run build

# Test the installation
npm test

Option 3: Direct Download

  1. Download the latest release from GitHub
  2. Extract to your desired location
  3. Run installation steps from Option 2.

Verification

After installation, verify the server works:

# Start the server (should show no errors)
npm start

# Or test with MCP Inspector
npx @modelcontextprotocol/inspector prompts-mcp-server

Testing

Run the comprehensive test suite:

npm test

Run tests with coverage:

npm run test:coverage

Watch mode for development:

npm run test:watch

MCP Tools

The server provides the following tools:

add_prompt

Add a new prompt to the collection. If no YAML frontmatter is provided, default metadata will be automatically added.

GitHub で README 全文を見る

インストール

npx @modelcontextprotocol/inspector prompts-mcp-server
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

# 1. Install from NPM npm install -g prompts-mcp-server # 2. Add to your MCP client config (e.g., Claude Desktop) # Add this to ~/Library/Application Support/Claude/claude_desktop_config.json: { "mcpServers": { "prompts-mcp-server": { "command": "prompts-mcp-server" } } } # 3. Restart your MCP client and start using the tools!