Skip to main content

Kết nối curl (HTTP) với aicharged.io

215 công cụ, một endpoint: https://aicharged.io/api/v1/mcp

curl (HTTP)

JSON-RPC thuần qua HTTP POST — dành cho script, gỡ lỗi và các client không có MCP SDK.

  • Khóa API (Bearer)

Luồng cổ điển: initialize → tools/list → tools/call (MCP 2025-11-25)

Khuyên dùng
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"

Kiểu mới không cần handshake (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"

Hoặc để CLI tự động thiết lập

`aicharged setup` tìm kiếm các client AI trên máy này, đăng nhập cho bạn qua trình duyệt và ghi cấu hình của chúng.

Kết nối chỉ với một dòng lệnh

Cài đặt CLI · macOS / Linux
curl -fsSL https://aicharged.io/install.sh | sh && aicharged setup
Cài đặt CLI · Windows
irm https://aicharged.io/install.ps1 | iex; aicharged setup
Endpoint MCP
https://aicharged.io/api/v1/mcp

HTTP dạng stream. Gửi header Authorization: Bearer <API_KEY>, hoặc đăng nhập bằng OAuth nếu client của bạn hỗ trợ.

Hoặc yêu cầu agent của bạn
Hãy đọc https://aicharged.io/agent.md và thiết lập aicharged.io cho tôi

Mở bằng prompt này trong Claude (mở trong tab mới) ChatGPT (mở trong tab mới) Perplexity (mở trong tab mới)