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