by guyru
Provides fast searching and retrieval of local Linux man pages via MCP, exposing them as clean, AI‑friendly resources.
Man Mcp Server enables AI assistants and other tools to query the host's man‑page database. It wraps standard Linux utilities (apropos
, man
) in asynchronous MCP resources, returning plain‑text content suitable for downstream processing.
uv
:
git clone https://github.com/guyru/man-mcp-server.git
cd man-mcp-server
uv sync
or pip
:
pip install .
uv run python3 man_server.py
# or simply
python3 man_server.py
search_man_pages
, get_man_page
, list_man_sections
) from your code or use the MCP URI scheme (man://search/keyword
, man://1/ls
)..vscode/mcp.json
configuration pointing to the script (example shown in the README).apropos
with fallback to man -k
man://
URIsman
Q: Which operating systems are supported?
A: Any Linux distribution that provides the standard man
and apropos
commands.
Q: Do I need root privileges? A: No, the server only reads existing man‑page files; normal user permissions are sufficient.
Q: Can I specify a custom timeout? A: Yes, the service reads a timeout value from its configuration (default is 5 seconds).
Q: How are resources accessed?
A: Via MCP URIs such as man://search/network
, man://3/printf
, or man://sections
.
Q: Is the project open source? A: Yes, it is licensed under the MIT License.
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.
Discover more MCP servers with similar functionality and use cases
by MicrosoftDocs
Enables AI agents and developer tools to retrieve Microsoft official documentation in real time via a lightweight streamable HTTP endpoint, supporting semantic search and markdown fetch capabilities.
by da1z
DocsMCP is a Model Context Protocol (MCP) server that provides Large Language Models (LLMs) with access to documentation. It acts as an intermediary, allowing LLMs to query and retrieve information from various documentation sources.
by netdata
Real-time, per‑second infrastructure monitoring platform that provides instant insights, auto‑discovery, edge‑based machine‑learning anomaly detection, and lightweight visualizations without requiring complex configuration.
by zed-industries
Provides real-time collaborative editing powered by Rust, enabling developers to edit code instantly across machines with a responsive, GPU-accelerated UI.
by github
Enables AI agents, assistants, and chatbots to interact with GitHub via natural‑language commands, providing read‑write access to repositories, issues, pull requests, workflows, security data and team activity.
by daytonaio
Provides a secure, elastic sandbox environment for executing AI‑generated code with isolated runtimes and sub‑90 ms provisioning.
by RooCodeInc
An autonomous coding agent that lives inside VS Code, capable of generating, refactoring, debugging code, managing files, running terminal commands, controlling a browser, and adapting its behavior through custom modes and instructions.
by chaitin
Provides a self‑hosted web application firewall and reverse‑proxy that filters, monitors, and blocks malicious HTTP/S traffic, protecting web applications from attacks such as SQL injection, XSS, brute‑force, bot abuse, and various code injections.
by PipedreamHQ
Connect APIs quickly, run event‑driven automations, and execute custom code in Node.js, Python, Go, or Bash on a hosted platform.