Well, ACTUALLY, the --recursive flag...
An MCP server that gives your LLM agents access to Unix man pages, GNU info pages, and Gentoo eclass docs. Because you can lead an AI to documentation, but you can't make it RTFM.
mansplain wraps man, apropos, info, tldr, and Gentoo eclass docs
as MCP tools so your coding agents can look up documentation on their own.
No more hallucinating flags that don't exist. Probably.
| Tool | What it does |
|---|---|
man_lookup |
Fetch a man page by name and section |
man_search |
Search for man pages via apropos |
info_lookup |
Fetch a GNU info page by topic/node |
tldr_lookup |
Get the tldr summary for a command |
eclass_lookup |
Fetch Gentoo eclass documentation (doc comments) |
mansplain also exposes man page sections as MCP resource templates, so agents can browse documentation by section:
man://{page}/{section_name} e.g. man://ssh/DESCRIPTION
Some man pages are... comprehensive (looking at you, emerge(1) at 1500+
lines). For big pages, mansplain returns the NAME and SYNOPSIS along with a
table of contents, then lets the agent request specific sections:
> man_lookup(page: "emerge")
NAME
emerge - Command-line interface to the Portage system
SYNOPSIS
emerge [options] [action] [ebuild | tbz2 | file | ...set | atom]
This man page is large. Available sections:
- NAME (3 lines)
- SYNOPSIS (11 lines)
- DESCRIPTION (8 lines)
- OPTIONS (854 lines) <-- the big one
- SEE ALSO (8 lines)
...
Call man_lookup again with the `sections` parameter to read specific sections.
> man_lookup(page: "emerge", sections: ["OPTIONS"])
OPTIONS
--ask (-a)
...
No more flooding your agent's context window with 1500 lines when it just
needed to know what --deep does. That's what we call a deep cut.
go install bennypowers.dev/mansplain@latest
opencode mcp add mansplain -- mansplain
claude mcp add mansplain -- mansplainAvailable in the bennypowers overlay:
emerge app-misc/mansplain- ANSI stripping -- strips bold/underline overstrike and escape codes so your agent gets clean text, not a formatting crime scene
- Section-aware delivery -- large man pages get a table of contents instead of a context-window-sized wall of text
mandbdetection -- ifaproposfails because the index isn't built, mansplain gently reminds the user to runsudo mandb- Section numbers -- pass
section: "3"when you wantprintf(3)the C function, notprintf(1)the shell builtin. We've all been burned
manandapropos-- you almost certainly have these. If not, you have bigger problems than documentation accessinfo-- optional, forinfo_lookup. For the pagesmanforgottldr-- optional, fortldr_lookup. Short attention span sold separately- Gentoo portage tree -- optional, for
eclass_lookup. Reads from/var/db/repos/gentoo/eclass/
go test ./... -count=1
golangci-lint run ./...Q: Why is it called mansplain? A: Because it explains man pages. That's it. That's the joke.
Q: Does it support info pages?
A: Yes! We worked up the courage. Use info_lookup.
Q: Can it explain sendmail.cf?
A: Some things are beyond the help of any tool, mortal or artificial.
GPLv3