Skip to main content

将 curl (HTTP) 连接到 aicharged.io

215 个工具,一个端点:https://aicharged.io/api/v1/mcp

curl (HTTP)

通过 HTTP POST 发送纯 JSON-RPC——适用于脚本、调试和没有 MCP SDK 的客户端。

  • API 密钥(Bearer)

经典流程:initialize → tools/list → tools/call(MCP 2025-11-25)

推荐
U=https://aicharged.io/api/v1/mcp
H=(-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -H "Authorization: Bearer <API_KEY>")
curl -s "${H[@]}" -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}' "$U"
curl -s "${H[@]}" -H "MCP-Protocol-Version: 2025-11-25" -d '{"jsonrpc":"2.0","method":"notifications/initialized"}' "$U"
curl -s "${H[@]}" -H "MCP-Protocol-Version: 2025-11-25" -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' "$U"
curl -s "${H[@]}" -H "MCP-Protocol-Version: 2025-11-25" -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_runs","arguments":{}}}' "$U"

无需握手的新模式(MCP 2026-07-28)

U=https://aicharged.io/api/v1/mcp
H=(-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -H "Authorization: Bearer <API_KEY>")
M='"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientInfo":{"name":"curl","version":"1.0"},"io.modelcontextprotocol/clientCapabilities":{}}'
curl -s "${H[@]}" -H "MCP-Protocol-Version: 2026-07-28" -H "Mcp-Method: server/discover" -d "{\"jsonrpc\":\"2.0\",\"id\":\"d1\",\"method\":\"server/discover\",\"params\":{$M}}" "$U"
curl -s "${H[@]}" -H "MCP-Protocol-Version: 2026-07-28" -H "Mcp-Method: tools/list" -d "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/list\",\"params\":{$M}}" "$U"
curl -s "${H[@]}" -H "MCP-Protocol-Version: 2026-07-28" -H "Mcp-Method: tools/call" -H "Mcp-Name: list_runs" -d "{\"jsonrpc\":\"2.0\",\"id\":3,\"method\":\"tools/call\",\"params\":{\"name\":\"list_runs\",\"arguments\":{},$M}}" "$U"

或者让 CLI 自动设置

aicharged setup 会自动查找此电脑上的 AI 客户端,通过浏览器引导您登录,并写入相应的配置。

一行命令,轻松连接

安装 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 (在新标签页中打开)