Labsco
Unlock-MCP logo

MCP Docs Server

from Unlock-MCP

Provides direct access to local documentation files through a context.md file in the project root.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

MCP Docs Server

A lightweight Model Context Protocol (MCP) server that provides direct access to local documentation files - a simple alternative to complex RAG pipelines for project-specific context.

Overview

This MCP server reads a single markdown file (context.md) and exposes its contents through two simple tools:

  • get_context_overview(): Lists all section titles
  • search_context(query): Searches content across all sections

Perfect for giving LLMs access to project documentation without the overhead of vector databases or embedding models.

Features

  • Zero dependencies beyond the MCP Python SDK
  • Lightning fast - direct file access, no vector search
  • Simple setup - works with both GUI and CLI MCP clients
  • Cross-platform - includes shell wrapper for macOS/Linux compatibility
  • Robust error handling - comprehensive logging and debugging support

Development

Testing

Use the MCP development tools for easy testing:

mcp dev ./run_context_server.sh

This launches a web-based inspector for testing your server.

Debugging

The server logs to stderr for debugging. Check your MCP client's logs if you encounter issues.

Common issues:

  • ENOENT errors: Use the shell wrapper or specify full Python path
  • Import errors: Ensure mcp[cli]>=1.2.0 is installed
  • File not found: Verify context.md exists in the project root

File Structure

mcp-docs-server/
β”œβ”€β”€ mcp_context_server.py      # Main server implementation
β”œβ”€β”€ run_context_server.sh      # Shell wrapper for GUI clients
β”œβ”€β”€ requirements.txt           # Python dependencies
β”œβ”€β”€ context.md                 # Your documentation (create this)
└── README.md                  # This file

Tutorial

For a complete walkthrough of building this server from scratch, including common pitfalls and solutions, see the full tutorial: Ditching RAG: Building a Local MCP Server for Your Docs