Skip to main content

將 AutoGen 連接到 aicharged.io

215 個工具,單一端點:https://aicharged.io/api/v1/mcp

AutoGen

AutoGen:帶有 headers 的 StreamableHttpServerParams,透過 McpWorkbench 使用。

  • API 金鑰(Bearer)

用戶端程式碼

推薦
import asyncio, os
from autogen_ext.tools.mcp import McpWorkbench, StreamableHttpServerParams

async def main():
    params = StreamableHttpServerParams(
        url="https://aicharged.io/api/v1/mcp",
        headers={"Authorization": f"Bearer {os.environ['AICHARGED_API_KEY']}"},
        timeout=30.0,
    )
    async with McpWorkbench(params) as workbench:
        tools = await workbench.list_tools()
        print([tool["name"] for tool in tools])

asyncio.run(main())

安裝套件

pip install "autogen-ext[mcp]"

或讓 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 (在新分頁中開啟)