
Crimson Crab Mcp Template
io.github.singhpratechPublished by GitHub account singhpratechv0.3.1Updated Oct 24, 2026
Ready-to-clone Rust MCP server with chat, token-counting, and model tools for Claude
Overview
A Rust starter template exposing Claude chat, token-counting, and model-listing tools to an MCP client such as Claude Desktop.
- What you can do
- It exposes five tools: ask_claude sends a prompt and returns Claude's reply, chat sends a full multi-turn history and returns the next reply, count_tokens estimates input tokens for a prompt without running it, list_models enumerates models available to the API key, and get_model returns one model's context window and output limits. It is a minimal reference implementation meant to be cloned or generated as a starting point for building your own Claude-backed MCP tools in Rust.
- When to use it
- Use it if you want a working, small Rust example of an MCP server that calls Claude, or if you want Claude chat and token-estimation tools available inside an MCP client. It is a template rather than a finished product, so expect to modify it for real use.
- Requirements
- A local Rust toolchain to build and run it, and an Anthropic API key supplied through the ANTHROPIC_API_KEY environment variable. It runs as a local stdio process, so it must be launched by an MCP client; the README shows wiring it into Claude Desktop's config file. Network access is needed to reach the Claude API.
Installation
In SourceWeft
- Open Crimson Crab Mcp Template in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Claude-powered MCP server in Rust (starter template)
[crimson-crab-mcp-template MCP server] [crates.io] [license]
A minimal, production-ready Model Context Protocol
(MCP) server, written in Rust, backed by Anthropic's Claude API through the
crimson-crab SDK. It exposes five
tools: ask_claude (send a prompt, get Claude's reply), chat (multi-turn
conversation), count_tokens (price a prompt without running it), list_models
(enumerate the models your API key can use), and get_model (limits and
metadata for one model).
Use it as the reference starting point for building your own Claude-powered MCP tools in Rust.
Use this template
Click Use this template on GitHub, or generate a fresh project with
cargo generate:
You can also just clone it:
Quickstart
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:
Wire it into Claude Desktop
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:
Restart Claude Desktop; the ask_claude, chat, count_tokens,
list_models, and get_model tools will then be available.
The tools
ask_claude
Builds a Claude Messages request (defaulting to the claude-opus-5 model),
calls the API, and returns the concatenated text of Claude's reply.
chat
Sends the whole message history to Claude and returns the next reply — use it
instead of ask_claude when the caller needs to keep context across turns.
count_tokens
Returns the number of input tokens the 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 each Claude model available to the configured API key.
get_model
Returns the model's display name, release date, context window
(max_input_tokens), and maximum output tokens.
Errors from all tools are returned as MCP tool errors rather than panicking. The Claude client is built once at startup and reused across calls.
Built with crimson-crab
This template is built with crimson-crab
— a production-grade Rust SDK for Anthropic's Claude API. Source:
https://github.com/singhpratech/crimson-crab.
License
Licensed under either of
- MIT license (LICENSE-MIT)
- Apache License, Version 2.0 (LICENSE-APACHE)
at your option.
crimson-crab is an independent open-source project and is not affiliated with Anthropic.
Source: README.md at commit d0a492f
Tools
0Version history
1- v0.3.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts