Skip to content

Commit a23aee5

Browse files
committed
fix: improve documentation
1 parent fca1017 commit a23aee5

File tree

7 files changed

+158
-23
lines changed

7 files changed

+158
-23
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@
66

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

9-
`mcp-discovery` launches an MCP Server using provided commands, queries its capabilities, tools, resources etc.
10-
It supports outputting the results in the terminal or saving them to files in Markdown, HTML, or plain text formats.
9+
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.
1110

12-
🌐 Check out the **rust-mcp-filesystem** [capabilities](https://rust-mcp-stack.github.io/rust-mcp-filesystem/#/capabilities) page for sample output.
13-
14-
This project is open-source and leverages the [rust-mcp-schema](https://github.com/rust-mcp-stack/rust-mcp-schema) and [rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk) crates for seamless interaction with MCP Servers.
1511

1612
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).
1713

@@ -23,6 +19,11 @@ Check the [project documentation](https://rust-mcp-stack.github.io/mcp-discovery
2319
- **Flexible Output Customization**: Choose from built-in templates (`md`, `md-plain`, `html`, `txt`) or supply custom Handlebars templates for personalized output.
2420
- **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.
2521

22+
23+
<img align="top" src="docs/_media/rust-mcp-stack-icon.png" width="24" style="border-radius:0.2rem;"> This open-source project leverages the [rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk) for seamless interaction with MCP Servers.
24+
25+
🌐 Check out the **rust-mcp-filesystem** [capabilities](https://rust-mcp-stack.github.io/rust-mcp-filesystem/#/capabilities) page for a sample output.
26+
2627
## Installation ⬇️
2728

2829
### Running as CLI
@@ -31,7 +32,7 @@ Check the [project documentation](https://rust-mcp-stack.github.io/mcp-discovery
3132

3233
### GitHub Action
3334

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

3738
## Subcommands
@@ -105,8 +106,8 @@ mcp-discovery create -f capabilities.md --template-file=custom_template.hbs --
105106

106107
## Defining Update Regions with Markers
107108

108-
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.
109-
The update command simplifies the process for developers and maintainers to keep documentation current effortlessly.
109+
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.
110+
The update command simplifies the process for developers and maintainers to keep documentation current effortlessly.
110111
Run the mcp-discovery update command anytime to refresh the file with the latest MCP Server capabilities.
111112

112113
### Marker Annotations
@@ -188,7 +189,7 @@ Server Capabilities will be placed here...
188189
<b>Name: </b>{{name}}
189190
<br/>
190191
<b>Version: </b>{{version}}
191-
<br/>
192+
<br/>
192193
<b>Number of tools:</b> {{len tools}}
193194
<h2>Summary:</h2>
194195
{{> html-summary }}

docs/README.md

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
A command-line tool written in Rust for discovering and documenting MCP Server capabilities.
44

55
`mcp-discovery` launches an MCP Server using provided commands, queries its capabilities, tools, resources etc.
6-
It supports outputting the results in the terminal or saving them to files in Markdown, HTML, or plain text formats.
6+
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.
77

8-
🌐 Check out the **rust-mcp-filesystem** [capabilities](https://rust-mcp-stack.github.io/rust-mcp-filesystem/#/capabilities) page for sample output.
9-
10-
This project is open-source and leverages the [rust-mcp-schema](https://github.com/rust-mcp-stack/rust-mcp-schema) and [rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk) crates for seamless interaction with MCP Servers.
8+
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).
119

1210
## Features 💡
1311

@@ -17,15 +15,53 @@ This project is open-source and leverages the [rust-mcp-schema](https://github.c
1715
- **Flexible Output Customization**: Choose from built-in templates (`md`, `md-plain`, `html`, `txt`) or supply custom Handlebars templates for personalized output.
1816
- **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.
1917

18+
<img align="top" src="_media/rust-mcp-stack-icon.png" width="24" style="border-radius:0.2rem;"> This open-source project leverages the [rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk) for seamless interaction with MCP Servers.
19+
20+
🌐 Check out the **rust-mcp-filesystem** [capabilities](https://rust-mcp-stack.github.io/rust-mcp-filesystem/#/capabilities) page for a sample output.
21+
2022
## Installation ⬇️
2123

2224
### Running as CLI
2325

24-
Refer to the [quickstart](quickstart.md) guide for installation and command line options.
26+
27+
##### **Shell script**
28+
29+
<!-- x-release-please-start-version -->
30+
31+
```sh
32+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-mcp-stack/mcp-discovery/releases/download/v0.2.0/mcp-discovery-installer.sh | sh
33+
```
34+
35+
##### **PowerShell script**
36+
37+
```sh
38+
powershell -ExecutionPolicy Bypass -c "irm https://github.com/rust-mcp-stack/mcp-discovery/releases/download/v0.2.0/mcp-discovery-installer.ps1 | iex"
39+
```
40+
41+
<!-- x-release-please-end -->
42+
43+
##### **Homebrew**
44+
45+
```sh
46+
brew install rust-mcp-stack/tap/mcp-discovery
47+
```
48+
49+
##### **Cargo**
50+
51+
```sh
52+
cargo install mcp-discovery --locked
53+
```
54+
55+
##### **NPM**
56+
57+
```sh
58+
npm i -g @rustmcp/mcp-discovery@latest
59+
```
60+
> The npm package is provided for convenience. It runs the same underlying Rust binary but can be installed and used as a standard npm package.
2561
2662
### GitHub Action
2763

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

3167
## Example

docs/_coverpage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- ⚙️ CI/CD-friendly
1717

1818
[GitHub](https://github.com/rust-mcp-stack/mcp-discovery)
19-
[Install](https://rust-mcp-stack.github.io/mcp-discovery#/quickstart)
19+
[Install](https://rust-mcp-stack.github.io/mcp-discovery#quickstart)
2020
[Get Started](#mcp-discovery)
2121

2222
<!-- background color -->
227 KB
Loading

docs/examples/capabilities.txt

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
example-servers/everything 1.0.0
2+
3+
🟢 Tools (10) 🟢 Prompts (3) 🟢 Resources (10) 🟢 Logging 🟢 Completions 🔴 Experimental
4+
5+
6+
7+
🛠️ Tools (10)
8+
─────────────
9+
10+
1. add : Adds two numbers
11+
12+
2. annotatedMessage : Demonstrates how annotations can be used to provide metadata about content
13+
14+
3. echo : Echoes back the input
15+
16+
4. getResourceLinks : Returns multiple resource links that reference different types of resources
17+
18+
5. getResourceReference : Returns a resource reference that can be used by MCP clients
19+
20+
6. getTinyImage : Returns the MCP_TINY_IMAGE
21+
22+
7. longRunningOperation : Demonstrates a long running operation with progress updates
23+
24+
8. printEnv : Prints all environment variables, helpful for debugging MCP server configuration
25+
26+
9. sampleLLM : Samples from an LLM using MCP's sampling feature
27+
28+
10. structuredContent : Returns structured content along with an output schema for client data validation
29+
30+
31+
32+
📝 Prompts (3)
33+
──────────────
34+
35+
1. simple_prompt : A prompt without arguments
36+
37+
2. complex_prompt : A prompt with arguments
38+
39+
3. resource_prompt : A prompt that includes an embedded resource reference
40+
41+
42+
43+
📄 Resources (10)
44+
─────────────────
45+
46+
1. Resource 1 : test://static/resource/1 (text/plain)
47+
48+
2. Resource 2 : test://static/resource/2 (application/octet-stream)
49+
50+
3. Resource 3 : test://static/resource/3 (text/plain)
51+
52+
4. Resource 4 : test://static/resource/4 (application/octet-stream)
53+
54+
5. Resource 5 : test://static/resource/5 (text/plain)
55+
56+
6. Resource 6 : test://static/resource/6 (application/octet-stream)
57+
58+
7. Resource 7 : test://static/resource/7 (text/plain)
59+
60+
8. Resource 8 : test://static/resource/8 (application/octet-stream)
61+
62+
9. Resource 9 : test://static/resource/9 (text/plain)
63+
64+
10. Resource 10 : test://static/resource/10 (application/octet-stream)
65+
66+
67+
68+
🧩 Resource Templates (1)
69+
─────────────────────────
70+
71+
1. Static Resource : test://static/resource/{id}
72+
A static resource with a numeric ID
73+
74+
75+
◾ generated by mcp-discovery

docs/guide/command-examples.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,27 @@ Server Name: example-servers/everything, Server Version: 1.0.0
4343

4444
#### ▪️ Print MCP Server capabilities to the terminal as JSON:
4545

46-
We use the `json` helper function as a template string. It accepts an optional boolean argument—when set to true, the output is pretty-printed:
46+
We use the `json` helper function in a template string. It accepts an object and optional second parameter with value of 'pretty' for a formatted output:
4747

48+
49+
- Print the Full MCP Server Capabilities to the Terminal in JSON Format:
4850
```bash
49-
mcp-discovery --template-string "{{{json true}}}" -- npx -y @modelcontextprotocol/server-everything
51+
mcp-discovery --template-string "{{{json this}}}" -- npx -y @modelcontextprotocol/server-everything
5052
```
51-
5253
<a href="examples/json.txt" target="_blank"> 📎 printed json</a>
5354

55+
- Print MCP Server tools to the Terminal in pretty-formatted JSON :
56+
```bash
57+
mcp-discovery --template-string "{{{json this.tools}}}" -- npx -y @modelcontextprotocol/server-everything
58+
```
59+
60+
61+
5462
---
5563

5664
## Create
5765

58-
#### Create a Markdown file (\*.md) with MCP Server capabilities:
66+
#### Create a Markdown file (\*.md) describing MCP Server capabilities:
5967

6068
```bash
6169
mcp-discovery create -f create-md.md -- npx -y @modelcontextprotocol/server-everything
@@ -77,14 +85,23 @@ mcp-discovery create -f create-md-plain.md --template md-plain -- npx -y @modelc
7785

7886
---
7987

80-
#### Create a HTML file (\*.html) with MCP Server capabilities:
88+
#### Create a HTML file (\*.html) describing MCP Server capabilities:
8189

8290
```bash
8391
mcp-discovery create -f server-info.html -- npx -y @modelcontextprotocol/server-everything
8492
```
8593

8694
<a href="examples/server-info.html" target="_blank">📎 view generated file</a>
8795

96+
#### Create a TEXT file (\*.txt) describing MCP Server capabilities:
97+
98+
```bash
99+
mcp-discovery create -f capabilities.txt -- npx -y @modelcontextprotocol/server-everything
100+
```
101+
102+
<a href="examples/capabilities.txt" target="_blank">📎 view generated file</a>
103+
104+
88105
## Update
89106

90107
To update files, you need to annotate a [render block](./guide/mcp-discovery-markers.md) within the target file where the MCP server capabilities should be inserted.
@@ -96,7 +113,7 @@ Refer to the ["Update Regions with Markers"](./guide/mcp-discovery-markers.md) p
96113
mcp-discovery update -f update-md.md -- npx -y @modelcontextprotocol/server-everything
97114
```
98115

99-
Below is a typical md file containing a render block marked with `<!-- mcp-discovery-render -->` and `<!-- mcp-discovery-render-end -->`.
116+
Below is a typical md file containing a render block marked with `<!-- mcp-discovery-render -->` and `<!-- mcp-discovery-render-end -->`.
100117
MCP Discovery will overwrite the content between these markers with the latest generated output.
101118

102119
```md

docs/quickstart.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ brew install rust-mcp-stack/tap/mcp-discovery
3232
cargo install mcp-discovery --locked
3333
```
3434

35+
#### **NPM**
36+
37+
```sh
38+
npm i -g @rustmcp/mcp-discovery@latest
39+
```
40+
3541
#### **Download Binaries**
3642

3743
<table>
@@ -43,7 +49,7 @@ cargo install mcp-discovery --locked
4349
</tr>
4450
</thead>
4551
<tbody>
46-
<tr>
52+
<tr>
4753
<td>
4854
<!-- x-release-please-start-version -->
4955
<a href="https://github.com/rust-mcp-stack/mcp-discovery/releases/download/v0.2.1/mcp-discovery-aarch64-apple-darwin.tar.gz">mcp-discovery-aarch64-apple-darwin.tar.gz</a>

0 commit comments

Comments
 (0)