Intermediate 12 minDaily plan

Open WebUI: Connect an MCP server local

BestLLMfor — Open WebUI — Local MCP

Open WebUI can connect directly to an MCP server, as long as that server speaks the Streamable HTTP transport. This Open WebUI MCP guide describes the procedure on the admin side: registering the server, choosing a model capable of calling tools, checking what's actually exposed, and restricting who can use it. It doesn't rely on any in-house testing: the procedure follows the official documentation as consulted on October 30, 2026, and the screens may differ depending on your version.

By Mohamed Meguedmi·Update 2026-12-01·Tested on Windows, macOS, and Linux

#Why connect an MCP server to Open WebUI

The Model Context Protocol (MCP) is an open protocol that describes how a client (here, Open WebUI) discovers and calls tools exposed by a server: reading notes, querying a database, running a calculation, accessing an internal service. The model only proposes a tool call with arguments; Open WebUI executes it against the MCP server and then returns the result to the model.

The practical benefit: a single MCP server can serve multiple clients (Open WebUI, a code editor, a command-line agent) without rewriting the integration. If you've already read our guide on MCP with Ollama, you know the principle; here we focus on what Open WebUI supports natively, and on what it doesn't support.

Natively supported transport
MCP Streamable HTTP, declared in the admin settings (external tools section).
Non-native transport
stdio (the server is a local process launched by the client) and the legacy SSE transport. You need to go through a bridge, typically mcpo, which exposes the server as an OpenAPI API.
Who calls the server
For a server registered by the admin, the Open WebUI backend opens the connection. The address must therefore be reachable from the Open WebUI server or container, not just from your browser.
Version
The documentation states that native MCP support is available starting with v0.6.31. Check your version under Settings, About, before looking for the menu.
i
What this guide doesn't claim
No server was exposed to the internet to write this guide, and no session result is presented as observed. The menu labels cited come from the Open WebUI documentation consulted on 30/10/2026; they sometimes change from one version to the next.

#Open WebUI: MCP or OpenAPI tool server?

The complete kit for building your own AI agents.

Benefit from our experience and a guided path to go further with your local agents and your automations.

  • Lifetime online access
  • PDF + files
  • Refunded within 30 days

Open WebUI accepts two kinds of external tools, declared in the same place: MCP servers (Streamable HTTP) and OpenAPI tool servers, meaning any HTTP API that publishes an OpenAPI description. Both end up as tools offered to the model, but they aren't used in the same situations.

Choosing MCP
The server already exists as an MCP server and speaks Streamable HTTP, or you want to share it with other MCP clients without a translation layer.
Choose OpenAPI
You're writing your own HTTP tool (with FastAPI, for example), you already have a documented internal API, or you want to reuse standard HTTP tooling: reverse proxy, logs, token authentication.
stdio MCP server
No direct connection. Run it behind mcpo, then declare the resulting URL as an OpenAPI server.
Legacy SSE server
Same approach: an mcpo bridge, or upgrading the server to Streamable HTTP if its SDK supports it.

The Open WebUI documentation explains this choice by the application's architecture: it's a multi-user web service that doesn't launch local processes on behalf of each signed-in user. The stdio transport, designed for a desktop app that starts its own server, is a poor fit.

Terminal — example stdio-to-OpenAPI bridge with mcpo
# Exemple tiré de la documentation de mcpo : expose un serveur MCP stdio
# (ici mcp-server-time) sous forme d'API OpenAPI sur le port 8000.
# Remplacez la clé par une valeur aléatoire et gardez l'écoute en local.
uvx mcpo --port 8000 --api-key "remplacez-moi" -- uvx mcp-server-time --local-timezone=Europe/Paris

# La documentation interactive est ensuite servie sur :
# http://localhost:8000/docs

#Prerequisites

A recent Open WebUI
A version that shows the “MCP (Streamable HTTP)” type when you add a tool server. If it doesn't, update before continuing.
Admin account
Servers are declared in the admin settings; a regular user account doesn't see this menu.
A model provider
Ollama (on http://localhost:11434 by default) or an OpenAI-compatible API, already connected to Open WebUI.
A Streamable HTTP MCP server
Your own or an existing server, reachable from the Open WebUI machine or container. Step 1 provides a minimal Python example.
A stable session key
If you plan to use an OAuth-protected server, set WEBUI_SECRET_KEY persistently: the documentation warns that a key regenerated on restart invalidates stored tokens.
Terminal — Open WebUI in Docker with a persistent key
# Générer une clé une fois, puis la conserver (gestionnaire de secrets, fichier .env…)
openssl rand -hex 32

docker run -d -p 3000:8080 \
  --add-host=host.docker.internal:host-gateway \
  -e WEBUI_SECRET_KEY="collez-la-cle-generee" \
  -v open-webui:/app/backend/data \
  --name open-webui \
  ghcr.io/open-webui/open-webui:main

#Step 1: Set up a local MCP server using Streamable HTTP

If you already have a Streamable HTTP MCP server, just note its full URL (including the path, often /mcp) and skip to step 2. Otherwise, here's a deliberately minimal server built with the official Python SDK. It exposes only a single read-only tool, with no disk or network access: the right format for validating the chain before you hook up anything sensitive.

Terminal — installing the MCP Python SDK
python -m venv .venv
source .venv/bin/activate
pip install "mcp[cli]"
serveur_mcp.py
from mcp.server.fastmcp import FastMCP

# Nom affiché côté client
mcp = FastMCP("outils-texte")


@mcp.tool()
def compter_mots(texte: str) -> int:
    """Compte les mots d'un texte (séparation sur les espaces)."""
    return len(texte.split())


if __name__ == "__main__":
    # Streamable HTTP : par défaut 127.0.0.1, port 8000, chemin /mcp
    mcp.run(transport="streamable-http")
Terminal — start the server
python serveur_mcp.py
# URL attendue (valeurs par défaut du SDK) : http://127.0.0.1:8000/mcp

Default values (host, port, path) depend on the SDK version: check the startup logs rather than assuming the URL. Before you even open Open WebUI, you can check the server with MCP Inspector, the protocol's official debugging tool: choose the Streamable HTTP transport, enter the URL, and list the tools.

Terminal — inspect the server (requires Node.js)
npx @modelcontextprotocol/inspector
!
Docker: localhost isn't your machine
If Open WebUI runs in a container, "localhost" refers to the container itself. You need to target the host instead, for example http://host.docker.internal:8000/mcp with the --add-host option shown above. A server that listens only on 127.0.0.1 on the host side won't be reachable in that case: you need to expose it on the Docker bridge interface, or put both services on the same Docker network. Never listen on 0.0.0.0 without a firewall that blocks outside access.

#Step 2: Add the MCP server in the admin settings

  1. 01
    Open the admin settings
    Account menu, then Admin Panel, Settings. Look for the external tools section (“External Tools” in the English interface).
  2. 02
    Add a server
    Click the “+” button to add a tool connection.
  3. 03
    Choose the MCP (Streamable HTTP) type
    Don't leave the type set to the OpenAPI default: an MCP server declared as OpenAPI won't be understood, and vice versa.
  4. 04
    Enter the URL and authentication
    Full URL including the path (for example, http://host.docker.internal:8000/mcp). For authentication: none for a strictly local test server, a Bearer token for an internal server, or OAuth 2.1 if the server requires it.
  5. 05
    Save
    Save the connection. If the interface asks you to, restart Open WebUI so the connection takes effect.

Give the connection an explicit name and description (“Text tools, read-only” rather than “mcp1”): that's what other admins will see, and it keeps you from leaving active a server whose purpose nobody remembers.

#Step 3: Choose a model capable of calling tools

An MCP server is useless if the model can't emit a clean tool call. Not all open-weight models are trained for tool calling, and a small model may invent a tool name, omit an argument, or answer without calling the tool at all. On the Ollama side, the official library flags compatible models with the “tools” tag.

Function calling mode
In the model's (or chat's) advanced parameters, the Function Calling setting offers a “Native” mode that relies on the model's tool support. The documentation recommends it for models that handle tools; the default mode is prompt-based and suits models without native support, with lower reliability.
Size and memory
A model that's too small handles tool schemas poorly. Memory guidelines at Q4_K_M: about 5 GB for a 7B, 9 GB for a 14B, 19 GB for a 32B. A 12 GB card (RTX 3060, RTX 4070) can fit a 14B; 24 GB (RTX 4090) opens up models around 32B.
Context
Each enabled tool adds its description to the context. With many tools and a short window, the model loses track: enable only what the conversation needs.

We don't publish a model ranking for MCP use: without a documented test protocol, it would be an impression passed off as a measurement. The most reliable approach is still to check for yourself, on your own tools, with the next step.

#Step 4: Check the list of exposed tools

Verification happens in two stages: what the server exposes, then what Open WebUI actually offers the model. A mismatch between the two almost always points to a wrong URL, connection type, or authentication setting.

  1. 01
    Compare with the server's inventory
    List the tools in MCP Inspector (step 1). Note their names and descriptions: that's your reference.
  2. 02
    Enable the server in a conversation
    In the input area of a new chat, open the tools and integrations menu (the “+” icon or equivalent, depending on the version) and check the server. You can also attach it to a model by default under Workspace, Models, Tools section.
  3. 03
    Check the names
    The listed tools must match the inventory. Fix a missing tool, or an empty list, before writing any prompt.
  4. 04
    Make an explicit call
    Ask a question that forces the model to use the tool, for example “Use the compter_mots tool on this sentence: …”. Then expand the call details shown in the response to see the arguments sent and the result returned.
  5. 05
    Compare with the server logs
    Every real call leaves a trace on the server side. If the model claims it used the tool but the server received nothing, the answer is fabricated: switch models or switch to Native mode.
→
A test tool before the useful tools
Keep a trivial, deterministic tool such as compter_mots on a staging server. You can check its output in your head: it's the fastest way to tell a connection problem from a model problem after updating Open WebUI or Ollama.

#Step 5: restrict permissions

An MCP tool acts with the permissions of the server that runs it, not those of the person chatting. A tool that reads a folder will read everything the server's account can read, regardless of which Open WebUI user calls it. Security is therefore handled at three levels.

On the MCP server side
As few tools as possible, read-only by default. A dedicated system account, without sudo, limited to the single folder or database it needs. No generic “run a command” tool.
On the network side
Listen on 127.0.0.1 or on an internal Docker network. No port forwarding to the internet. Use a Bearer token, even locally, as soon as the machine is shared.
On the Open WebUI side
In the user and group settings, restrict tool access to the groups that need it and disable tool creation or import d for everyone else. Attach the server to a specific model rather than leaving it available everywhere. The exact permission labels vary by version.
On the usage side
For any tool that writes, sends, or deletes, keep a human approval step outside the model: a reviewed output folder, a queue, a Git branch.
!
Tool results are untrusted input
Text returned by a tool (a web page, an email, a document) enters the model's context. If it contains instructions, the model may follow them and trigger other tools: this is indirect prompt injection. Don't combine, in the same conversation, a tool that reads external content and a tool that takes action (writing, sending, deleting).

On privacy: connecting a local MCP server guarantees nothing by itself. If the model is served by a remote API, tool arguments and results are sent to that provider along with the rest of the conversation. To keep data on the machine, you need both a local model (Ollama) and a local MCP server that doesn't contact any external service itself.


#Troubleshooting

Connection refused or timed out
Test the URL from where Open WebUI runs, not from your workstation. With Docker: docker exec into the container, then make a call to the server URL. Most often, it's the localhost pitfall described in step 1.
Empty tool list
Check the type (MCP, not OpenAPI), the full path (/mcp), and that it really is a Streamable HTTP server, not SSE or stdio.
Host or origin rejected error
Some MCP SDKs reject requests whose Host or Origin header isn't allowed (protection against DNS rebinding). Add the host used by Open WebUI (for example host.docker.internal) to the server's allowlist, as described in your SDK's documentation, rather than disabling the protection.
OAuth tokens lost after restart
WEBUI_SECRET_KEY isn't set or changes on every startup. Set it, restart, then redo the authorization.
The model never calls the tool
Model without tool support, unsuitable Function Calling mode, tool not checked in the conversation, or too many active tools for the context window.
Inconsistent arguments
Improve the parameter descriptions and types on the server side: the model sees only what the schema describes.

#Limitations and sources

This guide describes a documented procedure, not a hands-on report: it makes no claims about call duration, success rate, or model comparisons. MCP support in Open WebUI is evolving quickly; reread the official page before deploying to production and record the version you use in your own internal documentation.

Open WebUI documentation, MCP
https://docs.openwebui.com/features/extensibility/mcp/ (consultée le 30/10/2026).
MCP specification
https://modelcontextprotocol.io/: transports, dont Streamable HTTP, et recommandations de sécurité.
mcpo
https://github.com/open-webui/mcpo: pont entre un serveur MCP (stdio ou SSE) et une API OpenAPI.
MCP Python SDK
https://github.com/modelcontextprotocol/python-sdk: FastMCP et transport streamable-http.

#Go further

MCP and a local LLM with Ollama
The companion guide: protocol fundamentals and MCP clients outside Open WebUI (/guide/mcp-serveurs-llm-local-ollama).
Function calling with Ollama
Understand how a model produces a tool call and structured JSON output (/guide/ollama-function-calling-sorties-json).
Managing access in Open WebUI
Groups, permissions, and document sharing, to apply the same least-privilege logic (/guide/open-webui-groupes-acces-documents).
Did this guide help you?

Feedback, an error, or a clarification? Let us know—it improves the guide for everyone.