
mcp-rs-template
Model Context Protocol (MCP) CLI server template for Rust
3 years
Works with Finder
1
Github Watches
7
Github Forks
67
Github Stars
MCP Rust CLI server template
Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you’re building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.
mcp-rs-template is a simple application template that demonstrates how to implement MCP CLI server in Rust.
How to use template?
- Clone the repository
- Modify project information in
Cargo.toml
andsrc/mcp/mod.rs
- Modify server handlers:
-
src/mcp/prompts.rs
: prompts handlers -
src/mcp/resources.rs
: resources handlers -
src/mcp/tools.rs
: tools handlers
-
- Modify
src/mcp/templates/*.json
if you prefer to use json files for prompts, resources, and tools
mcp-rs-template is based on rust-rpc-router, a JSON-RPC routing library for Rust.
CLI options
-
--mcp
: Enable MCP server -
--resources
: display resources -
--prompts
: display prompts -
--tools
: display tools
How to use MCP CLI server in Claude Desktop?
- Edit
claude_desktop_config.json
: Claude Desktop ->Settings
->Developer
->Edit Config
- Add the following configuration to the
servers
section:
{
"mcpServers": {
"current-time": {
"command": "mcp-rs-template",
"args": [
"--mcp"
],
"env": {
"API_KEY": "xxxx"
}
}
}
}
If you want to check MCP log, please use tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
.
References
- MCP Specification: https://spec.modelcontextprotocol.io/
- Model Context Protocol (MCP): https://modelcontextprotocol.io/introduction
- rpc-router: json-rpc routing library - https://github.com/jeremychone/rust-rpc-router/
- Zed context_server: https://github.com/zed-industries/zed/tree/main/crates/context_server
相关推荐
I find academic articles and books for research and literature reviews.
Converts Figma frames into front-end code for various mobile frameworks.
Confidential guide on numerology and astrology, based of GG33 Public information
Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.
Advanced software engineer GPT that excels through nailing the basics.
Delivers concise Python code and interprets non-English comments
💬 MaxKB is a ready-to-use AI chatbot that integrates Retrieval-Augmented Generation (RAG) pipelines, supports robust workflows, and provides advanced MCP tool-use capabilities.
Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx
MCP server to provide Figma layout information to AI coding agents like Cursor
The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.
Reviews

user_zvXoCApz
The mcp-rs-template by linux-china is a fantastic tool for developers who use the MCP application. It offers a robust template that simplifies the setup process, saving you a lot of time and effort. With clear instructions and a user-friendly interface, it efficiently guides you through its features. Highly recommended for anyone looking to streamline their workflow! Check it out here: https://github.com/linux-china/mcp-rs-template.