MCP Discovery: Rust CLI for MCP Server Capabilities
Discover and document MCP server capabilities with a fast Rust CLI for automated scanning, reporting, and exportable documentation.
npx -y @rust-mcp-stack/mcp-discoveryOverview
MCP Discovery is a compact Rust command-line tool that probes an MCP (Model Context Protocol) Server, extracts its declared capabilities, and produces human- or machine-readable documentation. It is designed to make it easy for developers and maintainers to scan an MCP Server, view available resources and tools in the terminal, and export that information to files (Markdown, HTML, plain text, JSON) or a custom Handlebars template for integration into docs or CI pipelines.
Typical uses include generating an up-to-date capabilities section for a repository README, producing HTML summaries for internal dashboards, or automating capability snapshots in a CI workflow. Because it is a single small binary with multiple output formats and templating options, it fits well into automation pipelines (for example as a GitHub Action) and local developer workflows.
Features
- Discover MCP Server metadata: server info, tools, resources, and capability details.
- Terminal-first UX: default print output for quick inspection.
- Multiple export formats: Markdown (.md), HTML (.html), plain text (.txt), and JSON.
- Built-in templates:
md,md-plain,html,txtfor quick, formatted output. - Custom templates: use Handlebars templates from file or inline string.
- File creation and in-place updates:
createto make new files,updateto replace marked regions in existing files. - CI-friendly: can be used as a GitHub Action to keep documentation current automatically.
- Fast Rust implementation that leverages the rust-mcp-sdk for MCP Server interaction.
Installation / Configuration
Install and run the prebuilt binary (see repository releases) or build from source with cargo.
Install (example, using cargo):
Basic usage (default prints to terminal):
Create a file (auto-selects template based on extension if not specified):
Update a file (replace content between markers):
Common options:
-f, --filename <FILENAME> File to create or update (used with create/update)
-t, --template <TEMPLATE> Built-in template: md | md-plain | html | txt
--template-file <TEMPLATE_FILE> Path to custom Handlebars template
--template-string <TEMPLATE_STR> Inline Handlebars template string
-h, --help Show help
-V, --version Show version
If you omit a subcommand, print is the default.
Repository: https://github.com/rust-mcp-stack/mcp-discovery
Built-in templates
| Template | Typical extension | Description |
|---|---|---|
| md | .md | Markdown with formatted tables for capabilities |
| md-plain | .md | Minimal Markdown (plain text lists) |
| html | .html | Simple styled HTML output |
| txt | .txt | Raw plain-text output |
If you don’t specify a template, the CLI will infer the most suitable built-in template from the output file extension.
Custom Templates and Templating Notes
You can supply a Handlebars template to control the exact output:
- From file:
- Inline string:
Inline templates placed directly inside files (inline template blocks) are supported for the update command only; they let you keep the custom template adjacent to the target file and reused on updates.
Update Markers and In-place Editing
When you use update, the CLI replaces the content between a pair of designated render markers. Markers are comment lines appropriate for the file type. The default marker keyword is:
- mcp-discovery-render
Examples:
Markdown (HTML-style comment):
HTML:
<!-- mcp-discovery-render:start -->
... autogenerated content ...
<!-- mcp-discovery-render:end -->
Plain text (visible markers):
# mcp-discovery-render:start
... autogenerated content ...
# mcp-discovery-render:end
Run the update command whenever you want to refresh the designated region with the latest MCP Server capabilities.
Available Resources
MCP Discovery outputs:
- Server metadata (name, version, description)
- Tool lists and their declared interfaces
- Resource schemas and endpoints
- Capability details for each tool/resource
It uses the rust-mcp-sdk to query MCP Servers and convert server-provided capability descriptions into the templates above.
Use Cases
- Keep README capability tables up-to-date automatically in a repository:
- Generate HTML capability docs for internal dashboards:
- Integrate into CI (GitHub Action) to refresh capability docs on each release:
- Use the companion action repository rust-mcp-stack/mcp-discovery-action to run this CLI in your workflow and commit updates.
Getting Help
Run:
or consult the project repository for examples and detailed documentation: https://github.com/rust-mcp-stack/mcp-discovery