maxkb-knowledge-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@maxkb-knowledge-mcp帮我检索知识库:MaxKB 如何配置 API Key?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MaxKB Knowledge Base Retrieval MCP
An MCP service based on the MaxKB Admin API that retrieves knowledge base segments by user question. Supports vector retrieval, hybrid retrieval, and full-text retrieval. Default Top K is 10, retrieval mode is vector retrieval.
Served over Streamable HTTP by default:
MCP endpoint:
http://<host>:8000/mcpHealth check:
http://<host>:8000/health
Capabilities
Tool | Purpose |
| Retrieve relevant segments by question |
| List knowledge bases |
| View a single knowledge base |
| List knowledge base documents |
| List workspaces |
search_mode (uses environment variable when not specified by the tool, defaults to vector retrieval):
向量/向量检索/embedding混合/混合检索/blend全量/全量检索/keywordsauto: hybrid retrieval → vector retrieval → full-text retrieval, until hits are found
When knowledge_ids is not specified, retrieval is performed across all knowledge bases in the current workspace that have a vector model configured.
Related MCP server: mcp-business-bot
Environment Variables
Copy the example file and modify it according to your actual environment:
cp .env.example .envVariable | Default | Description |
| None | MaxKB address, e.g. |
| None | User API Key; can be omitted in HTTP mode, prefers client |
|
| Default workspace |
|
| Number of results returned, range 1-100 |
|
|
|
|
| Set to |
|
| Request timeout in seconds |
|
|
|
|
| HTTP listen address |
|
| HTTP port |
|
| Local log directory |
|
| Log retention days, automatically deleted upon expiry |
If top_n or search_mode is passed in a single search_knowledge call, it overrides the server-side defaults.
Local Startup
Requires Python 3.10+ and uv.
cp .env.example .env
uv sync
uv run maxkb-mcpAfter startup:
MCP:
http://127.0.0.1:8000/mcpHealth check:
http://127.0.0.1:8000/healthLog file:
logs/mcp.log(rotated daily, retained for 7 days by default)
Client integration example:
{
"mcpServers": {
"maxkb-knowledge": {
"transport": "streamable_http",
"url": "http://127.0.0.1:8000/mcp",
"headers": {
"Authorization": "你的 MaxKB API Key"
},
"disabled": false
}
}
}Authorization can be either the raw Key or Bearer <key>.
For stdio mode:
MCP_TRANSPORT=stdio uv run maxkb-mcpDocker Image Build
Requires Docker 20.10+.
docker build -t maxkb-mcp:latest .For networks in China, it is recommended to specify a PyPI mirror:
docker build \
--build-arg PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple \
-t maxkb-mcp:latest .Push to an image registry (optional):
docker tag maxkb-mcp:latest <registry>/<namespace>/maxkb-mcp:0.1.0
docker push <registry>/<namespace>/maxkb-mcp:0.1.0Docker Deployment
docker-compose.yml does not build the image; it only starts with an existing image. Complete a local build or pull the image from a registry before deployment.
cp .env.example .env
docker-compose up -d
docker-compose logs -f maxkb-mcpWhen using a remote image:
MAXKB_MCP_IMAGE=<registry>/<namespace>/maxkb-mcp:0.1.0 docker-compose up -dAfter startup:
MCP:
http://<host>:8000/mcpHealth check:
http://<host>:8000/healthLog directory: host
./logs(container/app/logs)
After HTTPS reverse proxying, change the client url to https://your-domain/mcp.
If MaxKB is deployed on the host machine, set MAXKB_BASE_URL to http://host.docker.internal:<port>.
To stop the service:
docker-compose downLogs
All HTTP requests and MCP tool calls are written to local logs, with Authorization redacted.
File:
{MAXKB_LOG_DIR}/mcp.log, rotated daily tomcp.log.YYYY-MM-DDExpired files are cleaned once at startup, then every 6 hours
Logs older than
MAXKB_LOG_RETENTION_DAYS(default 7 days) are deleted
FAQ
No API Key provided: Pass the MaxKB user Key in the client
headers.Authorization, or configureMAXKB_API_KEYin.envSlow build or timeout: Add
--build-arg PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simplewhen buildingContainer cannot reach MaxKB: Check
MAXKB_BASE_URL, the network, and whetherhost.docker.internalis neededCertificate validation failure: Set
MAXKB_VERIFY_SSL=false
This server cannot be deployed
Maintenance
Related MCP Connectors
Make your knowledge agent-ready. One MCP endpoint, 5 connectors, 3 search modes.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Knowledge base MCP for AI agents on iknow.dev. Search, read, and maintain via OAuth.
Let AI agents query data and act across all your business apps via MCP.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables interaction with the Innovaas Knowledge Management System through MCP, providing multi-modal search, RAG-powered chat with intelligent token management, and document access.7MIT
- FlicenseNot gradedqualityCmaintenanceEnables querying company knowledge base using RAG, providing accurate answers from internal documents via MCP.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query and manage a document knowledge base via MCP, with RAG-powered search and grounded answers with citations.MIT
- FlicenseAqualityCmaintenanceMCP bridge to a multimodal RAG service, enabling hybrid search and Q&A over documents with tools for knowledge base queries and health checks.4-