Back to Openviking

Deerflow Mcp

docs/images/agents/en/deerflow-mcp.md

0.4.142.5 KB
Original Source

DeerFlow can connect to OpenViking through an MCP Server. MCP integration lets DeerFlow agents actively search, read, and use memories and knowledge from OpenViking while executing tasks.

Step 1: Configure OpenViking credentials

Edit the .env file in the DeerFlow project root and add the OpenViking USER API Key:

bash
OPENVIKING_API_KEY=[TODO]your-api-key

Step 2: Create an MCP configuration file

Copy extensions_config.example.json to extensions_config.json in the project root. DeerFlow uses this file to load MCP Servers:

bash
cp extensions_config.example.json extensions_config.json

Step 3: Configure the OpenViking MCP Server

Open extensions_config.json in the project root and add OpenViking under mcpServers:

json
{
  "mcpServers": {
    "openviking": {
      "enabled": true,
      "type": "http",
      "url": "[TODO]openviking-base-url/mcp",
      "headers": {
        "X-API-Key": "$OPENVIKING_API_KEY"
      }
    }
  }
}

Step 4: Restart DeerFlow

Save .env and extensions_config.json, then restart DeerFlow:

bash
make dev

Troubleshooting

SymptomCauseFix
DeerFlow does not load the OpenViking MCP Server after startupextensions_config.json is missing, malformed, or enabled is not set to trueCheck mcpServers.openviking and make sure the JSON format is valid
OpenViking MCP tools do not appear in the Agent tool listThe MCP configuration did not take effect, or the service was not restartedSave the configuration and restart DeerFlow, or refresh the MCP configuration cache
Calling OpenViking MCP tools fails with 401 or 403API Key is missing, incorrect, or unauthorizedCheck whether OPENVIKING_API_KEY is correctly set in .env and confirm the header uses X-API-Key
MCP Server connection failsThe url is incorrect, or DeerFlow Gateway cannot access the OpenViking MCP ServerCheck the OpenViking MCP Server address, network connectivity, and Docker network configuration
Old credentials are still used after modifying .envEnvironment variables were not reloaded, or the MCP configuration cache was not refreshedRestart DeerFlow, or call /api/mcp/cache/reset to refresh the cache
Agent does not actively call OpenViking toolsMCP tools are invoked by the model on demand and are not an automatic memory backendExplicitly ask the Agent to use OpenViking tools in the prompt, or use MemoryManager integration for automatic recall