This listing appears offline
Our automated checks couldnβt reach the source repository, so weβve removed it from search, browse, and the API β this page stays reachable at this direct link only. If this is your project, claim it to fix the link and restore visibility.
Claim this listingRust MCP server template calling Anthropic Claude API via crimson-crab SDK with tools for chat, token counting, and model info.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Crimson Crab MCP Template.
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.
Click Use this template on GitHub, or generate a fresh project with
cargo generate:
You can also just clone it:
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:
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.
ask_claude| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | yes | The prompt to send to Claude. |
system | string | no | Optional system prompt. |
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| Parameter | Type | Required | Description |
|---|---|---|---|
messages | array | yes | The conversation so far, oldest first: {role, content} where role is an enum constrained to "user" or "assistant". Must end with a user turn. |
system | string | no | Optional system prompt. |
model | string | no | Model id (defaults to the ask_claude model). |
max_tokens | integer | no | Maximum tokens to generate (default 1024). |
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| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | yes | The prompt whose token count you want. |
system | string | no | Optional system prompt to include in the count. |
model | string | no | Model id to count against (counts are model-specific). |
Returns the number of input tokens the prompt would consume, without running it β useful for estimating cost before an expensive call.
list_models| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of models to return. |
Returns the id, display name, and release date of each Claude model available to the configured API key.
get_model| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | yes | The model id to look up, e.g. claude-opus-5. |
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.
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.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/singhpratech-crimson-crab-mcp-template)<a href="https://allmcps.com/mcp/singhpratech-crimson-crab-mcp-template"><img src="https://allmcps.com/api/badge/singhpratech-crimson-crab-mcp-template?style=directory" alt="Crimson Crab MCP Template on AllMCPs" /></a>