How to connect MCP tool servers to Open WebUI
A team that wants chat users to call internal tools through Open WebUI needs to know two things first: MCP tool servers connect over streamable HTTP with OAuth 2.1, and administrators decide which servers are added to the instance. End users cannot attach a server from their own settings, so this is an administrative integration before it is a user feature. That decision shapes the rest of the setup, including who approves a server, how its access is reviewed and what happens when an internal API changes. Treat the first server as a pilot that proves the authorization path, the tool list and the logging before more servers follow.
The integration works in three parts. An administrator registers the MCP server endpoint and its OAuth 2.1 settings in the Open WebUI admin area, Open WebUI loads the tools that server publishes, and models in chat can then call those tools when a conversation calls for them. The server's exposure is only as narrow as the server itself, so scope the tools on the internal side before registration, and keep read and write operations on separate servers where the owning team agrees. This differs from OpenAPI tool servers that users can add themselves, which is why the MCP path belongs in an admin-controlled workflow. Confirm in the documentation for your release where registration lives, which OAuth 2.1 fields it requires and whether access can be limited by group.
What the integration does not do matters as much. It does not give end users a way to add servers, change endpoints or view configuration. It also does not, by itself, decide what an individual user may do inside the internal system behind a tool. Confirm how the OAuth 2.1 flow identifies the user to the target service, whether tokens are issued per user or per server, and what the internal API logs for each call. Session behavior needs a check before multiple replicas go live. The scaling documentation notes that without Redis, signing out does not revoke tokens, which stay valid until they expire, by default after 4 weeks. Plan that expiry together with the token lifetime on the MCP server.
Ownership should sit with the platform team that runs Open WebUI, because that team controls registration, admin settings and the deployment environment. The security team should approve each server's scope, its OAuth client and the group permissions that expose its tools. The owners of each internal API remain accountable for what their tool does, its rate limits and its error handling. Before the first registration, decide which identity provider signs users in, confirm the documented requirement for the WEBUI_SECRET_KEY setting and make sure it is set consistently on every instance. Record these owners in the change process so that each later tool addition has a named approver.
What you need before adding an MCP server
Confirm these items before you register an MCP tool server in Open WebUI. Each one decides whether the connection works on the first attempt and whether it keeps working after an upgrade. Check every item against your own environment and against the vendor documentation for the release you plan to run.
Open WebUI release and MCP support
Pick the release you will run, then confirm in its documentation that it supports MCP tool servers over streamable HTTP with OAuth 2.1. Feature sets change between versions, so do not rely on older blog posts or forum answers. The project's GitHub releases page lists v0.12.3, published October 16, 2026, but confirm what your chosen version includes before you plan around it. Also confirm which license applies, since the Open WebUI License covers releases from v0.6.6 onward.
Install method and deployment shape
Choose one of the documented install methods: Docker or Docker Compose, Kubernetes with Helm, or pip install open-webui followed by open-webui serve. A single instance can use SQLite only when the database file sits on locally attached SSD or NVMe storage. Multiple replicas need PostgreSQL, Redis for shared state and shared file storage, and an external vector database, because the default ChromaDB is not suited to multi-process setups. Settle this before you register servers, since moving the database later is migration work.
MCP endpoint and OAuth 2.1 authorization server
Identify the streamable HTTP endpoint URL of the MCP server and the OAuth 2.1 authorization server it trusts. Confirm the grant types, scopes, token lifetimes and client registration method that the server requires, and whether Open WebUI must be registered as a client. Confirm the redirect URI that the sign-in flow uses. Ask the server's maintainer for a test account or client credentials so you can verify token issuance before any user depends on the connection.
Network paths and certificates
Map the route from the Open WebUI host to the MCP endpoint and to the authorization server, including proxies, egress firewall rules and DNS records. Both servers must present certificates that the Open WebUI runtime trusts, so confirm the full chain and any private certificate authority are installed where the outbound call is made. Check that each user's browser can also reach the authorization server for sign-in redirects. Test from the same container or network segment that Open WebUI uses.
Admin account and secret key
Prepare a named administrator account for setup, separate from shared or service logins, because only admins can add MCP tool servers. Check the release documentation for the WEBUI_SECRET_KEY requirement, then set it from your secrets store before the first start. Keep the same value across restarts and replicas so that sessions and stored credentials remain valid. Record who holds admin rights so that changes to tool server connections always trace back to a known person.
How MCP differs from user-added OpenAPI tool servers
The core difference is who approves a connection and who holds the credentials behind it. In Open WebUI, an MCP tool server is added by an administrator, so the connection is approved once for the instance and every user granted access inherits that decision. A user-added OpenAPI tool server is a personal connection. The user supplies the endpoint and any authentication it needs, and the tools are available to that user's own chats. Both models give a language model new actions to take, so for a shared company deployment the question is not only which tool runs but who authorized the endpoint, which credential it uses, and whose data flows through it. Confirm these behaviors in your release, because the settings that control them can change between versions.
Credential handling is where the two models diverge most. An administrator adds an MCP server over streamable HTTP and authenticates it with OAuth 2.1, so the client registration and token lifecycle are set up centrally. Before go-live, confirm where those client details and tokens are stored, whether each user's tokens are kept separate from the administrator's, and what happens when a user signs out. Two points matter here. First, WEBUI_SECRET_KEY must be set and kept consistent across the deployment, and you should confirm in the configuration documentation what it protects in your version. Second, the scaling guidance states that without Redis, signing out does not revoke tokens, which remain valid until they expire, by default after 4 weeks. A multi-replica deployment without shared session state therefore has a longer exposure window for any token that leaks.
Visibility and use follow the same split. An MCP server added by an administrator can be made available to specific groups through Open WebUI's role-based access control, which supports groups and per-resource permissions. Confirm whether the tool list and the server configuration are visible to users who only have use permission. A user-added OpenAPI server is visible only to the person who created it, which limits blast radius but also means IT has no central inventory of which endpoints staff have connected, which keys they pasted into personal settings, or which company data those endpoints received. Ask your team to confirm what the audit logs record for each type of connection, and whether a tool added by a user can be seen or revoked by an administrator. If the answer is no, treat personal tool servers as unmanaged integrations.
Choose the administrator-managed MCP path when a tool touches company systems, uses shared credentials, or must be reviewed by a named owner before anyone relies on it. The risk is concentrated: a misconfigured or over-broad server is exposed to every group granted access at once, so the approval step needs a documented owner, a list of the tools it exposes, and a data classification for what those tools can read or change. Consider a user-added OpenAPI server only for personal work on non-sensitive data, or where the endpoint is one the user already controls. Where your release allows administrators to restrict user-added tool servers, decide that policy before rollout and confirm it with a test account. Write down, for each proposed tool, who approves it, who holds its credentials, and who can use it.
Configuring MCP servers in the correct order
This sequence takes an MCP tool server from registration to group-level access in Open WebUI. Each step depends on the one before it, so an error early in the order usually appears later as a failed connection or a missing tool list. The result is a server that administrators control and that users reach only through the groups you assign.
Set WEBUI_SECRET_KEY before first start
Generate one secret value and set WEBUI_SECRET_KEY in the environment before Open WebUI starts for the first time. Keep the same value across restarts, upgrades and every replica, because changing it can invalidate sessions and the tokens tied to them. Your platform engineer sets this, and the check is that the value is stored in your secrets manager and the instance restarts with the same setting. Confirm the exact behavior for your release in the official documentation before you change it on a live system.
Register the OAuth 2.1 client
Your identity or authorization team creates an OAuth 2.1 client on the MCP server's authorization server for Open WebUI, using the callback address your Open WebUI instance uses. Record the client identifier and secret, and store the secret only in your secrets manager. The check is a successful token request from the authorization server, confirming the client is recognized and the scopes are issued as the MCP server documents. Confirm the supported grant type and scopes with the MCP server's vendor before you register the client, since the authorization server defines what is allowed.
Add the MCP server as administrator
An administrator adds the streamable HTTP endpoint of the MCP server in the Open WebUI admin settings, entering the client details from the previous step. Only administrators can add MCP servers, so this step stays with the admin role and is not delegated to end users. The check is that the server appears in the admin list with a configured status and that no tools are yet exposed to regular users. Confirm the settings location in the documentation for your release.
Complete the authorization flow
Sign in as an administrator and run the authorization flow the MCP server requires, approving the consent screen from the authorization server. Open WebUI stores the resulting token for the connection, so this step confirms that the callback address, client identifier and secret all match. The check is that the server reports a connected status and the tool list loads in the admin view. If the callback fails, compare the redirect address on both sides before changing anything else.
Assign access to groups
Select or create the groups that should use the MCP tools and grant the server access to those groups only, using Open WebUI's group and per-resource permissions. Keep the grant narrow at first so a small pilot group can test before wider rollout. The check is that a test account in a permitted group sees the tools, and a test account outside the group does not. If you provision users and groups through SSO or SCIM, confirm that the group names from your identity provider map to the groups you assign here.
Test sign-out and token revocation
Sign in as a test account, confirm the tool list loads, then sign out and reuse the earlier session in a browser to confirm access ends as expected. The scaling documentation states that without Redis, signing out does not revoke tokens, which stay valid until they expire, by default after 4 weeks. For a multi-replica deployment, confirm Redis is in place before you accept this step. The check is a recorded result for each replica and each test account.
Which roles can add servers and how OAuth 2.1 tokens map
This table maps the administrators, groups, MCP server scopes, identity provider accounts and token storage that decide who can register an MCP tool server in Open WebUI and whose access each tool call carries. Read each row as a decision to record before rollout. Confirm every row against the Open WebUI permission model and the MCP server's documentation for your release, because role names and token behavior can change between versions.
| Actor or object | What it controls | What to confirm in your version |
|---|---|---|
| Administrator | Only admins can register an MCP server, set its URL and configure its OAuth 2.1 settings. | Whether the admin role can be delegated to others, and which users hold it today. |
| Groups and roles | Per-resource permissions decide which users or groups can select a registered server in chat. | The exact permission names, and whether access is granted per server or per model. |
| MCP server OAuth 2.1 scopes | Scopes define what a delegated token may call on the MCP server. | The scope names your server publishes, and whether Open WebUI requests all of them or a subset. |
| Identity provider account | The signed-in user whose consent and identity the delegated token represents. | Whether consent is per user, and whether the provider is the same OIDC source used for sign-in. |
| Token storage | Where access and refresh tokens are held, and what protects them at rest. | Storage location, encryption, and whether WEBUI_SECRET_KEY is involved in protecting them. |
| Token lifetime and revocation | Session tokens default to 4 weeks, and without Redis, sign-out does not revoke them. | Whether MCP tokens follow the session default, and how revocation behaves across replicas. |
| Shared or personal connection | Decides whether all group members share one server connection or each user authenticates separately. | Whether the server supports per-user tokens, and how a shared credential is rotated. |
Why multi-replica deployments need Redis and PostgreSQL first
Before you run a second Open WebUI instance, you need PostgreSQL as the database and Redis as a shared state store. The scaling guide requires PostgreSQL for multi-instance deployments because SQLite does not handle concurrent writes from multiple processes well. Redis holds the state that every replica must see, including sessions, websocket connections and application state. Shared file storage is also required so uploads and knowledge stay reachable from every replica. The guide adds one more constraint: the default ChromaDB will crash in multi-process setups, so an external vector database must be in place when you run several workers or replicas. Treat these as prerequisites for the design, not as tuning options to add after go-live.
Redis matters most for sign-out and token lifetime. Without Redis, signing out does not revoke tokens. They stay valid until they expire, which is by default after 4 weeks. For MCP tool servers, this means a token a user obtained through Open WebUI can remain usable after that user has signed out, and a replica that never received the sign-out event will keep honoring it. A security team will expect that signing out, disabling an account or removing a user from a group ends access promptly. A multi-week validity window does not meet that expectation. Confirm the token lifetime setting for your release, and decide whether a multi-week window is acceptable before you approve the design.
Test the revocation behavior before anyone relies on it. In a staging environment with two replicas, sign in, connect an MCP server, sign out, and then replay the token against the MCP connection through the other replica. Run the same test with Redis present and absent so the difference is documented. Record the result, the release version and the configured token lifetime in your change record. If the test fails, the fix is architectural, so resolve it before production traffic arrives, not during an incident.
SQLite has a narrow place in this design. The scaling guide accepts it for single-replica deployments, evaluation and small teams, and only when the database file sits on locally attached SSD or NVMe storage. A database file on network-attached storage is outside that guidance. Moving an existing SQLite installation to PostgreSQL and a second replica is a migration with its own data validation and rollback plan, so schedule it as a project. Ask your platform team to confirm the storage class for any single-replica SQLite host, and ask whether the database file is on local disk.
Securing the WEBUI_SECRET_KEY and token lifecycle
These six controls cover the signing secret, the people who can change MCP tool servers, the scope of each OAuth 2.1 grant, and how tokens expire, get revoked and leave a record. Each one can be checked in your own environment before go-live. The Open WebUI License branding clause does not change any of these controls.
Generate and store the secret key
Generate WEBUI_SECRET_KEY with a cryptographically secure random generator and a long value. Load it from your secrets manager at container start, and keep it out of Compose files, Helm values and images. Verify that the value does not appear in Git history, image layers or shared configuration, and that only the Open WebUI service identity can read it. Confirm the exact requirements in the Open WebUI documentation for your version.
Plan rotation and its effects
Record who owns the key, how often it changes and the step-by-step procedure for replacing it. Before the first rotation, confirm in your version's documentation which sessions, tokens and stored credentials a new value invalidates. Test the procedure on a staging copy with the same authentication settings, then schedule a maintenance window and warn users if sessions will end. Keep the previous value in the vault until the rollout is confirmed.
Limit administrator accounts
Only administrators can add MCP tool servers, so every admin account can change which systems users reach. Keep the admin role to a small, named group and assign it through identity provider groups managed by your identity team. Require authenticator-app MFA for each admin account. Check that regular users cannot register servers and that no shared or generic admin accounts remain.
Scope OAuth 2.1 permissions to the tool
List the operations each MCP server needs before you register it, then configure the OAuth 2.1 client to request only those scopes. Review the consent screen and the granted scopes for each server, and confirm the authorization server rejects scope requests outside the approved list. Register read-only and write-capable servers separately so that a write-capable token cannot be used for read operations.
Test token expiry and revocation
The Open WebUI scaling guide states that without Redis, signing out does not revoke tokens, which stay valid until they expire, by default after 4 weeks. In multi-replica deployments, sign out, then confirm the MCP token is rejected on every replica. If your version supports a shorter token lifetime, test with it. Also confirm that disabling a user in your identity provider stops new tool calls.
Log every MCP tool call
Record the user, MCP server, tool name, timestamp and outcome for each call, and store the record where Open WebUI administrators cannot edit it. Confirm which events your version emits, and check that logs exclude secret values, OAuth tokens and tool arguments containing personal data. Agree retention with your compliance owner, then send a test call from a test user and confirm it appears in your log platform.
How to verify each MCP server before users rely on it
Run this test plan on every MCP server before anyone outside the admin team uses it, and record each result against the server name, its endpoint, its version and the Open WebUI version it was tested on. Start with the connection. Confirm that Open WebUI completes the handshake with the server over streamable HTTP, and that the OAuth 2.1 authorization flow finishes against the identity provider you configured. Then confirm that the server refuses requests that carry no token or an invalid token. Ask the server owner which scopes the server requests and which it needs, and check that the two lists match. A server that connects but accepts unauthenticated calls should not move past this step.
Next, list the exposed tools as Open WebUI displays them after the connection succeeds. Compare that list with the tool list in the server's documentation and with the tools your team has approved. Any tool that is not on the approved list should be disabled or should block the release. Then run one read-only call and one write call, both inside a test group rather than for all users. For the write call, use a disposable test record created for this purpose. Check that the result matches what the tool describes, and check the logs on both the server side and the Open WebUI side to confirm the call was recorded where your audit process expects it.
Access control needs its own checks because the server is only as safe as the people who can change it. Sign in as a non-admin test user and confirm that the user cannot add a server, edit an existing server or change its settings. Confirm that a user outside the test group cannot see or call the tools. Then test the session lifecycle. Sign out, and reuse the token from the earlier session to confirm that the server rejects it. The scaling guide states that without Redis, sign-out does not revoke tokens, which means they stay valid until they expire, by default after 4 weeks. Confirm whether your deployment uses Redis, confirm the token lifetime you have actually configured, and test expiry in a test environment if the lifetime can be shortened there. Ask the platform owner to confirm these values in writing.
Test accounts and sample data should mirror production groups, including group names, roles and memberships, so that permission results carry over to real users. The records behind them must be synthetic. Do not point test servers at copies of customer, patient or employee data, and keep test data in a separate instance or tenant where possible. Repeat the full plan after every Open WebUI upgrade and after any change to an MCP server, including a version change, a new endpoint, altered scopes or a changed tool list. Upgrade rounds can be shorter, but they must always include the handshake, the tool inventory and the non-admin access check. Keep the dated results as evidence for your change records.
Common MCP connection failures and their causes
This table lists the connection failures teams most often hit when adding MCP tool servers to Open WebUI, with the likely cause, the first check and the fix for each. Read it from the top when a connection fails after deployment, and confirm the exact error text against the Open WebUI release you run, since messages change between versions. The main takeaway is that most failures trace to transport settings, the callback URL, the secret key or the replica setup before the tool server itself.
| Failure | Likely cause | Check first | Fix |
|---|---|---|---|
| Wrong transport or endpoint path | The server exposes a different transport or path than the streamable HTTP endpoint configured in Open WebUI | The server's documented endpoint and the URL entered in the admin connection settings | Correct the transport and path, then retest from the admin screen before granting group access |
| OAuth 2.1 redirect URI mismatch | The callback URL registered with the authorization server differs from the one Open WebUI sends | Scheme, host, port and path of the registered redirect URI against the Open WebUI callback | Register the exact callback URL, then repeat sign-in. Confirm the callback format for your release |
| Missing or changed WEBUI_SECRET_KEY | The key is absent or differs between restarts or replicas, so stored tool credentials cannot be read | Whether WEBUI_SECRET_KEY is set and identical on every instance and in your secrets store | Restore the original key. If it was changed on purpose, re-enter stored tool credentials |
| Tokens persist after sign-out in multi-replica setups | No Redis shared state, so sign-out does not revoke tokens held by other replicas | Whether Redis is configured for all replicas and the token lifetime in your release | Add Redis as shared state. Until then, tokens remain valid until expiry, by default 4 weeks per the scaling guide |
| Server visible to the wrong group | The server was assigned to a broader group than intended, or to the wrong group entirely | Group membership of test accounts and the access settings on the server | Limit access to the intended groups, then test with one account from each group |
| TLS trust errors | The certificate authority that issued the tool server certificate is not trusted inside the Open WebUI runtime | The certificate chain the tool server presents and the CA bundle in the Open WebUI container or host | Install the internal CA into the runtime trust store, restart, and retest. Avoid disabling certificate verification |
What does an MCP integration cost and how long does it take?
What drives the cost of an MCP integration in Open WebUI?
The main drivers are the number of MCP servers, the authorization model of each one, the number of groups and replicas that will use them, and the depth of testing. Each server adds its own OAuth 2.1 client setup, redirect handling, scope definitions and owner review, so three servers with mixed authorization can take more work than ten simple ones. Groups matter because access rules must hold for every user type, and replicas matter because a multi-replica deployment needs shared Redis and PostgreSQL before MCP sessions behave consistently across instances. Testing depth changes the effort as well. A check that tools are listed is far smaller than testing denied calls per group, token expiry and failed refresh. Cost is set after written scoping, once these inputs are documented for each server.
How long does an MCP integration take from start to finish?
The timeline is set in the written scope, and it depends on the same drivers as cost. The number of servers, the authorization model of each one, and how many server owners must review the design are the largest factors. Scheduling dependencies often matter as much as build work: identity provider access must be approved, a test tenant must exist for each server, and production changes must fit an agreed change window. Replica count adds time when shared state and file storage need to be in place first. Ask for milestones that separate discovery, a pilot with one server, the remaining servers and handover, so the schedule can be checked against each dependency.
What must our team provide before an MCP integration starts?
Your team should provide four things: identity provider access, named server owners, a test tenant for each server, and a change window for production. Identity provider access lets the engineers register OAuth 2.1 clients and confirm scopes, token lifetimes and redirect addresses. Server owners confirm what each tool does, which scopes it needs and how its own authorization behaves, since these decisions cannot be inferred from the endpoint alone. A test tenant keeps testing away from production data and accounts. A change window covers the production connection and any restart needed to apply the WEBUI_SECRET_KEY setting consistently across the deployment. Request a named contact for each item in the scope so delays can be traced to a person.
Can one internal engineer integrate MCP tool servers alone?
A capable engineer who knows Open WebUI administration, OAuth 2.1 and the target servers can complete a single low-risk server alone, provided they can reach the identity provider, the server owner and a test tenant. For a wider rollout, the constraint is usually coordination rather than coding. Only administrators can add MCP servers in Open WebUI, so one accountable admin must own the configuration. The WEBUI_SECRET_KEY must be set consistently, and a multi-replica deployment also needs Redis and PostgreSQL in place. Teams often start with a pilot on one server, document the authorization pattern, and then decide which remaining servers to hand over internally and which to scope with a partner.
What should we request in a fixed-scope MCP integration quote?
A fixed-scope quote should list each server with its transport, authorization model, owner, intended groups, replica count and environments. It should also state the test cases per server, the acceptance criteria, the deliverables and the items explicitly excluded. Ask which dependencies sit with your team, such as identity provider access, test tenants and change windows, and how delays caused by those dependencies affect the timeline. Request the handover documents, the runbook for adding or removing a server, and the terms for any post-go-live support. DeployOpen agrees scope, deliverables and timelines in writing before work starts, so the quote should match that written scope line by line.
Which costs recur after an MCP integration goes live?
Most of the integration cost is one-time, covering scoping, configuration, testing and handover. Recurring work comes from change. A server owner may change tool schemas or scopes, which requires retesting the affected groups. Identity provider changes, such as rotated client secrets or altered token policies, need the MCP configuration checked. Open WebUI upgrades and new MCP server versions also require regression testing before rollout. Teams that want this covered can use a retainer for ongoing support, upgrades and testing. Ask the quote to separate one-time work from recurring items and to state what triggers each recurring task, so your budget owner can see where costs continue.
How does the authorization model change the effort for each server?
The authorization model decides how much design and testing each server needs. A server with no authorization is the simplest to connect, but it still needs access rules in Open WebUI so that only approved groups can reach its tools. A server using OAuth 2.1 requires client registration, redirect configuration, scope mapping, token refresh checks and tests for consent and revocation. A server that relies on shared service credentials needs secrets handling, rotation planning and clear ownership of those credentials. Confirm with each server vendor which flows and token types it supports, because the Open WebUI setup depends on that behavior and it should not be assumed from the product name.
How DeployOpen scopes and supports Open WebUI MCP integrations
DeployOpen plans, implements, documents and supports Open WebUI deployments inside your own infrastructure, including the MCP tool server connections your administrators manage. Each engagement starts from a written scope that names the MCP servers, identity provider and deployment method involved. The team that builds the connection also hands over the runbook your operators will use.
How we scope
- The written scope lists each MCP server, its owner, the data it can reach and who may add it.
- Scope confirms with each vendor whether the server supports streamable HTTP and OAuth 2.1 before build starts.
- Engagements are fixed-scope, agreed in writing before work starts, with ongoing support available as a retainer.
How we build
- Set WEBUI_SECRET_KEY to the same value on every instance and keep it in your secrets store.
- Configure admin-only server registration, then test OAuth 2.1 sign-in and token refresh for each MCP server.
- Document MCP servers separately from user-added OpenAPI tool servers, so operators know which path governs each tool.
How we hand over
- Handover includes a runbook for adding, rotating and removing MCP servers, written for your administrators.
- Your team receives configuration records, test results and the access model for who can add or change tool servers.
- A walk-through with your operators covers how to troubleshoot a failed MCP connection.
How we support
- Retainers can cover upgrades to newer Open WebUI releases and re-testing of MCP connections after each change.
- Confirm with your own team which MCP server versions and OAuth settings change before each Open WebUI upgrade.
- Use the release notes on GitHub to check changes before scheduling an upgrade.

