crimson-crab-mcp-template is a minimal, production-oriented Model Context Protocol (MCP) server starter template written in Rust. Its backend calls Anthropic's Claude API through the crimson-crab SDK, making it suitable for developers who need to build Claude-driven MCP tools in Rust and can use it as a reference starting point.
Purpose and positioning This template is intended as a reference starting point for building your own Claude-driven MCP tools. It is a ready-to-clone project, making it easy for developers to extend on top of it.
Main capabilities The template exposes five tools:
- ask_claude: sends a prompt and returns Claude's reply; internally it builds a Claude Messages request (using the claude-opus-5 model by default), calls the API, and returns the concatenated text from Claude's reply.
- chat: multi-turn conversation, sends the full message history to Claude and returns the next reply; when the caller needs to preserve context across turns, this should be used instead of ask_claude.
- count_tokens: returns the number of input tokens a prompt would consume without running it, useful for estimating cost before an expensive call.
- list_models: returns the id, display name, and release date of every Claude model available to the configured API Key.
- get_model: returns a model's display name, release date, context window (max_input_tokens), and maximum output token count.
Running and integration communication, so running it directly will simply wait for an MCP client to connect. All logs are output to stderr, while stdout is reserved for the MCP protocol; more detailed logs can be obtained by setting RUST_LOG=debug.
Usage You can use this template by clicking "Use this template" on GitHub, or generate a new project with cargo generate, or clone the repository directly. You can build an optimized binary and point the client to it.
Connecting to Claude Desktop In Claude Desktop's MCP configuration (claude_desktop_config.json), add an entry pointing to the built binary and pass in the API Key via an environment variable; after restarting Claude Desktop, the ask_claude, chat, count_tokens, list_models, and get_model tools will be available. (The specific configuration fields and installation commands were not fully provided in the original text.)
Reliability and implementation details All tool errors are returned as MCP tool errors rather than triggering a panic; the Claude client is built once at startup and reused across multiple calls.
Technical foundation and license This template is built on crimson-crab, which is a production-grade Rust SDK for the Anthropic Claude API, with source code located at https://github.com/singhpratech/crimson-crab . The project is dual-licensed under the MIT License (LICENSE-MIT) or the Apache License, Version 2.0 (LICENSE-APACHE), and users may choose either one. crimson-crab is an independent open-source project and is not affiliated with Anthropic.
Limitations The materials do not provide information such as pricing, performance benchmarks, supported platforms, or concurrency limits.