# Connect CrewAI to aicharged.io

> CrewAI: give the agent an MCPServerHTTP in mcps, with streamable HTTP and an Authorization header.

## At a glance

| Kind | Sign-in | Platforms | Status | Verified |
|---|---|---|---|---|
| SDKs & frameworks | API key (Bearer) | macOS, Linux, Windows | works today | 2026-10-22 |

- MCP: `https://aicharged.io/api/v1/mcp`
- Docs: https://docs.crewai.com/en/mcp/overview

## Recipe

Agent code:

```python
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,
    )],
)
```

[Client documentation](https://docs.crewai.com/en/mcp/overview)

## Authentication

- Send `Authorization: Bearer <API_KEY>` with every request. Create a key at https://aicharged.io/admin/account/api-keys.
- OAuth 2.1 (PKCE S256) is available for clients that cannot send a static key (ChatGPT).
- Without a key the endpoint answers 401 with a WWW-Authenticate header that points to https://aicharged.io/.well-known/oauth-protected-resource.

All 51 clients: https://aicharged.io/connect.md

HTML version: https://aicharged.io/connect/crewai
