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]"