R
langchain-mcp
By rectalogic·Visit Source
LangChain 与模型上下文协议(MCP)的集成方案
2024年12月20日
7 days ago
0 Clicks
什么是MCP
本MCP提供了LangChain与模型上下文协议的集成方案,支持在LangChain工作流中调用工具。
如何使用MCP
使用mcp.ClientSession创建langchain_mcp.MCPToolkit,然后执行await toolkit.initialize(),最后通过toolkit.get_tools()获取兼容LangChain的工具集。
MCP的用途
该协议使LangChain应用能与MCP兼容服务交互,例如:
- 在Groq语言模型上执行查询
- 访问安全文件系统操作
Repository Info
Stars:
205
Forks:
25
Watchers:
205
Last Updated: 1 month ago
Sponsored
Vernclaw Plugins for OpenClaw
Ready-to-use connectors for SEO data, social reading & content generation. Pay-as-you-go credits with audit logs.
