Skip to content

Commit f524191

Browse files
committed
ci: integrate mcp discovery
1 parent 200c16d commit f524191

File tree

4 files changed

+178
-36
lines changed

4 files changed

+178
-36
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ jobs:
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
15+
- name: Cache Rust
16+
uses: actions/cache@v4
17+
with:
18+
path: |
19+
~/.rustup/toolchains
20+
~/.cargo/registry
21+
~/.cargo/git
22+
target
23+
key: ${{ runner.os }}-rust-${{ steps.toolchain.outputs.cachekey }}
24+
restore-keys: ${{ runner.os }}-rust-
1525

1626
- name: Install Rust Toolchain
1727
uses: dtolnay/rust-toolchain@master

.github/workflows/mcp-discovery.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: MCP Discovery
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
types: [opened, synchronize, reopened]
7+
workflow_call:
8+
inputs:
9+
version:
10+
required: true
11+
type: string
12+
permissions:
13+
contents: write
14+
jobs:
15+
update:
16+
if: startsWith(github.head_ref, 'release-please--branches--')
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
ref: ${{ github.head_ref }}
23+
24+
- name: Cache Rust
25+
uses: actions/cache@v4
26+
with:
27+
path: |
28+
~/.rustup/toolchains
29+
~/.cargo/registry
30+
~/.cargo/git
31+
target
32+
key: ${{ runner.os }}-rust-${{ steps.toolchain.outputs.cachekey }}
33+
restore-keys: ${{ runner.os }}-rust-
34+
35+
- name: Install Rust Toolchain
36+
uses: dtolnay/rust-toolchain@master
37+
with:
38+
toolchain: stable
39+
40+
- name: Build
41+
run: |
42+
cargo build
43+
44+
- uses: rust-mcp-stack/mcp-discovery-action@v1
45+
with:
46+
version: "latest"
47+
command: "update"
48+
mcp-launch-command: "target/debug/rust-mcp-filesystem ."
49+
filename: "docs/capabilities.md"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<img width="96" src="./docs/_media/rust-mcp-filesystem.png" alt="Description" width="300">
2+
<img width="96" src="./docs/_media/rust-mcp-filesystem.png" alt="Rust MCP Filesystem Logo" width="300">
33
</p>
44

55
# Rust MCP Filesystem

docs/capabilities.md

Lines changed: 118 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Capabilities
22

3-
## **rust-mcp-filesystem-server 0.1.0**
4-
3+
<!-- mcp-discovery-render -->
4+
## rust-mcp-filesystem 0.1.3
55
| 🟢 Tools (14) | <span style="opacity:0.6">🔴 Prompts</span> | <span style="opacity:0.6">🔴 Resources</span> | <span style="opacity:0.6">🔴 Logging</span> | <span style="opacity:0.6">🔴 Experimental</span> |
6-
| ------------- | ------------------------------------------- | --------------------------------------------- | ------------------------------------------- | ------------------------------------------------ |
7-
6+
| --- | --- | --- | --- | --- |
87
## 🛠️ Tools (14)
98

109
<table style="text-align: left;">
@@ -13,83 +12,126 @@
1312
<th style="width: auto;"></th>
1413
<th style="width: auto;">Tool Name</th>
1514
<th style="width: auto;">Description</th>
15+
<th style="width: auto;">Inputs</th>
1616
</tr>
1717
</thead>
1818
<tbody style="vertical-align: top;">
1919
<tr>
2020
<td>1.</td>
21-
<td>
22-
<code><b>read_file</b></code>
23-
</td>
24-
<td>Read the complete contents of a file from the file system. Handles various text encodings and provides detailed error messages if the file cannot be read. Use this tool when you need to examine the contents of a single file. Only works within allowed directories.</td>
25-
</tr>
26-
<tr>
27-
<td>2.</td>
2821
<td>
2922
<code><b>create_directory</b></code>
3023
</td>
3124
<td>Create a new directory or ensure a directory exists. Can create multiple
3225
nested directories in one operation. If the directory already exists,
3326
this operation will succeed silently. Perfect for setting up directory
3427
structures for projects or ensuring required paths exist. Only works within allowed directories.</td>
28+
<td>
29+
<ul>
30+
<li style="white-space: nowrap;"> <code>path</code> : string<br /></li>
31+
</ul>
32+
</td>
3533
</tr>
3634
<tr>
37-
<td>3.</td>
35+
<td>2.</td>
3836
<td>
3937
<code><b>directory_tree</b></code>
4038
</td>
4139
<td>Get a recursive tree view of files and directories as a JSON structure.
4240
Each entry includes <code>name</code>, <code>type</code> (file/directory), and <code>children</code> for directories.
4341
Files have no children array, while directories always have a children array (which may be empty).
4442
The output is formatted with 2-space indentation for readability. Only works within allowed directories.</td>
43+
<td>
44+
<ul>
45+
<li style="white-space: nowrap;"> <code>path</code> : string<br /></li>
46+
</ul>
47+
</td>
4548
</tr>
4649
<tr>
47-
<td>4.</td>
50+
<td>3.</td>
4851
<td>
4952
<code><b>edit_file</b></code>
5053
</td>
5154
<td>Make line-based edits to a text file. Each edit replaces exact line sequences
5255
with new content. Returns a git-style diff showing the changes made.
5356
Only works within allowed directories.</td>
57+
<td>
58+
<ul>
59+
<li style="white-space: nowrap;"> <code>dryRun</code> : boolean<br /></li>
60+
<li style="white-space: nowrap;"> <code>edits</code> : {newText : string, oldText : string} [ ]<br /></li>
61+
<li style="white-space: nowrap;"> <code>path</code> : string<br /></li>
62+
</ul>
63+
</td>
5464
</tr>
5565
<tr>
56-
<td>5.</td>
66+
<td>4.</td>
5767
<td>
5868
<code><b>get_file_info</b></code>
5969
</td>
6070
<td>Retrieve detailed metadata about a file or directory. Returns comprehensive
6171
information including size, creation time, last modified time, permissions,
6272
and type. This tool is perfect for understanding file characteristics
6373
without reading the actual content. Only works within allowed directories.</td>
74+
<td>
75+
<ul>
76+
<li style="white-space: nowrap;"> <code>path</code> : string<br /></li>
77+
</ul>
78+
</td>
6479
</tr>
6580
<tr>
66-
<td>6.</td>
81+
<td>5.</td>
6782
<td>
6883
<code><b>list_allowed_directories</b></code>
6984
</td>
7085
<td>Returns a list of directories that the server has permission to access.
7186
Subdirectories within these allowed directories are also accessible.
7287
Use this to identify which directories and their nested paths are available before attempting to access files.</td>
88+
<td>
89+
<ul>
90+
</ul>
91+
</td>
7392
</tr>
7493
<tr>
75-
<td>7.</td>
94+
<td>6.</td>
7695
<td>
7796
<code><b>list_directory</b></code>
7897
</td>
7998
<td>Get a detailed listing of all files and directories in a specified path.
80-
Results clearly distinguish between files and directories with <code>[FILE]</code> and <code>[DIR]</code>
99+
Results clearly distinguish between files and directories with <code>FILE</code> and <code>DIR</code>
81100
prefixes. This tool is essential for understanding directory structure and
82101
finding specific files within a directory. Only works within allowed directories.</td>
102+
<td>
103+
<ul>
104+
<li style="white-space: nowrap;"> <code>path</code> : string<br /></li>
105+
</ul>
106+
</td>
83107
</tr>
84108
<tr>
85-
<td>8.</td>
109+
<td>7.</td>
86110
<td>
87111
<code><b>move_file</b></code>
88112
</td>
89113
<td>Move or rename files and directories. Can move files between directories
90114
and rename them in a single operation. If the destination exists, the
91115
operation will fail. Works across different directories and can be used
92116
for simple renaming within the same directory. Both source and destination must be within allowed directories.</td>
117+
<td>
118+
<ul>
119+
<li style="white-space: nowrap;"> <code>destination</code> : string<br /></li>
120+
<li style="white-space: nowrap;"> <code>source</code> : string<br /></li>
121+
</ul>
122+
</td>
123+
</tr>
124+
<tr>
125+
<td>8.</td>
126+
<td>
127+
<code><b>read_file</b></code>
128+
</td>
129+
<td>Read the complete contents of a file from the file system. Handles various text encodings and provides detailed error messages if the file cannot be read. Use this tool when you need to examine the contents of a single file. Only works within allowed directories.</td>
130+
<td>
131+
<ul>
132+
<li style="white-space: nowrap;"> <code>path</code> : string<br /></li>
133+
</ul>
134+
</td>
93135
</tr>
94136
<tr>
95137
<td>9.</td>
@@ -101,6 +143,11 @@ efficient than reading files one by one when you need to analyze
101143
or compare multiple files. Each file's content is returned with its
102144
path as a reference. Failed reads for individual files won't stop
103145
the entire operation. Only works within allowed directories.</td>
146+
<td>
147+
<ul>
148+
<li style="white-space: nowrap;"> <code>paths</code> : string [ ]<br /></li>
149+
</ul>
150+
</td>
104151
</tr>
105152
<tr>
106153
<td>10.</td>
@@ -112,45 +159,81 @@ Searches through all subdirectories from the starting path. The search
112159
is case-insensitive and matches partial names. Returns full paths to all
113160
matching items. Great for finding files when you don't know their exact location.
114161
Only searches within allowed directories.</td>
162+
<td>
163+
<ul>
164+
<li style="white-space: nowrap;"> <code>excludePatterns</code> : string [ ]<br /></li>
165+
<li style="white-space: nowrap;"> <code>path</code> : string<br /></li>
166+
<li style="white-space: nowrap;"> <code>pattern</code> : string<br /></li>
167+
</ul>
168+
</td>
115169
</tr>
116170
<tr>
117171
<td>11.</td>
172+
<td>
173+
<code><b>unzip_file</b></code>
174+
</td>
175+
<td>Extracts the contents of a ZIP archive to a specified target directory.
176+
It takes a source ZIP file path and a target extraction directory.
177+
The tool decompresses all files and directories stored in the ZIP, recreating their structure in the target location.
178+
Both the source ZIP file and the target directory should reside within allowed directories.</td>
179+
<td>
180+
<ul>
181+
<li style="white-space: nowrap;"> <code>target_path</code> : string<br /></li>
182+
<li style="white-space: nowrap;"> <code>zip_file</code> : string<br /></li>
183+
</ul>
184+
</td>
185+
</tr>
186+
<tr>
187+
<td>12.</td>
118188
<td>
119189
<code><b>write_file</b></code>
120190
</td>
121191
<td>Create a new file or completely overwrite an existing file with new content.
122192
Use with caution as it will overwrite existing files without warning.
123193
Handles text content with proper encoding. Only works within allowed directories.</td>
124-
</tr>
125-
<tr>
126-
<td>12.</td>
127194
<td>
128-
<code><b>zip_files</b></code>
195+
<ul>
196+
<li style="white-space: nowrap;"> <code>content</code> : string<br /></li>
197+
<li style="white-space: nowrap;"> <code>path</code> : string<br /></li>
198+
</ul>
129199
</td>
130-
<td>Creates a ZIP archive by compressing files.
131-
It takes a list of files to compress and a target path for the resulting ZIP file.
132-
Both the source files and the target ZIP file should reside within allowed directories.</td>
133200
</tr>
134201
<tr>
135202
<td>13.</td>
136203
<td>
137-
<code><b>unzip_file</b></code>
204+
<code><b>zip_directory</b></code>
205+
</td>
206+
<td>Creates a ZIP archive by compressing a directory , including files and subdirectories matching a specified glob pattern.
207+
It takes a path to the folder and a glob pattern to identify files to compress and a target path for the resulting ZIP file.
208+
Both the source directory and the target ZIP file should reside within allowed directories.</td>
209+
<td>
210+
<ul>
211+
<li style="white-space: nowrap;"> <code>input_directory</code> : string<br /></li>
212+
<li style="white-space: nowrap;"> <code>pattern</code> : string<br /></li>
213+
<li style="white-space: nowrap;"> <code>target_zip_file</code> : string<br /></li>
214+
</ul>
138215
</td>
139-
<td>Extracts the contents of a ZIP archive to a specified target directory.
140-
It takes a source ZIP file path and a target extraction directory.
141-
The tool decompresses all files and directories stored in the ZIP, recreating their structure in the target location.
142-
Both the source ZIP file and the target directory should reside within allowed directories.</td>
143216
</tr>
144217
<tr>
145218
<td>14.</td>
146219
<td>
147-
<code><b>zip_directory</b></code>
220+
<code><b>zip_files</b></code>
221+
</td>
222+
<td>Creates a ZIP archive by compressing files.
223+
It takes a list of files to compress and a target path for the resulting ZIP file.
224+
Both the source files and the target ZIP file should reside within allowed directories.</td>
225+
<td>
226+
<ul>
227+
<li style="white-space: nowrap;"> <code>input_files</code> : string [ ]<br /></li>
228+
<li style="white-space: nowrap;"> <code>target_zip_file</code> : string<br /></li>
229+
</ul>
148230
</td>
149-
<td>Creates a ZIP archive by compressing a directory , including files and subdirectories matching a specified glob pattern.
150-
It takes a path to the folder and a glob pattern to identify files to compress and a target path for the resulting ZIP file.
151-
Both the source directory and the target ZIP file should reside within allowed directories.</td>
152231
</tr>
153232
</tbody>
154233
</table>
155234

156-
<sub>◾ generated by mcp-discovery<sub>
235+
236+
237+
238+
<sub>◾ generated by [mcp-discovery](https://github.com/rust-mcp-stack/mcp-discovery)</sub>
239+
<!-- mcp-discovery-render-end -->

0 commit comments

Comments
 (0)