Observed since 21 Oct, 11:06 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AI KB MCP Server - Model Context Protocol server for AI KB API
⚠️ Deprecated
AI KB now ships a built-in MCP server: create endpoints under "Settings → Publish & Integrations → MCP Server", each with its own token, knowledge-base scope and tool list, and connect clients to
/mcp/<endpoint_id>over Streamable HTTP. Prefer the built-in endpoint; this Python package may be removed in a future release.
A Model Context Protocol (MCP) server that gives access to the AI KB knowledge management API.
We recommend following the MCP configuration guide instead of the steps below.
pip install ai-kb-mcp
# Or run it with uvx without installing
uvx --from ai-kb-mcp ai-kb-mcp-server
The distribution is ai-kb-mcp; its command-line entry points are ai-kb-mcp-server and ai-kb-server.
The MCP packages on PyPI under the upstream project's name belong to that project and read its own variable names, not AIKB_*.
# Linux/macOS
export AIKB_BASE_URL="http://localhost:8080/api/v1"
export AIKB_API_KEY="your_api_key_here"
# Windows PowerShell
$env:AIKB_BASE_URL="http://localhost:8080/api/v1"
$env:AIKB_API_KEY="your_api_key_here"
# Windows CMD
set AIKB_BASE_URL=http://localhost:8080/api/v1
set AIKB_API_KEY=your_api_key_here
Create the API key under Settings → Publish & Integrations → API Integration → API Keys.
| Variable | Default | Purpose |
|---|---|---|
AIKB_BASE_URL | http://localhost:8080/api/v1 | AI KB API base URL |
AIKB_API_KEY | empty | API key, sent as X-API-Key |
AIKB_CHAT_TIMEOUT | 300 | Chat stream read timeout in seconds |
AIKB_VERIFY_SSL | true | false disables TLS verification (development only) |
MCP_TRANSPORT | stdio | stdio, sse or http (same as --transport) |
MCP_HOST / MCP_PORT | 127.0.0.1 / 8000 | Bind address for sse and http |
MCP_SERVER_AUTH_TOKEN | empty | Required for sse and http; the server refuses to start without it |
MCP_ALLOWED_UPLOAD_DIRS | working directory | Extra roots for local file uploads (see below) |
ai-kb-mcp-server # stdio, for MCP clients that launch the server
ai-kb-mcp-server --help # show help
ai-kb-mcp-server --check-only # check the environment configuration only
ai-kb-mcp-server --verbose # enable verbose logging
ai-kb-mcp-server --version # show the version
MCP_SERVER_AUTH_TOKEN=change_me ai-kb-mcp-server --transport http --host 0.0.0.0 --port 8000
The Streamable HTTP endpoint is /mcp; the SSE transport serves /sse and /sse/messages/.
Clients send Authorization: Bearer <token> or X-MCP-Auth-Token: <token>.
From the mcp-server/ directory of the repository:
pip install -r requirements.txt
python main.py # same options as ai-kb-mcp-server
# Or install the checkout
pip install . # pip install -e . for development
uvx --from . ai-kb-mcp-server # without installing
python run_server.py, python run.py, python aikb_mcp_server.py and python -m aikb_mcp_server also start the server.
pip install build
python -m build
python test_module.py
The MCP server provides these tools:
create_tenant - create a workspacelist_tenants - list all workspacescreate_knowledge_base - create a knowledge baselist_knowledge_bases - list knowledge basesget_knowledge_base - get knowledge base detailslist_shared_knowledge_bases - list knowledge bases shared with youdelete_knowledge_base - delete a knowledge basehybrid_search - hybrid searchcreate_knowledge_from_file - create knowledge from a local filecreate_knowledge_from_url - create knowledge from a URLcreate_knowledge_from_text - create knowledge from textupdate_knowledge_from_text - update manual Markdown knowledge, re-index it or save it as a draftlist_knowledge - list knowledgeget_knowledge - get knowledge detailsdelete_knowledge - delete knowledgecreate_model - create a modellist_models - list modelsget_model - get model detailscreate_session - create a chat sessionget_session - get session detailslist_sessions - list sessionsdelete_session - delete a sessionchat - send a chat messageagent_chat - call an agent for multi-step retrieval and tool callsBoth chat tools assemble events on SSE blank-line boundaries, so one event can span several data: lines.
An event still open when the connection ends (no blank line seen yet) is dropped. Each event's data buffer is capped at 8 MiB;
exceeding the cap returns an error and closes the response connection.
list_agents - list agentsget_agent - get agent detailslist_chunks - list knowledge chunksdelete_chunk - delete a knowledge chunkwiki_search - search a knowledge base's wiki pageswiki_read_page - read one wiki page by slugwiki_index_view - show a knowledge base's wiki indexIf you hit import errors, make sure that:
mcp.py)All transports, including stdio, restrict local file uploads to the working
directory by default. Set MCP_ALLOWED_UPLOAD_DIRS to a comma-separated list of
trusted absolute directories when additional roots are needed. Starting in a
filesystem root requires an explicit directory configuration. Paths and symbolic
links resolving outside the selected roots are rejected.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.1.2 | 15 Oct 2026 | 10 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 11:06 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:089a772831c9ac83af86e4df8b16ccecbc5b157e664d4ca92af2492f08e73373