Skip to main content

เชื่อมต่อ LangChain กับ aicharged.io

215 เครื่องมือ, หนึ่งปลายทาง: https://aicharged.io/api/v1/mcp

LangChain

LangChain: langchain[mcp] แปลงเครื่องมือของ aicharged.io เป็นเครื่องมือ LangChain ผ่าน MCPAdapter

  • คีย์ API (Bearer)

โค้ดไคลเอนต์

แนะนำ
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())

แพ็กเกจ langchain-mcp-adapters แบบเก่าไม่ได้รับการดูแลแล้ว langchain[mcp] สร้างบน FastMCP client

ติดตั้งแพ็กเกจ

pip install "langchain[mcp]"

หรือให้ 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 (เปิดในแท็บใหม่)