Are you the author? Sign in to claim
A ready-to-clone Rust MCP server that calls Claude via crimson-crab
A minimal, production-ready Model Context Protocol
(MCP) server, written in Rust, that exposes a single tool — ask_claude — backed
by Anthropic's Claude API through the crimson-crab
SDK. When an MCP client (such as Claude Desktop) calls the tool, the server sends
the prompt to Claude and returns Claude's text answer.
Use it as the reference starting point for building your own Claude-powered MCP tools in Rust.
Click Use this template on GitHub, or generate a fresh project with
cargo generate:
cargo generate --git https://github.com/singhpratech/crimson-crab-mcp-template
You can also just clone it:
git clone https://github.com/singhpratech/crimson-crab-mcp-template
export ANTHROPIC_API_KEY=sk-ant-...
cargo run
The server communicates over stdio, so running it directly just waits for an MCP
client to connect. All logging goes to stderr — stdout is reserved for the MCP
protocol. Set RUST_LOG=debug for more verbose logs.
To build an optimized binary you can point a client at:
cargo build --release
# -> target/release/crimson-crab-mcp-template
Add an entry to your Claude Desktop MCP config
(claude_desktop_config.json), pointing at the built binary and passing your API
key through the environment:
{
"mcpServers": {
"claude-via-crimson-crab": {
"command": "/absolute/path/to/target/release/crimson-crab-mcp-template",
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}
Restart Claude Desktop; the ask_claude tool will then be available.
ask_claude does| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | yes | The prompt to send to Claude. |
system | string | no | Optional system prompt. |
The tool builds a Claude Messages request (defaulting to the claude-opus-4-8
model), calls the API, and returns the concatenated text of Claude's reply. Errors
are returned as MCP tool errors rather than panicking. The Claude client is built
once at startup and reused across calls.
This template is built with crimson-crab
— a production-grade Rust SDK for Anthropic's Claude API. Source:
https://github.com/singhpratech/crimson-crab.
Licensed under either of
at your option.
crimson-crab is an independent open-source project and is not affiliated with Anthropic.
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows