mcp-local-prompt-server

mcp-local-prompt-server

An MCP server that dynamically registers prompt templates from local files and serves them to clients with the assistant role.

Category
Visit Server

README

mcp-local-prompt-server

An MCP server that dynamically registers prompt templates from local files and serves them to clients with the assistant role (not user).

Features

  • File-based prompts — Drop .txt, .md, .yaml, .yml, or .json files into prompts/ and they are registered automatically on startup
  • Clean naming — Filenames like grammer_correction_agent.md become prompt names like "grammer correction agent"
  • Assistant role delivery — Prompts are served with role: "assistant", so clients treat the content as system-level guidance, not user input
  • Stdio transport — Connects via standard input/output, compatible with any MCP host

Example

MCP Inspector showing the registered prompts available from the server

The screenshot shows the MCP Inspector listing all 4 prompts after the server starts.

Prerequisites

  • Node.js 18+
  • npm

Installation

git clone git@github.com:engrtipusultan/mcp-local-prompt-server.git
cd mcp-local-prompt-server
npm install

Included prompts

File Prompt name Description
grammer_correction_agent.md grammer correction agent Fixes English grammar errors with minimal changes, preserving the user's original style
parapharasing_agent.md parapharasing agent Paraphrases text with configurable tone (professional, casual, etc.) and length adjustments
prompt_enhancement_agent.md prompt enhancement agent Refines user inputs into structured, actionable prompts
summerization_agent.md summerization agent Summarizes and structurally maps long texts with metadata, TL;DR, and hierarchical outlines

Adding more prompts

Create a file in the prompts/ directory:

prompts/
├── code_review_agent.md
├── sql_optimizer.txt
└── writing_feedback.yaml

Supported extensions: .txt, .md, .yaml, .yml, .json. Hyphens and underscores in filenames are converted to spaces for the prompt name. No code changes needed — prompts are registered automatically on the next server start.

Usage

Run

npm run dev

or

npm start

Both run the server directly via tsx — no build step needed.

Testing with MCP Inspector

npx @modelcontextprotocol/inspector npm run dev

This opens a web UI where you can browse registered prompts and invoke them interactively.

How it works

On startup, the server scans the prompts/ directory for supported files. Each file is registered as an MCP prompt using mcpServer.registerPrompt(). When a client requests a prompt, the server reads the file content and returns it as an assistant-role message.

┌─────────────────────────────────────┐
│         MCP Host (client)           │
│            stdio transport          │
└────────────┬────────────────────────┘
             │ JSON-RPC
             ▼
┌─────────────────────────────────────┐
│  mcp-local-prompt-server            │
│                                     │
│  ┌────────────────────────────────┐ │
│  │  prompts/                      │ │
│  │  ├── grammer_correction.md     │ │
│  │  ├── summarization_agent.md    │ │
│  │  └── ...                       │ │
│  └────────────────────────────────┘ │
└─────────────────────────────────────┘

Scripts reference

Script Command Description
npm run dev tsx server.ts Run the server
npm start tsx server.ts Run the server (alias)

License

Apache 2.0

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured