- Home
- MCP servers
- MCP Rust Server
MCP Rust Server
- rust
3
GitHub Stars
rust
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"teamdman-mcp-server-hello": {
"command": "mcp-rs-template",
"args": [
"--mcp"
],
"env": {
"API_KEY": "YOUR_API_KEY"
}
}
}
}Model Context Protocol (MCP) lets you connect large language models to external data sources and tools in a standardized way. This template demonstrates a simple MCP CLI server in Rust that you can customize to expose prompts, resources, and tools for your own applications.
How to use
You run the MCP CLI server locally and connect your MCP client to it. Start the server with the built-in MCP mode and then query or execute prompts, resources, and tools through your client. You can enable or display specific aspects of the server as you test or deploy, such as prompts, resources, or tools, depending on what your client needs.
How to install
Prerequisites: install Rust toolchain (Rustup and Cargo) and ensure you can compile Rust projects.
-
Clone the template repository.
-
Navigate to the project directory.
-
Build the project in release mode.
-
Run the MCP server with the MCP mode enabled.
Additional configuration and usage notes
For Claude Desktop integration, you can add a local MCP server configuration in the Claude Desktop settings under Developer. The example below shows how to register a local server that runs the template and enables MCP mode.
{
"mcpServers": {
"current-time": {
"command": "mcp-rs-template",
"args": [
"--mcp"
],
"env": {
"API_KEY": "xxxx"
}
}
}
}
Developer notes
You can customize the server by editing the prompt, resource, and tool handlers in the Rust project. The relevant files are under the MCP module of the source tree, and you can choose to use JSON files for prompts, resources, and tools if you prefer not to edit code directly.