Skip to main content

Python (MCP SDK) ला aicharged.io शी कनेक्ट करा

215 टूल्स, एक एंडपॉइंट: https://aicharged.io/api/v1/mcp

Python (MCP SDK)

अधिकृत Python MCP SDK (v1): Authorization हेडरसह Streamable HTTP क्लायंट.

  • API की (Bearer)

पॅकेज इंस्टॉल करा

pip install "mcp<2"

क्लायंट कोड

शिफारस केलेले
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())

किंवा CLI ला हे सेट अप करू द्या

aicharged setup या मशीनवरील AI क्लायंट शोधते, ब्राउझरद्वारे तुम्हाला साइन इन करते आणि त्यांचे कॉन्फिगरेशन लिहितो.

एका ओळीत कनेक्ट करा

CLI इंस्टॉल करा · macOS / Linux
curl -fsSL https://aicharged.io/install.sh | sh && aicharged setup
CLI इंस्टॉल करा · Windows
irm https://aicharged.io/install.ps1 | iex; aicharged setup
MCP एंडपॉइंट
https://aicharged.io/api/v1/mcp

स्ट्रीम करण्यायोग्य HTTP. हेडर Authorization: Bearer <API_KEY> पाठवा, किंवा तुमचा क्लायंट सपोर्ट करत असल्यास OAuth द्वारे साइन इन करा.

किंवा तुमच्या एजंटला सांगा
https://aicharged.io/agent.md वाचा आणि मला aicharged.io सह सेट अप करा

या प्रॉम्प्टसह यामध्ये उघडा Claude (नवीन टॅबमध्ये उघडते) ChatGPT (नवीन टॅबमध्ये उघडते) Perplexity (नवीन टॅबमध्ये उघडते)