MCP.so
ログイン

MCP Rust CLI server template

@TeamDman

基本情報

カテゴリ

開発者ツール

ライセンス

MPL-2.0

トランスポート

stdio

作者

TeamDman

MCP Rust CLI server template について

A hello-world server for the Model Context Protocol

MCP Rust CLI server template の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "current-time": {
      "command": "mcp-rs-template",
      "args": [
        "--mcp"
      ],
      "env": {
        "API_KEY": "xxxx"
      }
    }
  }
}

MCP Rust CLI server template のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is MCP Rust CLI server template?

MCP Rust CLI server template is a simple application template that demonstrates how to implement a Model Context Protocol (MCP) CLI server in Rust. MCP is an open protocol that enables seamless integration between LLM applications and external data sources and tools. This template is for developers building AI-powered IDEs, chat interfaces, or custom AI workflows using Rust.

How to use MCP Rust CLI server template?

Clone the repository, modify project information in Cargo.toml and src/mcp/mod.rs, then edit server handlers in src/mcp/prompts.rs, src/mcp/resources.rs, and src/mcp/tools.rs. Optionally modify JSON template files in src/mcp/templates/. Run with --mcp flag to enable the MCP server. For Claude Desktop integration, add a configuration entry to claude_desktop_config.json.

Key features of MCP Rust CLI server template

  • Implements MCP CLI server in Rust.
  • Based on rust-rpc-router JSON-RPC routing library.
  • Supports prompts, resources, and tools handlers.
  • Uses JSON template files for configuration.
  • CLI options for displaying resources, prompts, and tools.
  • Ready for Claude Desktop integration.

Use cases of MCP Rust CLI server template

  • Building a custom MCP server for AI-powered applications.
  • Prototyping an MCP server in Rust with minimal boilerplate.
  • Integrating with Claude Desktop as a context server.
  • Serving tools, resources, or prompts to LLM applications.

よくある質問

1

What is the MCP Rust CLI server template?

It is a Rust application template that shows how to implement a CLI server using the Model Context Protocol, enabling LLMs to connect with external data and tools.

2

How do I install and run the server?

Clone the repository, modify the template as needed, then run the binary with the `--mcp` flag. The server can be used standalone or configured in Claude Desktop.

3

What are the runtime dependencies?

The template depends on the Rust ecosystem and the `rust-rpc-router` library. No other external runtime is required beyond standard Rust tooling.

4

How do I integrate with Claude Desktop?

Add a JSON entry to `claude_desktop_config.json` with the server command `mcp-rs-template --mcp` and any required environment variables like `API_KEY`. Logs can be checked with `tail` on the MCP log file.

5

Can I use JSON files for prompts, resources, and tools?

Yes, the template supports JSON templates in `src/mcp/templates/*.json` as an alternative to Rust handlers.

コメント

「開発者ツール」の他のコンテンツ