Open WebUI Knowledge Base MCP Server
Click on "Install 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., "@Open WebUI Knowledge Base MCP Serversearch knowledge base 'onboarding' for new employee checklist"
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.
Open WebUI Knowledge Base MCP Server
MCP server for Open WebUI Knowledge Bases – Search and access your knowledge bases from Cursor, Claude Desktop, and other MCP clients
Features • Quick Start • Usage • Available Tools • Contributing
An MCP (Model Context Protocol) server that exposes Open WebUI Knowledge Bases as tools and resources, enabling AI assistants like Cursor and Claude Desktop to search and access knowledge bases.
Features
🔍 Semantic Search - Search knowledge bases using semantic search
📚 Knowledge Base Management - List and get information about knowledge bases
👥 Multi-User Support - Each connection uses its own API token for isolation
🌐 Dual Transport Modes - Supports both stdio (local) and HTTP (remote) transports
🔒 Secure - Per-connection authentication, input validation, rate limiting, CORS protection
Quick Start
Prerequisites
Python 3.8+ or Docker
Open WebUI instance with API access
API token from Open WebUI (Settings → Account → API keys)
Installation
pip install -r requirements.txtOr using uvx:
pip install uv # or: brew install uv
uvx --from . python mcp_server.pyUsage
stdio Mode (Local)
export OPEN_WEBUI_API_URL="https://your-open-webui-instance.com/api/v1"
export OPEN_WEBUI_API_TOKEN="sk-your-token-here"
python mcp_server.pyHTTP Mode (Production)
Docker Compose:
# Create .env file
echo "OPEN_WEBUI_API_URL=https://your-open-webui-instance.com/api/v1" > .env
# Start server
docker-compose up -d
# View logs
docker-compose logs -fDirect Python:
export OPEN_WEBUI_API_URL="https://your-open-webui-instance.com/api/v1"
export MCP_TRANSPORT="http"
export MCP_HTTP_PORT="8001"
python mcp_server.pyServer endpoints:
MCP:
http://localhost:8001/mcpHealth:
http://localhost:8001/health
Configuring Cursor to use your MCP server
Cursor: stdio Mode
Edit ~/.cursor/mcp.json:
{
"mcpServers": {
"open-webui-knowledge": {
"command": "uvx",
"args": ["--from", "/path/to/open-webui-mcp-server", "python", "/path/to/open-webui-mcp-server/mcp_server.py"],
"env": {
"OPEN_WEBUI_API_URL": "https://your-open-webui-instance.com/api/v1",
"OPEN_WEBUI_API_TOKEN": "sk-your-token-here"
}
}
}
}Cursor: HTTP Mode
{
"mcpServers": {
"open-webui-knowledge": {
"url": "http://localhost:8001/mcp",
"headers": {
"Authorization": "Bearer sk-your-token-here"
}
}
}
}Available Tools
list_knowledge_bases- List all accessible knowledge basessearch_knowledge_base- Search a knowledge base using semantic searchknowledge_base_id(required): The ID of the knowledge basequery(required): Your search queryk(optional): Number of results (default: 5)
get_knowledge_base_info- Get detailed information about a knowledge baseknowledge_base_id(required): The ID of the knowledge base
Environment Variables
Variable | Description | Default |
| Open WebUI API base URL | Required |
| Default API token (optional) | None |
| Transport mode: |
|
| HTTP server host |
|
| HTTP server port |
|
| Comma-separated CORS origins (empty = no CORS) | Empty |
| Rate limit per IP (e.g., "1000/minute") |
|
| Rate limit per token |
|
| Rate limit for health endpoint |
|
Security
Input validation and sanitization
Rate limiting (per-IP and per-token)
CORS protection (disabled by default)
Request size limits (10MB max)
Error message sanitization
Token validation
Contributing
See CONTRIBUTING.md for development setup and guidelines.
License
This project is licensed under the MIT License.
Built with ❤️ by Ronas IT
Professional development services • Open source contributors
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/RonasIT/open-webui-mcp-server-python'
If you have feedback or need assistance with the MCP directory API, please join our Discord server