Skip to main content

Podłącz Python (MCP SDK) do aicharged.io

215 narzędzi, jeden punkt końcowy: https://aicharged.io/api/v1/mcp

Python (MCP SDK)

Oficjalne Python MCP SDK (v1): klient Streamable HTTP z nagłówkiem Authorization.

  • Klucz API (Bearer)

Zainstaluj pakiet

pip install "mcp<2"

Kod klienta

Zalecane
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())

Albo pozwól, aby CLI to skonfigurował

aicharged setup wyszukuje klientów AI na tym komputerze, loguje Cię przez przeglądarkę i zapisuje ich konfigurację.

Połącz w jednej linijce

Zainstaluj CLI · macOS / Linux
curl -fsSL https://aicharged.io/install.sh | sh && aicharged setup
Zainstaluj CLI · Windows
irm https://aicharged.io/install.ps1 | iex; aicharged setup
Punkt końcowy MCP
https://aicharged.io/api/v1/mcp

Strumieniowe HTTP. Wyślij nagłówek Authorization: Bearer <API_KEY> lub zaloguj się przez OAuth, jeśli Twój klient to obsługuje.

Lub powiedz swojemu agentowi
Przeczytaj https://aicharged.io/agent.md i skonfiguruj mi aicharged.io

Otwórz z tym promptem w Claude (otwiera się w nowej karcie) ChatGPT (otwiera się w nowej karcie) Perplexity (otwiera się w nowej karcie)