mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[PR #16651] [CLOSED] Feat: MCP Client Framework with Dynamic oAuth 2.1 #24197
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/16651
Author: @elabbarw
Created: 8/15/2025
Status: ❌ Closed
Base:
dev← Head:mcp_feature📝 Commits (10+)
aa63646feat: implement MCP (Model Context Protocol) integration with server management, OAuth handling, and UI components06e1b7cchore: update CHANGELOG for MCP Framework features and add mcp dependency in pyproject.tomle726db4Removed mention of going to settings as MCP is now in Workspace.cdd6760Remove references to private fork8b69414fix versioning54f3898removed another reference56da884fix MCP server access control and validation logic, update UI to default access control for non-admins613b51dfix for public selection for admin: refactor MCP server access control logic to preserve explicit None for admins and remove default visibility sync in UIe69849dupdate OAuth flow to create permanent server directly and remove the complexity of managing temporary servers in Redis.e047d24post redis removal: enhance OAuth flow to immediately start authorization process and handle errors by cleaning up created servers📊 Changes
62 files changed (+11632 additions, -34 deletions)
View changed files
📝
.gitignore(+1 -0)📝
CHANGELOG.md(+7 -0)➕
MCP_IMPLEMENTATION.md(+164 -0)📝
README.md(+3 -1)📝
backend/open_webui/config.py(+14 -0)📝
backend/open_webui/main.py(+19 -1)➕
backend/open_webui/migrations/versions/5b1a2c3d4e5f_add_mcp_servers.py(+61 -0)➕
backend/open_webui/models/mcp_servers.py(+542 -0)📝
backend/open_webui/routers/configs.py(+39 -0)➕
backend/open_webui/routers/mcp_oauth.py(+665 -0)➕
backend/open_webui/routers/mcp_oauth_modules/__init__.py(+8 -0)➕
backend/open_webui/routers/mcp_oauth_modules/discovery_endpoints.py(+178 -0)➕
backend/open_webui/routers/mcp_oauth_modules/flow_endpoints.py(+259 -0)➕
backend/open_webui/routers/mcp_oauth_modules/management_endpoints.py(+304 -0)➕
backend/open_webui/routers/mcp_servers.py(+734 -0)➕
backend/open_webui/routers/mcp_tools.py(+245 -0)📝
backend/open_webui/routers/tools.py(+78 -4)📝
backend/open_webui/utils/access_control.py(+4 -2)📝
backend/open_webui/utils/auth.py(+32 -0)➕
backend/open_webui/utils/mcp/__init__.py(+34 -0)...and 42 more files
📄 Description
Please accept my humble contribution @tjbck . I appreciate everything that you've done for this community. It might not be 100% perfect but i think it's a good start!
Please let me know what's missing. I can start working on documentation and tests.
I'll submit this as a draft PR
Wanis
Pull Request Checklist
Target branch: Using Dev branch
Changelog Entry
Description
The MCP framework lets Open WebUI connect to external MCP servers and use their tools inside chats.
access_control: null), private ({}), or group‑shared.Added
Additional Information
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.