deerflow2/backend/src
hetaoBackend 74d4a16492 feat: add MCP (Model Context Protocol) support
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>
2026-01-19 18:58:13 +08:00
..
agents feat: add MCP (Model Context Protocol) support 2026-01-19 18:58:13 +08:00
community feat: implement lazy sandbox and thread data initialization (#11) 2026-01-18 13:38:34 +08:00
config feat: add MCP (Model Context Protocol) support 2026-01-19 18:58:13 +08:00
gateway feat: add MCP (Model Context Protocol) support 2026-01-19 18:58:13 +08:00
mcp feat: add MCP (Model Context Protocol) support 2026-01-19 18:58:13 +08:00
models style: format 2026-01-14 09:21:19 +08:00
reflection chore: use ruff to lint and auto-format 2026-01-14 09:08:20 +08:00
sandbox feat: add clarification feature (#13) 2026-01-18 19:55:36 +08:00
skills feat: add skills system for specialized agent workflows (#6) 2026-01-16 14:44:51 +08:00
tools feat: add MCP (Model Context Protocol) support 2026-01-19 18:58:13 +08:00
utils feat: add thread-safety and graceful shutdown to AioSandboxProvider (#7) 2026-01-16 22:28:19 +08:00
__init__.py chore: add an empty __init__.py 2026-01-14 07:16:27 +08:00