LangChain
LangChain: langchain[mcp] MCPAdapter द्वारे aicharged.io चे टूल्स LangChain टूल्समध्ये रूपांतरित करते.
- 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 क्लायंटवर आधारित आहे.
पॅकेज इंस्टॉल करा
pip install "langchain[mcp]"