Skip to main content

将 CrewAI 连接到 aicharged.io

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

CrewAI

CrewAI:在 mcps 中为智能体提供 MCPServerHTTP,使用 streamable HTTP 和 Authorization 请求头。

  • API 密钥(Bearer)

智能体代码

推荐
import os
from crewai import Agent
from crewai.mcp import MCPServerHTTP

agent = Agent(
    role="Media producer",
    goal="Create media with the aicharged.io tools",
    backstory="You work through the aicharged.io MCP server.",
    mcps=[MCPServerHTTP(
        url="https://aicharged.io/api/v1/mcp",
        headers={"Authorization": f"Bearer {os.environ['AICHARGED_API_KEY']}"},
        streamable=True,
    )],
)

或者让 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 (在新标签页中打开)