Skip to main content

Pripojenie Python (MCP SDK) k aicharged.io

215 nástrojov, jeden endpoint: https://aicharged.io/api/v1/mcp

Python (MCP SDK)

Oficiálny Python MCP SDK (v1): klient Streamable HTTP s hlavičkou Authorization.

  • API kľúč (Bearer)

Nainštalujte balík

pip install "mcp<2"

Kód klienta

Odporúčané
import asyncio, os
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

async def main():
    headers = {"Authorization": f"Bearer {os.environ['AICHARGED_API_KEY']}"}
    async with streamablehttp_client("https://aicharged.io/api/v1/mcp", headers=headers) as (read, write, _):
        async with ClientSession(read, write) as session:
            await session.initialize()
            tools = await session.list_tools()
            print([tool.name for tool in tools.tools])
            print(await session.call_tool("list_runs", {}))

asyncio.run(main())

Alebo nechajte nastavenie na CLI

aicharged setup nájde AI klientov na tomto počítači, prihlási vás cez prehliadač a zapíše ich konfiguráciu.

Pripojte sa jedným riadkom

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

Streamable HTTP. Pošlite hlavičku Authorization: Bearer <API_KEY> alebo sa prihláste cez OAuth tam, kde to váš klient podporuje.

Alebo povedzte svojmu agentovi
Prečítaj si https://aicharged.io/agent.md a nastav mi aicharged.io

Otvoriť s týmto promptom v Claude (otvorí sa na novej karte) ChatGPT (otvorí sa na novej karte) Perplexity (otvorí sa na novej karte)