home / mcp / yardmcp mcp server
Exposes Ruby gem docs via YARD through a FastMCP server for programmatic querying and discovery.
Configuration
View docs{
"mcpServers": {
"romanbsd-yardmcp": {
"command": "yardmcp",
"args": []
}
}
}yardmcp is a programmable FastMCP server that exposes Ruby gem documentation via YARD, letting you list gems, explore classes and methods, fetch docs and source locations, and search documentation programmatically. It’s ideal for building documentation browsers, code assistants, or integrating Ruby/YARD data into your tools and workflows.
You run yardmcp as a long‑running server and connect to it with an MCP client to query Ruby gem documentation. You can list installed gems with YARD docs, inspect classes, modules, and methods, fetch documentation and source locations, perform fuzzy searches, and discover relationships like ancestors and mixins. Use the available tools to compose your queries and retrieve structured results that you can render in your UI or code editor.
Prerequisites: you need Ruby 3.2 or newer and Bundler installed on your system.
# Build the gem from its specification
gem build yardmcp.gemspec
# Install the built gem into your Ruby environment
gem install yardmcp-0.1.0.gemStart the MCP server to load the YARD index for installed gems. The server runs as a long‑lived process. You should observe startup messages indicating that the index has been built before sending any requests.
yardmcpThe server exposes a rich set of tools to explore and query documentation. You can list gems, enumerate classes and modules, fetch detailed documentation for objects, inspect inheritance and mixins, locate source files, and retrieve code snippets. You can also perform fuzzy or full‑text searches across all documentation.
During startup, the server builds an index of YARD documentation for installed gems. Progress and logs are printed to STDERR. Wait for the signal that the index is built before sending requests.
The server provides a suite of tools for documentation discovery and retrieval, including: ListGemsTool, ListClassesTool, GetDocTool, ChildrenTool, MethodsListTool, HierarchyTool, SearchTool, SourceLocationTool, CodeSnippetTool, AncestorsTool, and RelatedObjectsTool.
Lists all installed gems that have YARD documentation available.
Lists all classes and modules contained within a gem.
Fetches documentation for a specific class, module, or method, including parameters, return types, and tags.
Lists constants, classes, modules, and methods under a given namespace.
Lists all methods for a given class or module.
Provides inheritance and mixin hierarchies for objects.
Performs fuzzy or full‑text search across documentation.
Finds the file and line number where an object is defined.
Fetches the source code for a given object.
Returns the full ancestor chain for a class or module.
Finds related objects such as included modules and subclasses.