MCP Discovery: a CLI for discovering and documenting MCP server capabilities

January 26, 2026

MCP Discovery is a Rust command-line tool that automatically discovers and documents the capabilities of a Model Context Protocol (MCP) server. It can print server tools, resources, and features in a terminal or save them to files in several formats.

One way to think about it: MCP Discovery is to an MCP server what Swagger is to a REST API.

ComparisonREST API ecosystemMCP server ecosystem
Protocol/specificationOpenAPI SpecificationModel Context Protocol
Documentation generatorSwagger / OpenAPI GeneratorMCP Discovery
Generated contentAPI endpoints, parameters, response formatsTools, resources, capabilities
Output formatsHTML (Swagger UI), JSONMarkdown, HTML, TXT, custom templates

What is MCP (Model Context Protocol)?

MCP is a standardized protocol for interaction between AI models and external tools and resources. An MCP server can expose various capabilities:

  • Tools are functions or operations a model can call.
  • Resources are data sources a model can read.
  • Capabilities describe the features a server supports.

What can MCP Discovery do?

FeatureDescription
Terminal outputPrint detailed server information directly on the command line
File creationGenerate capability documentation in Markdown, HTML, or plain text
File updatesAutomatically update the MCP server capabilities section of an existing document
Custom templatesCustomize the output format using the Handlebars template engine
CI/CD integrationAutomate documentation maintenance using a GitHub Action

Installation

# 具体安装方式请参考官方文档
# https://github.com/rust-mcp-stack/mcp-discovery

Basic commands

Subcommands

CommandDescription
printDisplay MCP server capabilities in the terminal (default)
createCreate a new file containing capability information
updateRefresh the capabilities section of an existing file

Common options

OptionDescription
-f, --filename <FILE>Specify the output file for create/update
-t, --template <TEMPLATE>Select a built-in template: md, md-plain, html, txt
-p, --template-file <FILE>Use a custom Handlebars template file
-s, --template-string <STRING>Supply a Handlebars template string directly

Usage examples

1. Display MCP server capabilities in the terminal

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

2. Generate HTML documentation

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

3. Generate Markdown documentation

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

4. Use a custom template

mcp-discovery create -f capabilities.md --template-file=custom_template.hbs -- npx -y @modelcontextprotocol/server-everything

Built-in templates

TemplateDescription
mdTabular Markdown, suitable for a README
md-plainSimple plain-text Markdown
htmlHTML with basic styling
txtUnformatted plain text

💡 Tip: If you leave out the template, MCP Discovery chooses a built-in template based on the file extension.


How document markers work

The update command uses marker comments to locate the region to update. After it runs, the content between those markers is replaced with the latest server capability information.

Example Markdown file

# Server Info and Capabilities

<!-- mcp-discovery-render -->

(这里的内容会被自动替换)

<!-- mcp-discovery-render-end -->

Specify a template

<!-- mcp-discovery-render template=md-plain -->

<!-- mcp-discovery-render-end -->

Specify a custom template file

<!-- mcp-discovery-render template-file=my-custom-template.hbs -->

<!-- mcp-discovery-render-end -->

Example HTML file

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>My MCP Server</title>
  </head>
  <body>
    <h1>MCP Server Details</h1>
    <div>
      <!-- mcp-discovery-render -->
      <!-- mcp-discovery-render-end -->
    </div>
  </body>
</html>

Inline templates

In an HTML file, you can define an inline template inside the markers:

<h1>MCP Server Details</h1>
<div>
  <!-- mcp-discovery-render -->
  <!-- mcp-discovery-template
    <b>Name: </b>{{name}}
    <br/>
    <b>Version: </b>{{version}}
    <br/>
    <b>Number of tools:</b> {{len tools}}
    <h2>Summary:</h2>
    {{> html-summary }}
    mcp-discovery-template-end -->
  <!-- mcp-discovery-render-end -->
</div>

GitHub Action integration

MCP Discovery provides an official GitHub Action that can update the documentation automatically in a CI/CD workflow:

# .github/workflows/update-mcp-docs.yml
name: Update MCP Documentation

on:
  push:
    branches: [main]
  workflow_dispatch:

jobs:
  update-docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Update MCP capabilities
        uses: rust-mcp-stack/mcp-discovery-action@v1
        with:
          file: README.md
          command: "npx -y @modelcontextprotocol/server-everything"

      - name: Commit changes
        run: |
          git config user.name "github-actions[bot]"
          git config user.email "github-actions[bot]@users.noreply.github.com"
          git add README.md
          git diff --staged --quiet || git commit -m "docs: update MCP capabilities"
          git push

📓 Note: For specific configuration options, see the official mcp-discovery-action documentation.


Use cases

1. Maintain MCP server project documentation

Automatically generate and maintain the capability descriptions in the README for an MCP server you develop:

# 每次发布新版本时运行
mcp-discovery update -f README.md -- node ./dist/server.js

2. Integrate with a developer portal or wiki

Generate HTML documentation and integrate it with an internal documentation system:

mcp-discovery create -f docs/capabilities.html -- npx @your-org/mcp-server

3. Debug agent development

Quickly inspect the tools and resources a server offers:

# 终端快速预览
mcp-discovery -- npx -y @modelcontextprotocol/server-filesystem

# 保存为文件便于分析
mcp-discovery create -f debug-capabilities.json -t txt -- npx -y @modelcontextprotocol/server-filesystem

4. Standardize documentation for multiple MCP servers

Generate documentation in a consistent format for the MCP servers your team uses so agent developers can consult it.


Technology stack

  • Language: Rust
  • MCP interaction: Based on rust-mcp-sdk
  • Template engine: Handlebars
  • Open-source license: MIT License

References

  1. MCP Discovery GitHub Repository. (n.d.). rust-mcp-stack. Retrieved January 26, 2026, from https://github.com/rust-mcp-stack/mcp-discovery
  2. MCP Discovery GitHub Action. (n.d.). rust-mcp-stack. Retrieved January 26, 2026, from https://github.com/rust-mcp-stack/mcp-discovery-action
  3. Model Context Protocol. (n.d.). Anthropic. Retrieved January 26, 2026, from https://modelcontextprotocol.io/

© 2026 borui. All rights reserved. This content may be freely reproduced, displayed, modified, or distributed with proper attribution to borui and a link to the article: borui (2026-01-26). MCP Discovery: a CLI for discovering and documenting MCP server capabilities. https://caiborui.com/blog/2026-01-26-zh-mcp-discovery-server-capability-documentation-tool-entrans

@misc{borui2026-edfddb28,
  author = {borui},
  title = {{MCP Discovery: a CLI for discovering and documenting MCP server capabilities}},
  year = {2026},
  publisher = {borui's blog},
  url = {https://caiborui.com/blog/2026-01-26-zh-mcp-discovery-server-capability-documentation-tool-entrans}
}