Skip to main content

Connect smolagents to aicharged.io

215 tools, one endpoint: https://aicharged.io/api/v1/mcp

smolagents

Hugging Face smolagents: MCPClient over streamable-http; its docs do not show the headers key.

  • API key (Bearer)

Client code

Recommended
import os
from smolagents import MCPClient

server = {
    "url": "https://aicharged.io/api/v1/mcp",
    "transport": "streamable-http",
    "headers": {"Authorization": f"Bearer {os.environ['AICHARGED_API_KEY']}"},
}
with MCPClient(server) as tools:
    print([tool.name for tool in tools])

Unverified: smolagents passes this dict to the streamablehttp_client of the MCP SDK, so headers should work, but its docs do not show the key.

Install the package

pip install "smolagents[mcp]"

Or let the CLI set it up

aicharged setup finds the AI clients on this machine, signs you in through the browser and writes their configuration.

Connect in one line

Install the CLI · macOS / Linux
curl -fsSL https://aicharged.io/install.sh | sh && aicharged setup
Install the CLI · Windows
irm https://aicharged.io/install.ps1 | iex; aicharged setup
MCP endpoint
https://aicharged.io/api/v1/mcp

Streamable HTTP. Send the header Authorization: Bearer <API_KEY>, or sign in with OAuth where your client supports it.

Or tell your agent
Read https://aicharged.io/agent.md and set me up with aicharged.io

Open with this prompt in Claude (opens in a new tab) ChatGPT (opens in a new tab) Perplexity (opens in a new tab)