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 MCP Serverlist all registered users and their roles"
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 MCP Server
An MCP (Model Context Protocol) server that exposes Open WebUI's admin APIs as tools, allowing AI assistants to manage users, groups, models, knowledge bases, and more.
Features
User Management: List, get, update roles, delete users
Group Management: Create, update, add/remove members, delete groups
Model Management: Create custom models, update system prompts, manage parameters
Knowledge Base Management: Create, list, delete knowledge bases
Chat Management: List, view, delete chats
Tool & Function Discovery: List available tools and functions
Permission-Aware: All operations respect the logged-in user's permissions
Security
Important: This server passes through the user's authentication token to Open WebUI. This means:
Admin operations require admin API keys
Regular users can only access their own resources
All permission checks are enforced by Open WebUI's API
Installation
pip install openwebui-mcp-serverOr with uv:
uv pip install openwebui-mcp-serverConfiguration
Set the required environment variable:
export OPENWEBUI_URL=https://your-openwebui-instance.comOptionally, set a default API key (can be overridden per-request):
export OPENWEBUI_API_KEY=your-api-keyUsage
With Claude Desktop
Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"openwebui": {
"command": "openwebui-mcp",
"env": {
"OPENWEBUI_URL": "https://your-openwebui-instance.com",
"OPENWEBUI_API_KEY": "your-api-key"
}
}
}
}With Open WebUI (via MCPO)
Start the server in HTTP mode:
export OPENWEBUI_URL=https://your-openwebui-instance.com
export MCP_TRANSPORT=http
export MCP_HTTP_PORT=8001
openwebui-mcpAdd as MCP server in Open WebUI:
Go to Admin Settings → External Tools
Add new MCP server with URL:
http://localhost:8001/mcp
Programmatic Usage
from openwebui_mcp.client import OpenWebUIClient
client = OpenWebUIClient(
base_url="https://your-openwebui-instance.com",
api_key="your-api-key"
)
# List all users (admin only)
users = await client.list_users()
# Create a group
group = await client.create_group("Engineering", "Engineering team")
# Create a custom model
model = await client.create_model(
id="my-assistant",
name="My Assistant",
base_model_id="gpt-4",
meta={"system": "You are a helpful assistant."},
params={"temperature": 0.7}
)Available Tools
User Management
Tool | Description | Permission |
| Get authenticated user's profile | Any |
| List all users | Admin |
| Get specific user details | Admin |
| Change user role | Admin |
| Delete a user | Admin |
Group Management
Tool | Description | Permission |
| List all groups | Any |
| Create a new group | Admin |
| Get group details | Any |
| Update group name/description | Admin |
| Add user to group | Admin |
| Remove user from group | Admin |
| Delete a group | Admin |
Model Management
Tool | Description | Permission |
| List all models | Any |
| Get model configuration | Any |
| Create custom model | Admin |
| Update model settings | Admin |
| Delete a model | Admin |
Knowledge Base Management
Tool | Description | Permission |
| List knowledge bases | Any |
| Get knowledge base details | Any |
| Create knowledge base | Any |
| Delete knowledge base | Owner |
Chat Management
Tool | Description | Permission |
| List user's chats | Own |
| Get chat messages | Own |
| Delete a chat | Own |
| Delete all chats | Own |
System
Tool | Description | Permission |
| List available tools | Any |
| List functions/filters | Any |
| Get system config | Admin |
Development
# Clone the repo
git clone https://github.com/troylar/open-webui-mcp-server.git
cd open-webui-mcp-server
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linter
ruff check src/License
MIT License - see LICENSE for details.
Contributing
Contributions welcome! Please open an issue or PR on GitHub.
Related Projects
Open WebUI - The web UI this server manages
FastMCP - The MCP framework used
MCPO - MCP to OpenAPI proxy
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.