mcp -hello
A hello-world server for the Model Context Protocol
claude mcp add --transport stdio teamdman-mcp-server-hello mcp-rs-template --mcp \ --env API_KEY="xxxx"
How to use
This MCP server implements a Rust-based MCP CLI server template. It demonstrates how to expose prompts, resources, and tools via the MCP protocol using a JSON-RPC router built on Rust. The server is driven by the command-line interface (CLI) and can be started with the --mcp flag to enable MCP mode. Tools, prompts, and resources are defined in the src/mcp modules and can be customized to integrate external data sources or actions. To use it, run the server with the MCP flag, then interact with it through the MCP-compatible client, such as Claude Desktop or another LLM-enabled application, to fetch prompts, resources, or to execute tools through the JSON-RPC interface.
Key capabilities include:
- Prompts: pre-defined prompts that guide the LLM’s behavior or provide templates for common interactions.
- Resources: external data or endpoints that can be queried by the MCP client.
- Tools: callable actions that the MCP client can invoke to perform tasks or retrieve data.
- CLI options: --mcp to enable MCP, --resources, --prompts, and --tools to display respective information.
To interact, ensure your client config points to this server’s mcp-rs-template instance with the --mcp flag, and use the standard MCP commands to list or invoke prompts, resources, and tools as exposed by the server.
How to install
Prerequisites:
- Rust and Cargo installed on your system
- Basic familiarity with Rust project structure and cargo commands
Installation steps:
- prerequisites
- Install Rust: visit https://www.rust-lang.org/tools/install and follow instructions for your OS
- Clone the repository
git clone https://github.com/your-org/mcp-rs-template.git
cd mcp-rs-template
- Configure the project (optional)
- Update Cargo.toml and src/mcp/* files to customize server name, prompts, resources, and tools as needed
- Build the project
cargo build --release
- Run the server in MCP mode
./target/release/mcp-rs-template --mcp
- Verify MCP is running
- Connect with an MCP-compatible client (e.g., Claude Desktop) using the server address and port configured for MCP access.
Additional notes
Tips and common issues:
- Ensure you’ve enabled the --mcp flag when starting the server to expose MCP endpoints.
- If you modify prompts/resources/tools, rebuild the binary to apply changes.
- When integrating with Claude Desktop, add a corresponding entry in claude_desktop_config.json under the servers section with the correct command, args, and any required environment variables.
- Monitor logs to debug issues: tail -n 20 -f path/to/your/logs/mcp*.log as referenced in the README example.
- If you encounter JSON-RPC routing issues, verify that your rust-rpc-router setup in Cargo.toml is compatible with the version used by your MCP server template.
- Environment variables (e.g., API keys) should be kept secure and not hard-coded in production; consider using a secrets manager or environment file.
Related MCP Servers
goose
an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
cunzhi
告别AI提前终止烦恼,助力AI更加持久
probe
AI-friendly semantic code search engine for large codebases. Combines ripgrep speed with tree-sitter AST parsing. Powers AI coding assistants with precise, context-aware code understanding.
mcp-center
A centralized platform for managing and connecting MCP servers. MCP Center provides a high-performance proxy service that enables seamless communication between MCP clients and multiple MCP servers.
backlog -rust
MCP server for Backlog, project management service.
perplexity-web-api
🔍 Perplexity AI MCP without API key