4.3 KiB
4.3 KiB
DeerFlow Jacob Troubleshooting
Session: Jacob Hermes MCP Troubleshooting & DeerFlow Upgrade
Issues Investigated
-
Jacob couldn't see his SOUL.md — File existed at
backend/.deer-flow/agents/jacob/SOUL.mdbut Jacob had no introspection capability (injected into prompt but no tool to read it). -
Jacob had zero Hermes MCP tools — Multiple root causes found:
- ConfigMap pointed to external URL (
https://hermes.fetcherpay.com/mcp) instead of internal K8s service filesystemandgithubMCP servers were enabled but failing (nonpxin container)MultiServerMCPClient.get_tools()usesasyncio.gather()withoutreturn_exceptions=True— one failing server kills ALL MCP tools.langgraph_apidirectory was NOT persisted on PVC — thread data lost on pod restart- 168 commits behind upstream — critical fix
24fe5fbdspecifically addresses MCP init RuntimeError escaping
- ConfigMap pointed to external URL (
Fixes Applied
-
Updated ConfigMap
deer-flow-app-config:- Changed hermes-mcp URL to
http://hermes-mcp:3456/sse(internal K8s service) - Disabled failing
filesystemandgithubMCP servers - Hermes MCP remains enabled with
x-api-keyauth
- Changed hermes-mcp URL to
-
Made
.langgraph_apipersistent:- Patched
deer-flow-langgraphdeployment to mount.langgraph_apifrom PVC (deer-flow-data) - Copied existing
.langgraph_ops.pcklto PVC
- Patched
-
Pulled upstream updates:
- Merged 168 commits from
origin/main(bytedance/deer-flow) - Key commits: MCP init fix, checkpointer directory fix, memory fixes, docker/k8s improvements
- Merged 168 commits from
-
Rebuilt & redeployed:
- Built new backend image:
localhost:32000/deer-flow-backend:c99865f5 - Built new frontend image:
localhost:32000/deer-flow-frontend:c99865f5 - Updated K8s deployments to use tagged images (avoiding
latestcache issues) - All pods restarted and running with new code
- Built new backend image:
Current Status
- Pods running with updated images (tag
c99865f5) - Hermes MCP is the only enabled MCP server
- Thread persistence fixed via PVC mount
- Ready for testing — start fresh thread with Jacob and ask about Hermes tools
TODO / Follow-up
- Verify Jacob can see Hermes MCP tools in fresh thread
- If still failing, check langgraph pod logs for MCP initialization messages
- Consider adding
read_filetool so Jacob can introspect his own SOUL.md - Stashed local nginx changes (
docker/nginx/nginx.conf) — re-apply if needed for Docker dev mode
Jacob Hermes MCP — Root Cause Found
Session: Jacob Hermes MCP Troubleshooting & DeerFlow Upgrade (Continued)
Final Root Cause
SSE transport in langchain-mcp-adapters silently hangs when connecting to Hermes MCP.
With asyncio.gather() and no timeout, MultiServerMCPClient.get_tools() blocked forever on SSE connections. Switching to HTTP (streamable_http) transport resolved it immediately.
Debug Timeline
- Added module-level and function-level debug logs to
deerflow.mcp.tools,deerflow.mcp.cache, anddeerflow.agents.lead_agent.agent - Discovered
make_lead_agentwas never being called during pod startup — graph compilation is lazy (happens on first request) - Forced graph compilation by creating a run via LangGraph API (
curl http://localhost:32024) - Observed MCP init logs hanging at
MultiServerMCPClient created, calling get_tools()...with SSE transport - Switched ConfigMap to
type: "http"and confirmed success:Successfully loaded 10 tool(s) from MCP servers
Final Working ConfigMap (deer-flow-app-config)
{
"mcpServers": {
"filesystem": { "enabled": false, ... },
"github": { "enabled": false, ... },
"hermes-mcp": {
"enabled": true,
"type": "http",
"url": "http://hermes-mcp:3456/mcp",
"headers": {
"x-api-key": "114521f3f9e6858480d6269446a446ef"
},
"description": "Hermes MCP - access to Yahoo Mail, FetcherPay emails, and Obsidian vault"
},
"postgres": { "enabled": false, ... }
}
}
Images Deployed
- Backend:
localhost:32000/deer-flow-backend:c99865f5-http - Frontend:
localhost:32000/deer-flow-frontend:c99865f5
Status
- ✅ Hermes MCP connected via HTTP transport
- ✅ 10 tools loaded (email + Obsidian)
- ✅ DeerFlow updated to latest upstream
- ✅ Thread persistence fixed
- ✅ Ready for testing with fresh Jacob thread