by guyru
Provides access to Linux man pages via a Model Context Protocol (MCP) server, enabling AI assistants to search, retrieve, and explore system documentation directly from the local machine.
Man MCP Server exposes the standard Linux man page system as MCP resources. It lets callers query keywords, list man‑page sections, and fetch full page contents through man://
URIs, delivering clean, AI‑friendly text.
uv sync
(recommended) or pip install .
.uv run python3 man_server.py
or python3 man_server.py
..vscode/mcp.json
configuration pointing to the script (see README for examples).search_man_pages
, get_man_page
, list_man_sections
) or request MCP resources such as man://search/network
or man://1/ls
.apropos
with async timeout protection.man://
URIs for seamless integration with MCP‑compatible tools.Q: Which operating systems are supported?
A: Linux systems with the standard man
and apropos
commands installed.
Q: What Python version is required? A: Python 3.10 or newer.
Q: How does the server handle missing pages? A: It returns a clear error message indicating that the requested page or section could not be found.
Q: Can I customize the timeout for subprocess calls? A: Yes, the timeout value is configurable in the service code.
Q: Is there a way to run the server without uv
?
A: Absolutely; the server can be started with python3 man_server.py
after installing dependencies via pip
.
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.
apropos
man://
URIs# Clone the repository
git clone https://github.com/guyru/man-mcp-server.git
cd man-mcp-server
# Install dependencies
uv sync
# Install with development tools
uv sync --extra dev
# Clone the repository
git clone https://github.com/guyru/man-mcp-server.git
cd man-mcp-server
# 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]
# Using uv
uv run python3 man_server.py
# Using python directly
python3 man_server.py
# With MCP development tools
uv run mcp dev man_server.py
To integrate this MCP server with VS Code, you need to create a configuration file:
Create the VS Code MCP configuration directory (if it doesn't exist):
mkdir -p .vscode
Create .vscode/mcp.json
with the following content:
{
"servers": {
"man-mcp-server": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/path/to/man-mcp-server", "python3", "man_server.py"]
}
}
}
Update the path in the configuration above to match your actual project directory.
Alternative configuration if you're not using uv:
{
"servers": {
"man-mcp-server": {
"type": "stdio",
"command": "python3",
"args": ["/path/to/man-mcp-server/man_server.py"]
}
}
}
This configuration allows MCP-compatible VS Code extensions to communicate with your man pages server.
Search for man pages by keyword or topic:
search_man_pages("permission") # Find pages about permissions
search_man_pages("network") # Find networking-related pages
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)
List all available man page sections with descriptions:
list_man_sections() # Shows sections 1-9 with descriptions
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 contentExamples:
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 3man
, apropos
(usually pre-installed)mcp
library# Test search functionality
uv run python3 -c "
from man_server import man_service
import asyncio
print(asyncio.run(man_service.search_man_pages('ls')))
"
# Test page retrieval
uv run python3 -c "
from man_server import man_service
import asyncio
content = asyncio.run(man_service.get_man_page('ls', '1'))
print(content[:200] + '...')
"
# Run with MCP development tools for debugging
uv run mcp dev man_server.py
The server includes comprehensive error handling:
apropos
fails, falls back to man -k
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.