mcpField
C
claude-chat

claude-chat

Local
github.com/codeChapAI & Agents0Updated 9w ago

About claude-chat

claude-chat is a Rust MCP server that gives MCP clients access to Anthropic Claude through the Messages API. It offers chat, image analysis, live web search, and model discovery, with extended thinking available for chat.

Key features

  1. 01Multi-turn chat and system prompts
  2. 02Extended thinking with a token budget
  3. 03Image analysis from a URL
  4. 04Live web search with cited sources
  5. 05List available Claude models

Use cases

  1. 01Ask Claude questions from an MCP client
  2. 02Analyze an image using a text prompt
  3. 03Research a topic with web search and citations

MCP support

Exposes chat, vision, web search, and model-listing tools to MCP clients over stdio. It uses the Anthropic API and requires an API key.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

mcp-server-claude-chat

An MCP (Model Context Protocol) server for the Anthropic Claude Messages API. Built in Rust, it exposes chat, vision, live web search, and model listing as MCP tools — so any MCP client (Claude Desktop, Claude Code, etc.) can consult Claude as a tool.

Communicates via stdio using JSON-RPC 2.0, like all the other MCP servers in this collection. Structurally it mirrors mcp-server-grok-chat / mcp-server-gpt-chat, adapted to Anthropic's API shape.

Subscription vs. API credits

This server uses the Anthropic API with an API key (API credits). That is the only supported, terms-compliant way to drive Claude from a third-party tool.

A Claude Pro/Max subscription (the kind that powers Claude Code and the Claude apps) is not usable here: that authentication is licensed for Anthropic's own first-party clients, and routing it through a custom server would violate Anthropic's Consumer Terms — the "$200 of Claude usage from another service" concern you raised. So: API key it is. (If you run an Anthropic-compatible gateway, point base_url at it — see Configuration.)

Tools

ToolDescription
chatSend a message to Claude. Supports multi-turn history, a system prompt, model selection, and extended thinking via thinking_budget.
chat_with_visionAnalyse an image given an image URL and a text prompt.
chat_with_searchChat with live web search — Claude searches server-side and answers with cited sources.
list_modelsList available Claude models and their IDs (cached for 5 minutes).

Note: Anthropic has no embeddings endpoint (they recommend Voyage AI), so unlike the grok/gpt servers there is no embedding tool.

chat
NameTypeRequiredDescription
promptstringyesThe user message to send
system_promptstringnoSystem prompt to set context/behaviour
messagesstringnoConversation history as a JSON array of {role, content} objects (roles: user/assistant only — use system_prompt for system instructions)
modelstringnoModel ID (default: server default, claude-opus-4-8). Call list_models.
temperaturefloatnoSampling temperature (0.0–1.0). Ignored when thinking_budget is set.
max_tokensintegernoMax tokens to generate (defaults to the server default)
thinking_budgetintegernoEnable extended thinking with this token budget (min 1024). Reasoning is returned in a [thinking] block; max_tokens is auto-raised above the budget.
chat_with_vision
NameTypeRequiredDescription
promptstringyesText prompt describing what to analyse
image_urlstringyesURL of the image (must be http:// or https://)
modelstringnoVision-capable model ID (default: server default)
temperaturefloatnoSampling temperature (0.0–1.0)
max_tokensintegernoMax tokens to generate
chat_with_search
NameTypeRequiredDescription
promptstringyesThe user message
system_promptstringnoSystem prompt
modelstringnoModel ID (default: server default)
temperaturefloatnoSampling temperature (0.0–1.0)
max_tokensintegernoMax tokens to generate
max_usesintegernoMax web searches Claude may run for this request (default: 5)

Web search is billed by Anthropic at $10 per 1,000 searches on top of token costs, and an org admin must enable web search in the Claude Console.

list_models

No parameters. Results cached for 5 minutes.

Prerequisites

Setup

mkdir -p ~/.config/mcp-server-claude-chat
cp config.toml.example ~/.config/mcp-server-claude-chat/config.toml
# then edit it and set api_key

Config (~/.config/mcp-server-claude-chat/config.toml):

api_key = "sk-ant-..."

# Optional:
# base_url = "https://api.anthropic.com/v1"   # or a compatible gateway
# default_model = "claude-opus-4-8"
# default_max_tokens = 4096

The server fails fast at startup if the config is missing or api_key is empty.

Build

cargo build --release   # produces target/release/claude-chat
cargo build             # debug build
cargo run               # run in dev mode
RUST_LOG=debug cargo run
cargo test              # unit tests (response formatting, validation, message building)

MCP Configuration

Claude Desktop (~/.config/Claude/claude_desktop_config.json) or any MCP client:

{
  "mcpServers": {
    "claude-chat": {
      "command": "/media/codechap/4TB/develop/mcps/mcp-server-claude-chat/target/release/claude-chat"
    }
  }
}

Claude Code:

claude mcp add claude-chat -- /media/codechap/4TB/develop/mcps/mcp-server-claude-chat/target/release/claude-chat

Project Structure

src/
  main.rs    - entry point, config loading, stdio transport setup
  server.rs  - MCP tool definitions (chat, chat_with_vision, chat_with_search, list_models)
  api.rs     - Anthropic HTTP client, Messages/Models types, response formatter
  params.rs  - tool parameter types with serde + JSON Schema derives
  config.rs  - TOML config loading

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.