An MCP server backed by a MrDocs corpus can answer questions about a library's API without the model having to read or scan the library. Add it as a worked example.
Why it is worth an example
An assistant asked about a C++ library today either guesses from training data or reads headers, which is slow and often wrong about overloads, template parameters, and which members a class inherits.
MrDocs already produces exactly the structured answer: a corpus with signatures, doc comments, parameters, return types, base classes, and cross-references, resolved by Clang rather than by pattern matching. Serving that over MCP puts a correct API reference in front of any MCP client, at the cost of one extraction run.
It also exercises a part of MrDocs the current examples do not: consuming the corpus as data rather than rendering pages.
Proposed solution
A generator or extension that emits whatever the server needs, most likely a JSON index. examples/generators/script-driven/search-index/ and examples/generators/script-driven/json/ are the closest existing examples and are the right starting point.
A small MCP server that loads that output and exposes a few tools. Something like: look up a symbol by qualified name, search symbols by name, get a symbol's full signature and documentation, and list a class's members including inherited ones.
A README showing the full path: run MrDocs over a library, start the server, point an MCP client at it, ask a question, get an answer with the real signature.
Keep the server small. The point is showing that the corpus is directly usable, not shipping a product.
The script-driven generator examples under examples/generators/script-driven/ show the layout to follow, including how each is registered as a test in examples/generators/CMakeLists.txt and driven by a run.sh.
The language for the server is open. Node keeps it close to the existing tooling and the MCP SDK, and Python is fine too. Pick a small library for the example so the extraction is fast enough to run in a test.
Reference: https://github.com/upstash/context7
An MCP server backed by a MrDocs corpus can answer questions about a library's API without the model having to read or scan the library. Add it as a worked example.
Why it is worth an example
An assistant asked about a C++ library today either guesses from training data or reads headers, which is slow and often wrong about overloads, template parameters, and which members a class inherits.
MrDocs already produces exactly the structured answer: a corpus with signatures, doc comments, parameters, return types, base classes, and cross-references, resolved by Clang rather than by pattern matching. Serving that over MCP puts a correct API reference in front of any MCP client, at the cost of one extraction run.
It also exercises a part of MrDocs the current examples do not: consuming the corpus as data rather than rendering pages.
Proposed solution
A generator or extension that emits whatever the server needs, most likely a JSON index.
examples/generators/script-driven/search-index/andexamples/generators/script-driven/json/are the closest existing examples and are the right starting point.A small MCP server that loads that output and exposes a few tools. Something like: look up a symbol by qualified name, search symbols by name, get a symbol's full signature and documentation, and list a class's members including inherited ones.
A README showing the full path: run MrDocs over a library, start the server, point an MCP client at it, ask a question, get an answer with the real signature.
Keep the server small. The point is showing that the corpus is directly usable, not shipping a product.
The script-driven generator examples under
examples/generators/script-driven/show the layout to follow, including how each is registered as a test inexamples/generators/CMakeLists.txtand driven by arun.sh.The language for the server is open. Node keeps it close to the existing tooling and the MCP SDK, and Python is fine too. Pick a small library for the example so the extraction is fast enough to run in a test.
Reference: https://github.com/upstash/context7