MCPInstructionServer logo

MCPInstructionServer

by MartinSchlott

MCPInstructionServer is a TypeScript server that allows AI assistants to discover and access structured markdown instructions via the Model Context Protocol. It provides a standardized interface for AI to retrieve specific instructions on-demand.

View on GitHub

Last updated: N/A

What is MCPInstructionServer?

MCPInstructionServer is a TypeScript-based server that serves markdown files as structured instructions to AI assistants using the Model Context Protocol (MCP). It allows AI models like Claude to access a library of markdown-based instructions through a standardized interface.

How to use MCPInstructionServer?

  1. Clone the repository and install dependencies. 2. Create markdown files containing instructions, following the specified format (H1 title, brief description as the first paragraph). 3. Organize these files in a directory structure. 4. Start the server, providing the path to the instructions directory. 5. AI assistants can then use the listInstructions and readInstruction MCP tools to access the instructions.

Key features of MCPInstructionServer

  • Simple filesystem-based storage (markdown files)

  • Recursive directory scanning

  • Path security to prevent directory traversal

  • Automatic summary extraction (H1 title and first paragraph)

  • Model Context Protocol support

Use cases of MCPInstructionServer

  • Centralized knowledge base for AI prompting

  • Versioned, structured guidance documents for AI

  • AI assistants searching and retrieving specific instructions

  • Consistent patterns for AI-assisted tasks

FAQ from MCPInstructionServer

What is the Model Context Protocol (MCP)?

MCP is a standardized interface that allows AI assistants to discover and access external resources, such as instruction servers.

What is the required Node.js version?

Node.js 18 or higher is required for ESM support.

How do I format my instruction markdown files?

Each file should have an H1 title, followed by a brief description in the first paragraph. Additional details and examples can be included in subsequent sections.

How does the server prevent security vulnerabilities?

The server validates all paths to prevent directory traversal attacks and only allows access to files within the specified instructions directory. No writing capabilities are provided.

Can I contribute to the project?

Yes, contributions are welcome! Please feel free to submit a Pull Request.