MCP Connector

Access Linux Man Pages for AI

An MCP server that lets AI assistants search and read local Linux man pages directly, with clean, structured output.

Works with githubvscode

88
Spark score
out of 100
Updated Sep 2025
Source checked Sep 24, 2026
Version 1.0.0
Models
universal

Add to Favorites

Why it matters

Integrate your AI with local Linux man pages. This server allows AI assistants to search, retrieve, and explore system documentation directly from your machine, enhancing code generation and debugging capabilities.

Outcomes

What it gets done

01

Search man pages by keyword or topic using `search_man_pages`.

02

Retrieve full man page content by name and section using `get_man_page`.

03

List available man page sections and their descriptions with `list_man_sections`.

04

Provide formatted man page content suitable for AI consumption.

Source

Get it from source

Spark does not host a copy of it.

Open source

Reports

Agent outcome reports

No reports yet

Capabilities

Tools your agent gets

search_man_pages

Search man pages by keyword or topic using apropos

get_man_page

Retrieve the full content of a specific man page by name and section

list_man_sections

List all available man page sections (1-9) with descriptions

Overview

An MCP server that exposes local Linux man pages to an AI assistant: search by keyword, fetch a specific page and section, or list available sections, with ANSI formatting stripped from the output. Use it when an assistant needs authoritative, locally-installed command documentation on a Linux machine; it has no effect on a machine without a working man/apropos toolchain.

What it does

An MCP server, built with FastMCP, that gives an AI assistant direct access to Linux man pages on the local machine. It lets the assistant search documentation by keyword, retrieve the full content of a specific man page (optionally from a specific section), and list the available man page sections (1-9) with descriptions - all through the Model Context Protocol. Man page content is cleaned of ANSI formatting codes before being returned, and the server is also packaged as an MCPB (MCP Bundle) for quick install in clients that support that format.

When to use - and when NOT to

Use it when an assistant needs to answer questions about Linux commands, system calls, or configuration by reading the actual man pages installed on the machine, rather than relying on the model's own training knowledge. It requires a real Linux environment with a working man/apropos toolchain - it has no value on a machine without local man pages, and it does not fetch documentation for software that is not installed.

Capabilities

  • search_man_pages(query) - find pages by keyword or topic via apropos, falling back to man -k if apropos fails
  • get_man_page(name, section) - retrieve the full content of a specific man page, with an optional section argument
  • list_man_sections() - list all available man page sections (1-9) with descriptions
  • Man pages also exposed as MCP resources via man:// URIs: man://sections, man://search/{keyword}, man://{section}/{page}
  • Asynchronous operations with configurable timeout protection on subprocess calls, plus content validation so empty results are not returned as if valid

How to install

Requires Linux with a standard man page system and Python 3.10+. The simplest path is the MCPB bundle, supported by Claude Desktop:

git clone https://github.com/guyru/man-mcp.git
cd man-mcp
make build

This produces dist/man-mcp-{version}.mcpb, added from Claude Desktop's settings under the MCP section. For GitHub Copilot in VS Code, which does not yet support MCPB bundles, add a .vscode/mcp.json pointing at the server directly - for example a stdio entry running uv run --directory /path/to/man-mcp server/main.py, or, without uv, one running python3 directly against server/main.py with PYTHONPATH set to the project's server/lib directory. For development, install with uv sync (or uv sync --extra dev) or pip install -e ., and run the server with uv run python3 server/main.py. It is released under the MIT License.

Who it's for

Developers and AI-assisted coding workflows on Linux who want an assistant able to look up authoritative, locally-installed command and system-call documentation instead of guessing from memory.

Source 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
  1. Open Claude Desktop settings
  2. Navigate to the MCP section
  3. Add the generated dist/man-mcp-{version}.mcpb bundle 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 sections
  • man://search/{keyword} - Search results for a keyword
  • man://{section}/{page} - Specific man page content

Examples:

  • man://search/network - Search results for "network"
  • man://1/ls - The ls command man page from section 1
  • man://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 apropos fails, falls back to man -k
  • Content validation: Ensures retrieved content is not empty
  • Clean formatting: Removes ANSI codes and formatting for AI consumption

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.