Cover image
Try Now
2025-02-04

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?

  1. Clone the repository
  2. Modify project information in Cargo.toml and src/mcp/mod.rs
  3. Modify server handlers:
    • src/mcp/prompts.rs: prompts handlers
    • src/mcp/resources.rs: resources handlers
    • src/mcp/tools.rs: tools handlers
  4. 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?

  1. Edit claude_desktop_config.json: Claude Desktop -> Settings -> Developer -> Edit Config
  2. 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

相关推荐

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://zenepic.net
  • 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.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • 林乔安妮
  • A fashion stylist GPT offering outfit suggestions for various scenarios.

  • https://reddgr.com
  • Delivers concise Python code and interprets non-English comments

  • 田中 楓太
  • A virtual science instructor for engaging and informative lessons.

  • 1Panel-dev
  • 💬 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.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • GLips
  • MCP server to provide Figma layout information to AI coding agents like Cursor

  • Dhravya
  • Collection of apple-native tools for the model context protocol.

  • open-webui
  • User-friendly AI Interface (Supports Ollama, OpenAI API, ...)

  • Mintplex-Labs
  • The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.

    Reviews

    3 (1)
    Avatar
    user_zvXoCApz
    2025-04-17

    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.