mcp-rs-template logo

mcp-rs-template

by TeamDman

mcp-rs-template is a simple application template that demonstrates how to implement an MCP CLI server in Rust. It provides a standardized way to connect LLMs with the context they need, facilitating seamless integration between LLM applications and external data sources and tools.

View on GitHub

Last updated: N/A

What is mcp-rs-template?

mcp-rs-template is a Rust-based application template for building Model Context Protocol (MCP) CLI servers. It allows developers to easily create servers that can connect LLMs to external data sources and tools, enabling context-aware AI applications.

How to use mcp-rs-template?

To use the template, clone the repository, modify project information in Cargo.toml and src/mcp/mod.rs, modify server handlers in src/mcp/prompts.rs, src/mcp/resources.rs, and src/mcp/tools.rs, and modify src/mcp/templates/*.json if you prefer to use json files for prompts, resources, and tools. You can then run the server with CLI options such as --mcp, --resources, --prompts, and --tools. To integrate with Claude Desktop, edit claude_desktop_config.json and add a configuration for the server.

Key features of mcp-rs-template

  • MCP implementation

  • Rust-based

  • CLI interface

  • JSON-RPC routing (using rust-rpc-router)

  • Modular design for prompts, resources, and tools

Use cases of mcp-rs-template

  • AI-powered IDEs

  • Enhanced chat interfaces

  • Custom AI workflows

  • Connecting LLMs to external data sources

  • Integrating LLMs with external tools

FAQ from mcp-rs-template

What is MCP?

Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools.

What is rust-rpc-router?

rust-rpc-router is a JSON-RPC routing library for Rust that mcp-rs-template is based on.

How do I enable the MCP server?

Use the --mcp CLI option.

How do I display resources, prompts, and tools?

Use the --resources, --prompts, and --tools CLI options respectively.

How do I check MCP logs in Claude?

Use the command tail -n 20 -f ~/Library/Logs/Claude/mcp*.log.