Cover image
Try Now
2024-12-28

模型上下文协议的Hello-World服务器

3 years

Works with Finder

1

Github Watches

1

Github Forks

3

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

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://hubeiqiao.com
  • IT problem solver with clear, step-by-step guidance.

  • Andris Teikmanis
  • Latvian GPT assistant for developing GPT applications

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

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

  • Navid RezaeiSarchoghaei
  • Professional Flask/SQLAlchemy code guide. Follow: https://x.com/navid_re

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

  • https://cantaspinar.com
  • Summarizes videos and answers related questions.

  • Khalid kalib
  • Write professional emails

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • oatpp
  • Anthropic的模型上下文协议实现了燕麦++

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • zhaoyunxing92
  • MCP(消息连接器协议)服务

    Reviews

    4 (1)
    Avatar
    user_Qgm2fFXq
    2025-04-16

    I recently started using the Maestro MCP Server and can't praise it enough. The server is robust and efficient, perfectly catering to my needs. Maestro-org has really created a powerful tool for managing and optimizing applications. The integration is seamless and the performance is top-notch. If you're looking for a reliable MCP server, I highly recommend checking it out at https://mcp.so/server/maestro-mcp/maestro-org.