maxkb-knowledge-mcp
MaxKB 知识库检索 MCP
基于 MaxKB Admin API 的 MCP 服务,按用户问题检索知识库分段。支持向量检索、混合检索、全量检索。默认 Top K 为 10、检索模式为向量检索。
默认以 Streamable HTTP 提供服务:
MCP 地址:
http://<主机>:8000/mcp健康检查:
http://<主机>:8000/health
能力
工具 | 作用 |
| 按问题检索相关分段 |
| 列出知识库 |
| 查看单个知识库 |
| 列出知识库文档 |
| 列出工作空间 |
search_mode(工具未指定时使用环境变量,默认向量检索):
向量/向量检索/embedding混合/混合检索/blend全量/全量检索/keywordsauto:混合检索 → 向量检索 → 全文检索,直到命中
未指定 knowledge_ids 时,会在当前工作空间所有已配置向量模型的知识库中检索。
Related MCP server: mcp-rag-assistant
环境变量
复制示例文件后按实际环境修改:
cp .env.example .env变量 | 默认 | 说明 |
| 无 | MaxKB 地址,例如 |
| 无 | 用户 API Key;HTTP 模式下可省略,优先使用客户端 |
|
| 默认工作空间 |
|
| 检索返回条数,范围 1-100 |
|
|
|
|
| 证书无法校验时可设为 |
|
| 请求超时秒数 |
|
|
|
|
| HTTP 监听地址 |
|
| HTTP 端口 |
|
| 本地日志目录 |
|
| 日志留存天数,到期自动删除 |
单次调用 search_knowledge 时若传入 top_n 或 search_mode,会覆盖服务端默认值。
本地启动
需要 Python 3.10+ 与 uv。
cp .env.example .env
uv sync
uv run maxkb-mcp启动后:
MCP:
http://127.0.0.1:8000/mcp健康检查:
http://127.0.0.1:8000/health日志文件:
logs/mcp.log(按天滚动,默认保留 7 天)
客户端接入示例:
{
"mcpServers": {
"maxkb-knowledge": {
"transport": "streamable_http",
"url": "http://127.0.0.1:8000/mcp",
"headers": {
"Authorization": "你的 MaxKB API Key"
},
"disabled": false
}
}
}Authorization 可以是原始 Key,也可以是 Bearer <key>。
如需 stdio 模式:
MCP_TRANSPORT=stdio uv run maxkb-mcpDocker 镜像打包
需要 Docker 20.10+。
docker build -t maxkb-mcp:latest .国内网络建议指定 PyPI 镜像:
docker build \
--build-arg PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple \
-t maxkb-mcp:latest .推送到镜像仓库(可选):
docker tag maxkb-mcp:latest <registry>/<namespace>/maxkb-mcp:0.1.0
docker push <registry>/<namespace>/maxkb-mcp:0.1.0Docker 部署
docker-compose.yml 不构建镜像,只使用已有镜像启动。部署前先完成本地构建或从仓库拉取镜像。
cp .env.example .env
docker-compose up -d
docker-compose logs -f maxkb-mcp使用远程镜像时:
MAXKB_MCP_IMAGE=<registry>/<namespace>/maxkb-mcp:0.1.0 docker-compose up -d启动后:
MCP:
http://<主机>:8000/mcp健康检查:
http://<主机>:8000/health日志目录:宿主机
./logs(容器内/app/logs)
经 HTTPS 反代后,客户端 url 改为 https://your-domain/mcp。
若 MaxKB 部署在宿主机,将 MAXKB_BASE_URL 写成 http://host.docker.internal:<端口>。
停止服务:
docker-compose down日志
所有 HTTP 请求与 MCP 工具调用都会写入本地日志,Authorization 会脱敏。
文件:
{MAXKB_LOG_DIR}/mcp.log,每天滚动为mcp.log.YYYY-MM-DD启动时清理一次过期文件,之后每 6 小时再清理
超过
MAXKB_LOG_RETENTION_DAYS(默认 7 天)的日志会被删除
常见问题
未提供 API Key:在客户端
headers.Authorization中传入 MaxKB 用户 Key,或在.env中配置MAXKB_API_KEY构建慢或超时:打包时加
--build-arg PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple容器访问不到 MaxKB:检查
MAXKB_BASE_URL、网络,以及是否需要host.docker.internal证书校验失败:设置
MAXKB_VERIFY_SSL=false
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with the Innovaas Knowledge Management System through MCP, providing multi-modal search, RAG-powered chat with intelligent token management, and document access.MIT
- FlicenseNot gradedqualityCmaintenanceProvides RAG-based knowledge retrieval and document management as MCP tools, supporting hybrid search, reranking, and retrieval process visualization.
- FlicenseNot gradedqualityCmaintenanceEnables querying company knowledge base using RAG, providing accurate answers from internal documents via MCP.
- AlicenseNot gradedqualityCmaintenanceEnables document ingestion, semantic search, and retrieval-augmented generation via MCP tools and REST API, using vector embeddings and intelligent chunking.MIT
Related MCP Connectors
Query any docs site via MCP. Submit a URL, ask questions, get cited answers.
Knowledge coverage map and health score. Ingest docs into a governed knowledge graph via MCP.
Manage SRG+ hubs, channels, content, assets, users, and workspaces from any MCP-aware AI agent.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/North-CS/maxkb-knowledge-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server