MCP Man Pages Server
Provides AI assistants with access to Linux man pages for searching, retrieving, and exploring system documentation.
README
MCP Man Pages Server
A Model Context Protocol (MCP) server that provides access to Linux man pages using FastMCP. This server allows AI assistants to search, retrieve, and explore system documentation directly from your local machine.
This server is packaged as an MCPB (MCP Bundle) for easy integration with GitHub Copilot in VS Code.
Features
- Search man pages: Find documentation by keyword or command name using
apropos - Retrieve specific pages: Get complete man page content by name and optional section
- List sections: Browse available man page sections (1-9) with descriptions
- Clean formatting: Man page content is cleaned and formatted for AI consumption
- Async operations: All operations are asynchronous with timeout protection
- MCP Resources: Expose man pages as resources with
man://URIs
Requirements
- Operating System: Linux with standard man page system
- Python: 3.10 or higher
- System Commands:
man,apropos(usually pre-installed on Linux) - Dependencies: MCP library (bundled in MCPB or installed via package managers)
Installation
Quick Start with MCPB Bundle
The easiest way to use this server is with the MCPB bundle, which is supported by Claude Desktop:
# Clone the repository
git clone https://github.com/guyru/man-mcp.git
cd man-mcp
# Build the MCPB bundle
make build
# This creates dist/man-mcp-{version}.mcpb
Installing in Claude Desktop
- Open Claude Desktop settings
- Navigate to the MCP section
- Add the generated
dist/man-mcp-{version}.mcpbbundle file
Development Installation
Using uv (recommended)
# Clone the repository
git clone https://github.com/guyru/man-mcp.git
cd man-mcp
# Install dependencies
uv sync
# Install with development tools
uv sync --extra dev
Using pip
# Clone the repository
git clone https://github.com/guyru/man-mcp.git
cd man-mcp
# Install the package and dependencies from pyproject.toml
pip install .
# Or install in development mode (editable install)
pip install -e .
# For development with optional dependencies
pip install -e .[dev]
Usage
Running the Server for Development
# Using uv
uv run python3 server/main.py
# Using python directly
python3 server/main.py
# With MCP development tools
uv run mcp dev server/main.py
Building and Using MCPB Bundle
# Build the bundle
make build
# Test the bundle
make test
# View bundle information
make info
VS Code Integration
This MCP server can be integrated with VS Code using the GitHub Copilot extension. Since GitHub Copilot does not yet support MCPB bundles, direct configuration is required for VS Code.
Configuration for GitHub Copilot
Create a .vscode/mcp.json file in your workspace with the following configuration:
{
"servers": {
"man-mcp-server": {
"type": "stdio",
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/man-mcp",
"server/main.py"
]
}
}
}
Alternative: Using python directly
If you prefer not to use uv, you can configure it with python directly:
{
"servers": {
"man-mcp-server": {
"type": "stdio",
"command": "python3",
"args": ["/path/to/man-mcp/server/main.py"],
"env": {
"PYTHONPATH": "/path/to/man-mcp/server/lib"
}
}
}
}
MCP Bundle Support
MCP bundles are supported by Claude Desktop and can be installed directly. For other MCP clients like GitHub Copilot, use the manual configuration above.
Note: Replace /path/to/man-mcp with the actual path to your project directory.
Once configured, you can interact with the man pages server through GitHub Copilot in VS Code by asking questions about Linux commands and system documentation.
Available Tools
1. search_man_pages
Search for man pages by keyword or topic:
search_man_pages("permission") # Find pages about permissions
search_man_pages("network") # Find networking-related pages
2. get_man_page
Retrieve the full content of a specific man page:
get_man_page("ls") # Get ls man page (any section)
get_man_page("chmod", "1") # Get chmod from section 1 specifically
get_man_page("printf", "3") # Get printf from section 3 (C library)
3. list_man_sections
List all available man page sections with descriptions:
list_man_sections() # Shows sections 1-9 with descriptions
Available Resources
The server exposes man pages as resources using man:// URIs:
man://sections- List of all available sectionsman://search/{keyword}- Search results for a keywordman://{section}/{page}- Specific man page content
Examples:
man://search/network- Search results for "network"man://1/ls- The ls command man page from section 1man://3/printf- The printf function man page from section 3
Troubleshooting
Development
Available Make Commands
# Build the MCPB bundle
make build
# Test the bundle and server functionality
make test
# Show bundle information
make info
# Clean build artifacts
make clean
# Show all available targets
make help
Using with MCP Inspector
# Run with MCP development tools for debugging
uv run mcp dev server/main.py
Error Handling
The server includes comprehensive error handling:
- Missing pages: Graceful handling with informative error messages
- Timeout protection: Subprocess calls are protected with configurable timeouts
- Fallback methods: If
aproposfails, falls back toman -k - Content validation: Ensures retrieved content is not empty
- Clean formatting: Removes ANSI codes and formatting for AI consumption
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。