Claude Chat

io.github.codeChap由 GitHub 帳號 codeChap 發布v0.1.0更新於 Oct 24, 2026

Anthropic Claude Messages API MCP server — chat, vision, web search, extended thinking

發布方自己的服務:Claude Platform Docs

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理呼叫 Anthropic Claude Messages API,進行對話、影像分析、即時網頁搜尋與模型清單查詢。

可以做什麼
  • 向 Claude 送出提示,支援多輪歷史、系統提示、模型選擇與可選的延伸思考
  • 搭配文字提示分析 http 或 https 圖片網址中的影像
  • 進行含 Claude 伺服器端網頁搜尋的對話,回傳附引用的來源,並可限制單次請求的搜尋次數
  • 列出可用的 Claude 模型 ID,結果快取五分鐘
適用情境
適合想在 Claude Desktop、Claude Code 等其他 MCP 用戶端中把 Claude 當成工具呼叫的情境,例如需要額外推理、影像分析或基於即時網頁搜尋的回答。
執行需求
以本機 stdio 程序執行,需以 Rust 建置(cargo build --release)。需在 ~/.config/mcp-server-claude-chat/config.toml 設定 Anthropic API 金鑰,缺少或為空時伺服器啟動即失敗。可選 base_url 指向相容閘道。需要連線至 Anthropic API 的網路。
安裝前請注意
API 金鑰以明文存放在設定檔中,且必須是 API 額度金鑰;Claude Pro/Max 訂閱無法使用,將其接入本伺服器會違反 Anthropic 條款。依 token 計費,網頁搜尋另按每 1000 次 10 美元計費,並需組織管理員在 Claude Console 中啟用。提示、對話歷史與圖片網址會傳送給 Anthropic。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Claude Chat,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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

bash
mkdir -p ~/.config/mcp-server-claude-chatcp 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):

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

bash
cargo build --release   # produces target/release/claude-chatcargo build             # debug buildcargo run               # run in dev modeRUST_LOG=debug cargo runcargo test              # unit tests (response formatting, validation, message building)

MCP Configuration

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

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

Claude Code:

bash
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

來源:README.md,提交 96225ee

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Claude 整合