Files
deer-flow/backend/pyproject.toml
hetaoBackend 1171598b2f 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

32 lines
696 B
TOML

[project]
name = "deer-flow"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"agent-sandbox>=0.0.19",
"dotenv>=0.9.9",
"fastapi>=0.115.0",
"httpx>=0.28.0",
"langchain>=1.2.3",
"langchain-deepseek>=1.0.1",
"langchain-mcp-adapters>=0.1.0",
"langchain-openai>=1.1.7",
"langgraph>=1.0.6",
"langgraph-cli[inmem]>=0.4.11",
"markdownify>=1.2.2",
"pydantic>=2.12.5",
"pyyaml>=6.0.3",
"readabilipy>=0.3.0",
"sse-starlette>=2.1.0",
"tavily-python>=0.7.17",
"uvicorn[standard]>=0.34.0",
]
[dependency-groups]
dev = [
"pytest>=8.0.0",
"ruff>=0.14.11",
]