Sponsored by Deepsite.site

local-manpage-mcp-server

Created By
domesticode6 months ago
A MCP server which loads the man pages of tools in $PATH as resource. The goal is to provide the LLM with context of the commands on the host machine
Content

local-manpage-mcp-server

Summary

local-manpage-mcp-server is an MCP server that extracts and exposes the man pages of all executables in your $PATH as MCP resources. Its primary goal is to give an LLM (or any MCP client) direct access to up-to-date documentation for the commands installed on the host system. This server is intended to run on Linux distributions only (see Disclaimer below).

The create_all_manpage_files tool generates the manpages/ directory where the extracted man pages are stored. These files are then served when an MCP resource is requested. A wrapper tool is also provided in case your host application does not support MCP resources directly.

Disclaimer

Linux Only: This server is designed exclusively for Linux distributions. It relies on the man and col utilities (and a standard $PATH structure) to extract man pages. It has not been tested on macOS, BSD, or Windows, and may not function correctly on those systems.

Permissions: You must have read access to all directories in your $PATH and write permissions for a local manpages/ folder (created automatically).

Resource Limits: Generating man pages for a large number of binaries can be CPU- and disk-intensive.

Argument Safety: The arguments passed to man and col are not sanitized or validated. This could potentially allow command injection if malicious input is provided.

Setup

git clone https://github.com/yourusername/local-manpage-mcp-server.git
cd local-manpage-mcp-server

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Starting the MCP Server and Inspector

uv run mcp dev server.py

Usage

One goal of this project is to provide a self-explanatory server that exposes usage information as a prompt for your host application. This way, your LLM can describe the workflow automatically.

In addition, you must run the create_all_manpage_files tool to generate the MCP resources based on the commands available on your system. After execution, all relevant man pages should be accessible as MCP resources.

With the Inspector

Discover prompts for yourself

Available Prompts

  1. Go to Prompts
  2. Click List Prompts
  3. e.g. Select guide and click Get Prompt

Create the manpage resources

Create all manpages

  1. Go to Tools
  2. Click List Tools
  3. Select create_all_manpage_files and click Run Tool

example response: Create all manpages response

Now you can

  1. Go to Resources
  2. Click List Resources
  3. Select a man page e.g. Man page for 7z
  4. Check the response on the right side

example response: 7z manual as resource

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
CursorThe AI Code Editor
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Serper MCP ServerA Serper MCP Server
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
ChatWiseThe second fastest AI chatbot™
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Tavily Mcp
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
DeepChatYour AI Partner on Desktop
WindsurfThe new purpose-built IDE to harness magic
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Playwright McpPlaywright MCP server