Overview
MCP provides:- Standardized protocol for AI-to-service communication
- Secure authentication and authorization
- Dynamic tool discovery
- Resource access (files, databases, APIs)
- OAuth 2.1 support for user-specific credentials
MCP is installed as part of Open WebUI. The
mcp Python package (version 1.26.0) is included in the requirements.What is MCP?
MCP (Model Context Protocol) is a standardized way for AI models to interact with external systems. It provides:- Tools: Functions that models can call to perform actions
- Resources: Data sources like files, databases, or API endpoints
- Prompts: Pre-defined prompt templates
- Authentication: Secure credential management
Configuring MCP Servers
Server Configuration
MCP servers are configured in the Open WebUI admin panel:1
Access Admin Settings
Navigate to Admin Panel → Settings → MCP Servers
2
Add Server Connection
Configure the server connection:
3
Configure Authentication
Choose authentication method:
4
Set Access Control
Define who can use the server:
Using MCP Servers
Listing Available Servers
MCP servers appear in the tools list with theserver:mcp: prefix:
Server Authentication Status
For OAuth-enabled servers, check authentication status:OAuth Authentication Flow
For OAuth 2.1 enabled servers, users need to authenticate:1
Initiate OAuth Flow
User clicks “Connect” in the UI for the MCP server
2
Authorize Access
User is redirected to the OAuth provider to grant permissions
3
Store Token
Open WebUI receives and stores the OAuth token for the user
4
Use Server
Server tools are now available with user-specific credentials
MCP Server Examples
File System Server
Provide access to local or cloud file systems:Database Server
Connect to SQL databases:API Gateway Server
Access external APIs through MCP:Access Control
MCP servers support granular access control:User-Based Access
Group-Based Access
Public Access
Tool Discovery
MCP servers dynamically expose their tools to Open WebUI:Security Considerations
Best Practices
- Authentication: Use OAuth 2.1 for user-specific access
- Authorization: Implement least-privilege access control
- Validation: Validate all data from external sources
- Monitoring: Log all MCP server interactions
- Encryption: Use TLS for all connections
- Secrets: Never hardcode credentials in configuration
Troubleshooting
Server Not Appearing
- Verify
enable: truein server config - Check access grants include your user/group
- Ensure server type is set to
"mcp" - Restart Open WebUI after configuration changes
Authentication Failures
- Verify OAuth credentials are correct
- Check token hasn’t expired
- Ensure redirect URIs are properly configured
- Review OAuth provider logs
Connection Errors
- Confirm server endpoint is accessible
- Check firewall rules
- Verify network connectivity
- Review server logs for errors