# Mcp Discovery

> A command-line tool written in Rust for discovering and documenting MCP Server capabilities.

- **Type:** MCP server
- **Install:** `agentstack add mcp-rust-mcp-stack-mcp-discovery`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [rust-mcp-stack](https://agentstack.voostack.com/s/rust-mcp-stack)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [rust-mcp-stack](https://github.com/rust-mcp-stack)
- **Source:** https://github.com/rust-mcp-stack/mcp-discovery
- **Website:** https://rust-mcp-stack.github.io/mcp-discovery/

## Install

```sh
agentstack add mcp-rust-mcp-stack-mcp-discovery
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# MCP Discovery

A command-line tool written in Rust for discovering and documenting MCP Server capabilities.

It supports outputting the results in the terminal or saving them to files in [Markdown](https://github.com/rust-mcp-stack/mcp-discovery/blob/main/docs/examples/update-md.md#server-info-and-capabilities), [HTML](https://rust-mcp-stack.github.io/mcp-discovery/examples/server-info.html), [plain text](https://rust-mcp-stack.github.io/mcp-discovery/examples/capabilities.txt), JSON, or a custom template defined by you.

Check the [project documentation](https://rust-mcp-stack.github.io/mcp-discovery) for instructions and [command examples](https://rust-mcp-stack.github.io/mcp-discovery/#/guide/command-examples).

## Features 💡

- **Display MCP Details**: Output MCP Server information, including tools, resources, and capabilities, directly to the terminal.
- **Generate Files**: Create files in Markdown (`.md`), HTML (`.html`), or plain text (`.txt`) formats with MCP Server details and capabilities.
- **Update Files**: Modify existing Markdown, HTML, or text files by adding MCP Server capabilities within specified markers, enabling MCP Server developers to automatically maintain up-to-date documentation and repository README files.
- **Flexible Output Customization**: Choose from built-in templates (`md`, `md-plain`, `html`, `txt`) or supply custom Handlebars templates for personalized output.
- **MCP Discovery GitHub Action**: Integrate the mcp-discovery CLI as a GitHub Action to automate and maintain up-to-date MCP Server documentation in your development workflow.

 This open-source project leverages the [rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk) for seamless interaction with MCP Servers.

🌐 Check out the **rust-mcp-filesystem** [capabilities](https://rust-mcp-stack.github.io/rust-mcp-filesystem/#/capabilities) page for a sample output.

## Installation ⬇️

### Running as CLI

Check the [project documentation](https://rust-mcp-stack.github.io/mcp-discovery) for instructions on installing the tool on different platforms.

### GitHub Action

The easiest way to automate and maintain up-to-date MCP Server documentation , is to use mcp-discovery as a GitHub action.
Please see [rust-mcp-stack/mcp-discovery-action](https://github.com/rust-mcp-stack/mcp-discovery-action) for installation and configuration instructions.

## Subcommands

- **`print`**: Displays MCP Server capabilities in the terminal.
- **`create`**: Creates a new file with MCP Server capability details.
- **`update`**: Updates an existing file by inserting MCP Server capabilities between specified
  markers.

👉 Note: If no subcommand is provided, the `print` subcommand will be used by default.

### Options ⚙️

- `-f, --filename `: Used with `create` and `update` commands to specify the output file to generate or modify.
- `-t, --template `: Choose a built-in output template. Options: `md`, `md-plain`, `html`, `txt`.
- `-p, --template-file `: Path to a custom Handlebars template file.
- `-s, --template-string `: Inline Handlebars template provided as a string.
- `-h, --help`: Display help information.
- `-V, --version`: Display the version of `mcp-discovery`.

👉 Note: If no template is provided, `mcp-discovery` will automatically select the most suitable built-in template based on the file extension.

## Built-in Templates 🧬

The CLI supports the following built-in output templates:

- **`md`**: Formatted Markdown that presents MCP Server capabilities in a table format.
- **`md-plain`**: Minimalist Markdown for straightforward output, using plain text instead of tables.
- **`html`**: Structured HTML with basic styling.
- **`txt`**: Plain text for raw, unformatted output.

## Custom Templates 🧩

You can provide custom Handlebars templates in different ways:

1.  Use the `--template-file` flag to provide a custom template file.
2.  Use the `--template-string` flag to provide a raw Handlebars template directly as a string.
3.  To use an inline template, define it in a file for the `update` command only — this will not function with print or create.

> Inline templates must be enclosed within designated marker annotations.

### Examples

##### Print MCP Server capabilities to the terminal:

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

#### Create a HTML file with MCP Server capabilities:

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

📄  Click here to view generated html file

#### Create a MD file with MCP Server capabilities:

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

#### Use a custom Handlebars template:

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

💡 See the [Command Examples](https://rust-mcp-stack.github.io/mcp-discovery/#/guide/command-examples) section in the project documentation for additional CLI usage examples.

## Defining Update Regions with Markers

When using the `update` subcommand, `mcp-discovery` places capabilities between designated markers in the target file, which vary by file format and are typically comment lines.
The update command simplifies the process for developers and maintainers to keep documentation current effortlessly.
Run the mcp-discovery update command anytime to refresh the file with the latest MCP Server capabilities.

### Marker Annotations

- **Render Block Start** : **`mcp-discovery-render`**
- **Render Block End** : **`mcp-discovery-render-end`**

**👉** The mcp-discovery-render marker supports template and template-file properties as well. Check the examples below for details.

You can optionally include an inline template identifier within the render block, enclosed by:

- **Template Block Start**: **`mcp-discovery-template`**
- **Template Block End**: **`mcp-discovery-template-end`**

If a template annotation is detected within a render block, `mcp-discovery` will use it to render the output. This allows for customized templates without depending on built-in or external template files. Check the examples below for details:

### Sample Markdown file annotated with render block:

```md
# Server Info and Capabilities

Server Capabilities will be placed here...

```

### Sample Markdown file, annotated with render block and template name:

```md
# Server Info and Capabilities

Server Capabilities will be placed here...

```

### Sample Markdown file, annotated with render block and custom template file:

```md
# Server Info and Capabilities

Server Capabilities will be placed here...

```

### Sample HTML file with annotations :

```html

  
    My MCP Server
  
  
    MCP Server Details
    
      

      
    
  

```

### Sample HTML file with inline template :

```html
MCP Server Details

  
  
  

```

Below is a screenshot showing the resulting HTML after the mcp-discovery update command is executed:

> You can execute the mcp-discovery update command whenever you need to refresh the file with the latest MCP Server capabilities.

## Contributing

We welcome everyone who wishes to contribute! Please refer to the [contributing](CONTRIBUTING.md) guidelines for more details.

All contributions, including issues and pull requests, must follow
Rust's Code of Conduct.

Unless explicitly stated otherwise, any contribution you submit for inclusion in mcp-discovery is provided under the terms of the MIT License, without any additional conditions or restrictions.

## License

This project is licensed under the MIT License. see the [LICENSE](LICENSE) file for details.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [rust-mcp-stack](https://github.com/rust-mcp-stack)
- **Source:** [rust-mcp-stack/mcp-discovery](https://github.com/rust-mcp-stack/mcp-discovery)
- **License:** MIT
- **Homepage:** https://rust-mcp-stack.github.io/mcp-discovery/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-rust-mcp-stack-mcp-discovery
- Seller: https://agentstack.voostack.com/s/rust-mcp-stack
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
