Dify Retriever

Provides an MCP interface to run the DIFY retriever knowledge base search locally via a binary, enabling fast knowledge retrieval.
  • go

12

GitHub Stars

go

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "wangle201210-dify-retriever-mcp": {
      "command": "dify-retriever-mcp",
      "args": [],
      "env": {
        "DIFY_ENDPOINT": "http://127.0.0.1/v1",
        "DIFY_DATASET_ID": "b667a65b-f40f-4dd0-8b34-8406dc8be96e",
        "DIFY_DATASET_NAME": "这里写知识库名字",
        "DIFY_DATASET_API_KEY": "dataset-iDBz1qVkmI2dU6KnirLCxO9K"
      }
    }
  }
}

You can run the Dify retriever MCP locally as a lightweight MCP server that executes a binary to retrieve knowledge base content. It wires your knowledge-backed retriever into the MCP ecosystem so you can issue queries and receive relevant results efficiently.

How to use

To use this MCP server with your MCP client, run the local binary that powers the retriever and configure the required environment variables. The MCP client will communicate with the running process to fetch knowledge base results. Ensure your dataset and endpoint keys are properly set, so the retriever can access the correct knowledge base data and services.

How to install

Prerequisites: you need a Go toolchain if you plan to build from source. If you prefer not to install Go, you can download the prebuilt binary and place it on your PATH.

Option 1: Install with Go (local development or building from source)

go install github.com/wangle201210/dify-retriever-mcp@latest

Option 2: Use the prebuilt binary (no Go installed)

Download the binary and place it in a directory included in your PATH, so you can run it directly from any shell.

Additional sections

Environment variables you need to configure when running the MCP server locally are shown in the example configuration. These values provide access to your DIFY dataset, endpoint, and dataset metadata.

Example configuration shows how to wire the retriever into the MCP by using a local stdio server that runs the binary and passes necessary environment variables.

{
  "mcpServers": {
      "dify-retriever-mcp": {
        "command": "dify-retriever-mcp",
        "args": [],
        "env": {
          "DIFY_DATASET_API_KEY": "dataset-iDBz1qVkmI2dU6KnirLCxO9K",
          "DIFY_ENDPOINT": "http://127.0.0.1/v1",
          "DIFY_DATASET_ID": "b667a65b-f40f-4dd0-8b34-8406dc8be96e",
          "DIFY_DATASET_NAME": "这里写知识库名字"
        },
        "descriptions": "***知识库检索"
      }
  } 
}
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational