mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-05-04 02:50:45 +08:00
Add comprehensive MCP integration using langchain-mcp-adapters to enable pluggable external tools from MCP servers. Features: - MCP server configuration via mcp_config.json - Automatic lazy initialization for seamless use in both FastAPI and LangGraph Studio - Support for multiple MCP servers (filesystem, postgres, github, brave-search, etc.) - Environment variable resolution in configuration - Tool caching mechanism for optimal performance - Complete documentation and setup guide Implementation: - Add src/mcp module with client, tools, and cache components - Integrate MCP config loading in AppConfig - Update tool system to include MCP tools automatically - Add eager initialization in FastAPI lifespan handler - Add lazy initialization fallback for LangGraph Studio Dependencies: - Add langchain-mcp-adapters>=0.1.0 Documentation: - Add MCP_SETUP.md with comprehensive setup guide - Update CLAUDE.md with MCP system architecture - Update config.example.yaml with MCP configuration notes - Update README.md with MCP setup instructions Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
15 lines
434 B
Python
15 lines
434 B
Python
"""MCP (Model Context Protocol) integration using langchain-mcp-adapters."""
|
|
|
|
from .cache import get_cached_mcp_tools, initialize_mcp_tools, reset_mcp_tools_cache
|
|
from .client import build_server_params, build_servers_config
|
|
from .tools import get_mcp_tools
|
|
|
|
__all__ = [
|
|
"build_server_params",
|
|
"build_servers_config",
|
|
"get_mcp_tools",
|
|
"initialize_mcp_tools",
|
|
"get_cached_mcp_tools",
|
|
"reset_mcp_tools_cache",
|
|
]
|