A Model Context Protocol (MCP) server collection, implemented in Rust.
This project implements a MCP server collection that allows you to expose tools, resources, or other standardized features via the MCP protocol.
- Rust and Cargo installed on your machine (2021 edition or later recommended).
-
Clone this repository.
-
Navigate to the project directory.
-
Compile and run the server with Cargo:
cargo run- VS Code integration with the Copilot extension:
- Select
...>Configure Tools mcp>Command (stdio)- Paste the path to mcp.exe (
C:\\Your-path\\MCP-server\\mcp\\target\\debug\\mcp.exe)
- Select
The server currently exposes the following tools to the LLM agent:
- git repository tools: Runs
git status,git addorgit committo make repository modifications. read_file: Reads and returns the content of a file (absolute or relative path).replace_text_in_file: Searches for an exact block of text in a file and replaces it. Useful for modifying or removing code snippets without rewriting the entire file.run_command: Executes a PowerShell command in a terminal (e.g.,ls,dir).write_file: Completely writes or overwrites an existing file with new content.
And a lot more incoming !
--auto-approveparameter : add this in themcp.json>argsto allow auto approval. Be careful as it can lead to security issues. The vscode copilot extension overrule this parameter just once per command type and by prompt.
MCP-server/
├── LICENSE
├── README.md
└── mcp/
├── Cargo.lock
├── Cargo.toml
├── Makefile
└── src/
├── main.rs (Point d'entrée, configuration et routing)
└── tools/ (Outils organisés par groupes logiques)
├── mod.rs (Déclaration des modules)
├── cmd.rs (Outils liés au terminal/commandes)
├── file.rs (Outils liés au système de fichiers)
└── git.rs (Outils liés à Git)
- Create a new module file in
mcp/src/tools/(e.g.docker.rsor add to an existing module). - Declare the new module in
mcp/src/tools/mod.rs(e.g.,pub mod docker;). - Add the tool's JSON schema description in the
tools/listresponse matching inmain.rs. - Route the tool call in the
tools/callmatch block insidemain.rs.
To compile the project without running it:
cargo buildTo run tests:
cargo test