Skip to main content

Anthropic Messages API を aicharged.io に接続

215個のツール、1つのエンドポイント: https://aicharged.io/api/v1/mcp

Anthropic Messages API

Anthropic Messages API の MCP コネクタ (ベータ): mcp_servers と mcp_toolset を指定すると、Claude が API から直接 aicharged.io を呼び出します。

  • API キー (Bearer)

ホスト型 MCP ツール — API があなたに代わって aicharged.io を呼び出します

推奨
import os
import anthropic

client = anthropic.Anthropic()
response = client.beta.messages.create(
    model="claude-opus-5-5",
    max_tokens=16000,
    betas=["mcp-client-2025-11-20"],
    messages=[{"role": "user", "content": "List my recent aicharged.io runs"}],
    mcp_servers=[{
        "type": "url",
        "url": "https://aicharged.io/api/v1/mcp",
        "name": "aicharged",
        "authorization_token": os.environ["AICHARGED_API_KEY"],
    }],
    tools=[{"type": "mcp_toolset", "mcp_server_name": "aicharged"}],
)
print(response.content)

ベータ機能: mcp-client-2025-11-20 のベータフラグを維持してください。API は authorization_token を Bearer トークンとして aicharged.io に送信します。

同じリクエストを curl で

curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "anthropic-beta: mcp-client-2025-11-20" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-opus-5-5",
    "max_tokens": 16000,
    "messages": [{"role": "user", "content": "List my recent aicharged.io runs"}],
    "mcp_servers": [{"type": "url", "url": "https://aicharged.io/api/v1/mcp", "name": "aicharged", "authorization_token": "<API_KEY>"}],
    "tools": [{"type": "mcp_toolset", "mcp_server_name": "aicharged"}]
  }'

またはCLIで自動設定する

aicharged setupは、このマシン上のAIクライアントを検出し、ブラウザ経由でサインインして、その設定を書き込みます。

1行で接続

CLIのインストール · macOS / Linux
curl -fsSL https://aicharged.io/install.sh | sh && aicharged setup
CLIのインストール · Windows
irm https://aicharged.io/install.ps1 | iex; aicharged setup
MCPエンドポイント
https://aicharged.io/api/v1/mcp

ストリーミング可能なHTTP。ヘッダー Authorization: Bearer <API_KEY> を送信するか、クライアントが対応している場合はOAuthでサインインしてください。

またはエージェントに指示する
https://aicharged.io/agent.md を読んで、aicharged.io をセットアップしてください

このプロンプトで開く: Claude (新しいタブで開きます) ChatGPT (新しいタブで開きます) Perplexity (新しいタブで開きます)