# Agent frameworks

Any MCP client library that speaks Streamable HTTP can connect: send the key as a bearer header, initialise, list the tools and hand them to your model. The server keeps no session between requests, so each call stands on its own.

## What your agent needs

| | |
|---|---|
| **URL** | `https://api.audiobly.com/mcp` |
| **Transport** | Streamable HTTP (JSON responses) |
| **Header** | `Authorization: Bearer sk_live_…` |

The examples use the official MCP SDKs. For an agent with no MCP support, call the [REST API](/developers/api/introduction.md) instead: every tool reads the same endpoints.

```python tab=Python group=sdk
# pip install "mcp>=2.3"
import asyncio, os
import httpx2
from mcp import ClientSession
from mcp.client.streamable_http import streamable_http_client

async def main():
    headers = {"Authorization": f"Bearer {os.environ['AUDIOBLY_KEY']}"}
    async with httpx2.AsyncClient(headers=headers, timeout=60) as http:
        async with streamable_http_client(
            "https://api.audiobly.com/mcp", http_client=http
        ) as (read, write, *_):
            async with ClientSession(read, write) as session:
                await session.initialize()
                tools = await session.list_tools()
                result = await session.call_tool(
                    "list_events", {"limit": 5}
                )
                print(result.content[0].text)

asyncio.run(main())
```

```js tab=Node group=sdk
// npm install @modelcontextprotocol/sdk
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const transport = new StreamableHTTPClientTransport(
  new URL("https://api.audiobly.com/mcp"),
  { requestInit: { headers: {
    Authorization: `Bearer ${process.env.AUDIOBLY_KEY}`,
  } } },
);
const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(transport);

const { tools } = await client.listTools();
const result = await client.callTool({
  name: "list_events",
  arguments: { limit: 5 },
});
console.log(result.content[0].text);
```
