Skip to main content

DeerFlow Integration

Connect DeerFlow research agents to b1e55ed’s MCP tool surface. DeerFlow orchestrates multi-step research workflows; b1e55ed provides regime awareness, signal provenance, and position context.

Prerequisites

  • Python 3.11+
  • b1e55ed running (python -m b1e55ed.server or deployed instance)
  • DeerFlow installed (setup guide)

Quick Start — Direct Mode

Direct mode runs b1e55ed’s MCP server as a DeerFlow subprocess.
DeerFlow will launch python -m b1e55ed.mcp and discover all available tools via the MCP tools/list handshake.

Gateway Mode

For teams or remote deployments, run the b1e55ed MCP Gateway and point DeerFlow at it over HTTP.
The gateway adds role-based access control, audit logging, and a signal approval workflow. See gateway/README.md for details.

Available MCP Tools

*Non-admin roles can call submit_research_signal through the gateway, but it queues for admin approval instead of forwarding directly.

Skill Pack

DeerFlow’s skill system can import b1e55ed tools as a skill pack. The extension config at integrations/deerflow/extensions_config.json exposes both direct and gateway modes. A typical DeerFlow research workflow:
  1. Scoutget_regime_status to understand market context
  2. Gatherget_recent_signals + get_top_signals for current alpha
  3. Verifyb1e55ed_provenance_check on interesting signals
  4. Report — DeerFlow synthesises findings with regime context

Signal Provenance

Every signal in b1e55ed carries a provenance chain. DeerFlow agents should call b1e55ed_provenance_check before acting on any signal to verify:
  • Producer identity and registration status
  • Karma score of the originating producer
  • Chain of custody from raw data to synthesised signal
This prevents DeerFlow from acting on unverified or low-quality signals.

MCP Protocol

b1e55ed speaks JSON-RPC 2.0 over the MCP transport:
POST to /mcp/call (direct or gateway).

Troubleshooting

DeerFlow can’t discover tools

  • Direct mode: Ensure python -m b1e55ed.mcp runs without errors. Check that the database exists at the configured B1E55ED_DB path.
  • Gateway mode: Verify the gateway is running (curl http://localhost:7338/health).

401 Unauthorized

  • Check X-API-Key header matches a key in gateway/config.yaml.

Tool call returns “Role X cannot call Y”

  • The user’s role doesn’t include that tool. See the role table above or ask an admin to upgrade the key’s role in config.yaml.

Signal queued instead of executed

  • Non-admin submit_research_signal calls are queued by design. An admin must approve via POST /approve/{signal_id}.

Gateway health shows b1e55ed unreachable

  • Check b1e55ed_url in config.yaml points to the running instance.
  • If using a token, verify b1e55ed_token is correct.

Audit log location

  • All requests are logged to gateway/data/audit.jsonl.
  • Each entry includes timestamp, user, tool, redacted params, and status.