Phloem MCP Server
Phloem
Phloem 是一个企业级、自托管的基于 RAGFlow 的知识库平台。它通过类型化的 Node.js API 网关和 MCP 服务器封装引擎,实现无缝的 Agent 集成。
Phloem(韧皮部)——植物体内运输营养物质的维管组织。知识也应如此流动。
为什么选择 Phloem
自托管 — 你的文档、你的基础设施、你的控制权。数据不会离开你的环境。
Agent 就绪 — 通过 REST API 或 MCP 服务器暴露知识库,使 AI Agent 获得基于检索增强的可靠答案。
端到端类型化 — 一个 OpenAPI 契约驱动网关路由、客户端 SDK 和模拟层。减少集成意外。
可替换后端 — 适配器层隔离 RAGFlow;无需触及业务代码即可替换或升级引擎。
可扩展 — 扩展点注册表(中间件、路由、MCP 工具、Web 模块),专为无需分叉的插件式定制而设计。
Related MCP server: Modular RAG MCP Server
架构
┌────────────┐ REST ┌─────────────┐ ┌──────────────┐
│ Web UI │──────────▶│ Gateway │──adapter──▶│ RAGFlow │
│ (React) │ │ (Fastify) │ │ (submodule) │
└────────────┘ └──────┬──────┘ └──────────────┘
│
┌──────┴──────┐
│ MCP Server │ ◀── Claude Desktop, Cursor, custom agents
└─────────────┘包
包 | 描述 |
类型、Zod 模式、API 契约 | |
带适配器层的 Fastify API 网关 | |
暴露知识工具的 MCP 服务器 | |
React Web 控制台(深色、极简) | |
| 共享的 ESLint 扁平配置 |
快速开始
前提条件
Node.js ≥ 22
pnpm ≥ 9
Docker(用于 RAGFlow 后端)
安装
git clone --recurse-submodules https://github.com/phytul/phloem.git
cd phloem
pnpm install
cp deploy/docker/.env.example deploy/docker/.env运行(模拟模式 — 无需后端)
# Gateway
pnpm --filter @phloem/gateway dev
# Web console (mock data via MSW)
VITE_API_MODE=mock pnpm --filter @phloem/web dev运行(使用 RAGFlow)
# Build and start RAGFlow (Lite profile, Infinity engine)
docker compose -f deploy/docker/docker-compose.yml -f deploy/docker/docker-compose.lite.yml up -d
pnpm --filter @phloem/gateway dev
pnpm --filter @phloem/web dev验证
curl http://localhost:3000/healthzAPI
REST 契约是单一事实来源:openapi.yaml。
核心资源:
POST /v1/retrieval— 跨数据集混合检索GET/POST /v1/datasets— 知识库管理POST /v1/datasets/{id}/documents— 文档上传GET /healthz— 存活探针
MCP 工具
工具 | 描述 |
| 跨知识库混合检索 |
| 列出可用知识库 |
开发
pnpm run build # build all packages
pnpm run typecheck # strict TS check across the monorepo
pnpm run lint # ESLint + Prettier提交遵循 Conventional Commits。钩子(lint-staged + commitlint)自动强制执行此规范。
许可证
链接
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
Search your knowledge bases from any AI assistant using hybrid RAG.
Private, multimodal knowledge store for agents: hybrid search with cited, provenance-backed results.
Universal persistent memory and knowledge retrieval layer for AI agents and LLMs.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceHybrid semantic search (dense vector + BM25) over local knowledge bases and codebases, exposed as MCP tools for AI agents to search and list knowledge bases.-
- AlicenseNot gradedqualityDmaintenanceEnables querying private knowledge bases through a modular RAG pipeline with features like hybrid retrieval, reranking, and observability, exposed via the Model Context Protocol.1MIT
- AlicenseNot gradedqualityDmaintenanceExposes RAG-related tools (query_knowledge_hub, list_collections, get_document_summary) via the Model Context Protocol, enabling AI assistants to perform hybrid search, document ingestion, and evaluation on knowledge bases.MIT
- AlicenseNot gradedqualityDmaintenanceA pluggable RAG framework that exposes hybrid search, ingestion, and evaluation tools via the Model Context Protocol, enabling AI assistants like Copilot and Claude to query knowledge bases directly.MIT