MC

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.

Quick Install
npx -y @rust-mcp-stack/mcp-discovery

Overview

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, txt for quick, formatted output.
  • Custom templates: use Handlebars templates from file or inline string.
  • File creation and in-place updates: create to make new files, update to 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):

git clone https://github.com/rust-mcp-stack/mcp-discovery.git
cd mcp-discovery
cargo install --path .

Basic usage (default prints to terminal):

mcp-discovery -- npx -y @modelcontextprotocol/server-everything

Create a file (auto-selects template based on extension if not specified):

mcp-discovery create -f capabilities.md -- npx -y @modelcontextprotocol/server-everything

Update a file (replace content between markers):

mcp-discovery update -f README.md -- npx -y @modelcontextprotocol/server-everything

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

TemplateTypical extensionDescription
md.mdMarkdown with formatted tables for capabilities
md-plain.mdMinimal Markdown (plain text lists)
html.htmlSimple styled HTML output
txt.txtRaw 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:
    mcp-discovery create -f capabilities.md --template-file=custom.hbs -- npx -y @modelcontextprotocol/server-everything
    
  • Inline string:
    mcp-discovery create -f capabilities.md --template-string '{{server.name}} - {{#each capabilities}}{{this.name}}, {{/each}}' -- npx -y ...
    

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):

<!-- mcp-discovery-render:start -->
... autogenerated content ...
<!-- mcp-discovery-render:end -->

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:
    mcp-discovery update -f README.md -- npx -y @modelcontextprotocol/server-everything
    
  • Generate HTML capability docs for internal dashboards:
    mcp-discovery create -f docs/capabilities.html --template html -- npx -y @modelcontextprotocol/server-everything
    
  • 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:

mcp-discovery --help

or consult the project repository for examples and detailed documentation: https://github.com/rust-mcp-stack/mcp-discovery