drio
Open app

MCP Rust CLI server template

Source

Model Context Protocol (MCP) CLI server template for Rust

Catalog onlyCatalog onlySTDIO

Overview

mcp-rs-template is a Model Context Protocol (MCP) CLI server template designed for building applications in Rust that can integrate with large language models (LLMs) and various external data sources and tools.

To use mcp-rs-template, clone the repository, modify the project information in the Cargo.toml file and the server handler files, and configure the CLI options as needed.

  • Provides a template for implementing an MCP CLI server in Rust. - Supports JSON-RPC routing for handling requests. - Easily customizable through handler modifications. - Integration capabilities with LLM applications.
  1. Building AI-powered integrated development environments (IDEs).
  2. Enhancing chat interfaces with contextual data.
  3. Creating custom AI workflows that require LLMs to interact with external data.

Add to your AI client

Use these steps to connect MCP Rust CLI server template in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-rs-template-linux-china": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-rs-template-linux-china"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-rs-template-linux-china": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-rs-template-linux-china"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-rs-template-linux-china": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-rs-template-linux-china"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-rs-template-linux-china": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-rs-template-linux-china"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-rs-template-linux-china": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-rs-template-linux-china"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-rs-template-linux-china": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-rs-template-linux-china"
      ]
    }
  }
}

FAQ

What is the MCP?

MCP is an open protocol that facilitates the integration of LLM applications with necessary external tools and data.

Can I customize the handlers?

Yes! You can modify the prompts, resources, and tools handlers to fit your application's requirements.

Is mcp-rs-template suitable for production use?

The template is a starting point; further customization and testing are recommended for production deployments.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":146,"uuid":"de9f8ddf-20da-4ba0-a0cf-d56d17ce9862","name":"mcp-rs-template","title":"MCP Rust CLI server template","description":"Model Context Protocol (MCP) CLI server template for Rust","avatar_url":"https://avatars.githubusercontent.com/u/46711?v=4","created_at":"2024-12-13T09:01:32.870Z","updated_at":"2024-12-13T09:42:47.214Z","status":"created","author_name":"linux-china","author_avatar_url":"https://avatars.githubusercontent.com/u/46711?v=4","tags":"mcp,json-rpc","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/linux-china/mcp-rs-template","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"73\",\"license\":\"Apache-2.0 license\",\"language\":\"Rust\",\"is_official\":false,\"latest_commit_time\":\"2025-04-17 20:37:50\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]