openwebui-mcp
Uses Open WebUI's Socket.IO tool loop to run tools attached to models server-side, enabling answers with real tool calls.
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., "@openwebui-mcpAsk the project docs model to summarize the key setup steps in this repo"
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.
openwebui-mcp
Open WebUI MCP server built on FastMCP (standalone, v4) and the openwebui-sdk library
Lets any MCP client (Claude Desktop, Cursor, agents) ask Open WebUI models through the full tool-calling loop, not just plain chat
TheOpen WebUI SDK, the Open WebUI CLI and this MCP server are tested against Open WebUI 0.6.5
Quick start
OPENWEBUI_BASE_URL=http://localhost:8080 OPENWEBUI_API_KEY=sk-... \
uvx openwebui-mcp # stdio (default) - installs and runs from PyPIConnect an MCP client
Codex CLI (~/.codex/config.toml) - register the server as owui and let
it call tools without approval:
[mcp_servers.owui]
command = "uvx"
args = ["openwebui-mcp"]
env = {
OPENWEBUI_BASE_URL = "http://localhost:8080",
OPENWEBUI_API_KEY = "sk-..."
}
default_tools_approval_mode = "auto"Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"openwebui": {
"command": "uvx",
"args": ["openwebui-mcp"],
"env": {
"OPENWEBUI_BASE_URL": "http://localhost:8080",
"OPENWEBUI_API_KEY": "sk-..."
}
}
}
}The quick start uses stdio, so each client spawns the server locally. For remote HTTP transports, open the collapsible options below (or see Run)
Run the server:
uvx openwebui-mcp --transport sse --host 0.0.0.0 --port 8000Claude Desktop (claude_desktop_config.json) - SSE endpoint is http://<host>:8000/sse:
{
"mcpServers": {
"openwebui": {
"type": "sse",
"url": "http://<host>:8000/sse"
}
}
}Run the server:
uvx openwebui-mcp --transport streamable-http --host 0.0.0.0 --port 8000Codex CLI (~/.codex/config.toml) - streamable-http endpoint is http://<host>:8000/mcp:
[mcp_servers.owui]
url = "http://<host>:8000/mcp"
default_tools_approval_mode = "auto"A bare http://<host>:8000 returns 404 on initialize; point the client URL at
the full /mcp path. rmcp and other streamable-http clients use the same URL
Related MCP server: mcp-model-proxy
Proactive ask skill
The repo ships a skill that makes an agent consult the ask tool eagerly
instead of only when it happens to choose to:
skills/owui-proactive-ask/SKILL.mdIt instructs the agent to call mcp__owui__ask before answering every
explicit or implicit question (advice, explanations, recommendations,
troubleshooting, follow-ups), pass relevant conversation context via
history, keep remote tools enabled (use_tools: true), and validate the OWUI
answer against local evidence before replying. It also covers failure handling
(retry, fall back, say it failed - never fake an OWUI result).
Install it with the agent skills CLI (npx skills) or manually:
# global install for Codex
npx skills add ./skills/owui-proactive-ask -g -a codex -y
# global install for Claude Code
npx skills add ./skills/owui-proactive-ask -g -a claude-code -y
# or copy the folder into your agent's skills directory
cp -r skills/owui-proactive-ask ~/.agents/skills/The skill references the tool as mcp__owui__ask, so register the MCP server
under the name owui (Codex-style clients name MCP tools
mcp__<server>__<tool>, see [mcp_servers.owui] in Quick start above).
The skill pairs with OPENWEBUI_ASK_DESCRIPTION and OPENWEBUI_INSTRUCTIONS
(see Configure): the skill makes the agent call ask, while the description
and instructions tell the model why and when.
Common usage
The typical setup is a single specialized model per use case. Model the remote side of this MCP as a domain expert and route every question to it automatically:
Create a specialized model in the Open WebUI workspace, e.g. a "my-kb-model" an expert with a knowledge base and tools attached
Match the tool description to the model - set
OPENWEBUI_ASK_DESCRIPTIONto what the model does ("ask the expert model...") so agents know when to call it (see Configure)Select the model with
OPENWEBUI_DEFAULT_MODEL=my-kb-model(the id fromlist_modelsor from the UI, listed in gray under the model name)Enforce it with
OPENWEBUI_ENFORCE_DEFAULT_MODEL=trueso everyaskcall goes to the selected model automatically, ignoring whatever model the client passes
Optionally, if you use OWUI + MCP as a knowledge base for your agent, install the Proactive ask skill to instruct the agent to consult this MCP proactively instead of only when it feels like it.
Tools
Exactly two tools are exposed
ask
Send a prompt to a model with Open WebUI tool support
prompt(required) - the user messagemodel(optional) - the model id to ask, e.g. one returned bylist_models. Omitted, the server uses the configuredOPENWEBUI_DEFAULT_MODEL; if that is also unset the call fails with an errorsystem(optional) - a system prompt leading the conversationtemperature(optional) - sampling temperature overrideuse_tools(optional, default true) - enable the tools attached to the modelhistory(optional) - prior turns[{"role": "user"|"assistant", "content": "..."}]sent beforepromptso the remote model keeps context from earlier questions
Stateless: each ask call is a fresh conversation on the remote model - it
never remembers previous calls. To carry context across questions, pass the
relevant earlier exchanges in history (e.g. your prior question and its
answer), or inline the context into prompt. Agents that keep their own
conversation log should replay the needed turns via history
To lock every call to one model regardless of what the client passes, set
OPENWEBUI_ENFORCE_DEFAULT_MODEL=true (requires OPENWEBUI_DEFAULT_MODEL);
ask then ignores the model argument entirely
To control what agents see about this tool, set OPENWEBUI_ASK_DESCRIPTION -
it replaces only the first summary line of the tool description (the text
agents read to decide how to call ask). The IMPORTANT - this MCP server is stateless block, the argument docs and the default-model guidance are always
present. Unset, the built-in summary line is used
Tools attached to the model run server-side through Open WebUI's Socket.IO
tool loop, so answers can be produced with real tool calls. Result is a struct
with answer, reasoning and tool_calls
list_models
List the models the connected Open WebUI user can see. Each entry carries the
model id, display name and the tool_ids attached to it
Authentication
Token-based, in two layers
Open WebUI access (required). The server talks to Open WebUI as
Authorization: Bearer <token>. Provide an API key or JWT via env:OPENWEBUI_BASE_URL=http://localhost:8080 OPENWEBUI_API_KEY=sk-...MCP endpoint auth (optional). Set
OPENWEBUI_MCP_TOKEN=<token>to make the MCP server itself requireAuthorization: Bearer <token>on every request. Unset, the endpoint is open to its listeners
TLS to Open WebUI
If Open WebUI is served over https with a certificate the process does not
trust (self-signed, private/Traefik CA, or a MITM proxy CA), the SDK raises
CERTIFICATE_VERIFY_FAILED. Fix by trusting the right CA, never by
silently disabling checks unless you must:
OPENWEBUI_CA_BUNDLE=/path/to/ca.pem # trust a specific PEM CA (covers JSON routes + Socket.IO tool loop)
OPENWEBUI_SSL_VERIFY=false # skip verification (JSON routes only; not recommended)The CA bundle path is applied as SSL_CERT_FILE, so all Python TLS callers
(urllib and aiohttp) pick it up. OPENWEBUI_SSL_VERIFY=false only relaxes the
urllib (JSON) routes; the Socket.IO tool loop still verifies, so prefer the CA
bundle for self-signed servers
Install
Run straight from PyPI, no local checkout needed:
uvx openwebui-mcp --helpOr install it as a tool so the openwebui-mcp command is always available:
uv tool install openwebui-mcp
openwebui-mcp --helpRequires Python 3.11+
Cloning the repo is only needed for development: uv sync (creates
.venv-docker) then uv run openwebui-mcp --help
Configure
Copy .env.example to .env or export the variables. Precedence is the first
defined env var in each alias list
Setting | Env vars (first wins) | Default |
Open WebUI URL |
| required |
Open WebUI token |
| required |
Default model for |
| none |
Enforce default model |
|
|
|
| built-in docstring |
Server instructions |
| none |
MCP bearer token |
| none |
Transport |
|
|
Chat timeout ms |
|
|
Open WebUI CA bundle |
| none |
Skip TLS verify |
|
|
Run
uv run openwebui-mcp # stdio (default), for local MCP clients
uv run openwebui-mcp --transport sse # SSE over HTTP
uv run openwebui-mcp --transport streamable-http --host 0.0.0.0 --port 8000Development
uv run pytest
uv run pyright src testsLayout
src/openwebui_mcp/server.py- FastMCP server, the two tools, TLS apply, static token verifiersrc/openwebui_mcp/config.py- env-driven settingssrc/openwebui_mcp/__main__.py- CLI entry pointskills/owui-proactive-ask/- agent skill that forces proactive use ofasktests/- config + server + TLS unit tests, incl. a protocol-levelcall_toolround trip
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
- Flicense-qualityDmaintenanceA dual-transport MCP server that exposes your API as tools to LLM clients, supporting both stdio transport for local clients like Claude Desktop and HTTP/SSE transport for remote clients like OpenAI's Responses API.Last updated
- AlicenseBqualityDmaintenanceA minimal local MCP server that wraps any Claude Messages API-compatible upstream into a unified ask_model tool. It enables MCP clients to interact with these models through a standard tool interface using stdio transport.Last updated18MIT
- Flicense-qualityDmaintenanceA standalone MCP server that exposes API endpoints as tools for AI assistants, using SSE transport.Last updated
- Flicense-qualityDmaintenanceLocal MCP server that exposes fixed tools for GPT, Claude, and Gemini while routing to any OpenAI-compatible chat completions backend with independent configuration per target.Last updated1
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP (Model Context Protocol) server for Appwrite
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/vedmaka/openwebui-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server