# Connect LangChain to aicharged.io

> LangChain: langchain[mcp] turns the aicharged.io tools into LangChain tools through MCPAdapter.

## 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.langchain.com/oss/python/migrate/langchain-mcp-adapters

## Recipe

Client code:

```python
import asyncio, os
from fastmcp import Client
from langchain.mcp import MCPAdapter

async def main():
    client = Client("https://aicharged.io/api/v1/mcp", auth=os.environ["AICHARGED_API_KEY"])
    async with MCPAdapter(client) as adapter:
        tools = await adapter.list_tools()
        print([tool.name for tool in tools])

asyncio.run(main())
```

The old langchain-mcp-adapters package is unmaintained; langchain[mcp] builds on the FastMCP client.

Install the package:

```sh
pip install "langchain[mcp]"
```

[Client documentation](https://docs.langchain.com/oss/python/migrate/langchain-mcp-adapters)

## 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/langchain
