{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_9xz5fg93wmdy","handle":"dify-kb-mcp","url":"https://wellknown.network/agents/dify-kb-mcp","links":{"self":"https://wellknown.network/agents/dify-kb-mcp/record.json","html":"https://wellknown.network/agents/dify-kb-mcp","markdown":"https://wellknown.network/agents/dify-kb-mcp/record.md","api":"https://wellknown.network/api/v1/agents/dify-kb-mcp","status":"https://wellknown.network/api/v1/agents/dify-kb-mcp/status","claim":"https://wellknown.network/agents/dify-kb-mcp/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/dify-kb-mcp/claim.json","badge":"https://wellknown.network/agents/dify-kb-mcp/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/dify-kb-mcp/history","tools":"https://wellknown.network/api/v1/agents/dify-kb-mcp/tools"},"ard":{"identifier":"urn:air::server:dify-kb-mcp","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"dify-kb-mcp","summary":"MCP server that exposes Dify knowledge base retrieval as agent tools","description":"# dify-kb-mcp\n\nMCP server that exposes [Dify](https://dify.ai) knowledge base retrieval as agent tools.\n\nTwo tools, both read-only:\n\n| Tool | What it does |\n|---|---|\n| `search_knowledge` | Semantic search across one or more datasets, returns the best passages with scores |\n| `list_knowledge_bases` | Lists datasets with document counts and retrieval settings |\n\n## Install\n\n```bash\nuvx dify-kb-mcp\n# or\npip install dify-kb-mcp\n```\n\n## Configure\n\n| Variable | Required | Default | Notes |\n|---|---|---|---|\n| `DIFY_API_BASE` | no | `http://localhost:5001/v1` | Your Dify API base, e.g. `https://dify.example.com/v1` |\n| `DIFY_DATASET_TOKEN` | **yes** | – | Dataset API key from Dify → 知识库 → API |\n| `DIFY_RERANK` | no | `0` | `1` enables reranking when the dataset has it configured |\n| `DIFY_RERANK_PROVIDER` | no | `huggingface_tei` | Rerank provider name |\n| `DIFY_RERANK_MODEL` | no | `bge-reranker-base` | Rerank model name |\n| `DIFY_MAX_RESULT_CHARS` | no | `3000` | Result truncation limit |\n\n## MCP client config\n\n```json\n{\n  \"mcpServers\": {\n    \"dify-kb\": {\n      \"command\": \"uvx\",\n      \"args\": [\"dify-kb-mcp\"],\n      \"env\": {\n        \"DIFY_API_BASE\": \"https://dify.example.com/v1\",\n        \"DIFY_DATASET_TOKEN\": \"dataset-xxxxxxxx\"\n      }\n    }\n  }\n}\n```\n\n## Behaviour notes\n\n- Only datasets with at least one document are searched.\n- Each dataset's own retrieval settings (search method, score threshold) are respected; only reranking is overridden by `DIFY_RERANK`.\n- If reranking is requested but the rerank service is down, the request is retried once without reranking instead of failing.\n- Errors (bad token, unreachable host) are returned as readable text rather than raised, so the agent can explain them to the user.\n\n## License\n\nMIT","publisher":{"name":"B2B增长工坊","url":null},"homepage":"https://open.workbuddy.cn","repository":null,"version":"0.1.0","license":"MIT","protocols":["mcp"],"tags":["dify","knowledge-base","llm","mcp","rag"],"pricing":null,"endpoints":[{"url":"pypi:dify-kb-mcp","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","license":"pypi","summary":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi","publisherName":"pypi"}},"derived":{"capabilities":[{"slug":"data.vector-search","name":"Vector Search","confidence":1,"provenance":"declared"},{"slug":"ai.model-access","name":"Model Access","confidence":0.905,"provenance":"derived"}],"categories":["ai","data"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"dify-kb-mcp","registry":"pypi","observedAt":"2026-11-03T01:26:15.488Z","publishedAt":"2026-10-27T09:31:31.186565Z","latestVersion":"0.1.0"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"dify-kb-mcp","url":"https://pypi.org/project/dify-kb-mcp/","firstSeenAt":"2026-10-27T23:24:35.228Z","fetchedAt":"2026-11-03T01:25:24.935Z","normalizedAt":"2026-11-03T01:25:24.935Z"}]},"firstSeenAt":"2026-10-27T23:24:35.228Z","updatedAt":"2026-11-03T01:26:15.488Z"}