Sponsored by Deepsite.site

MCP Connector for Open WebUI

Created By
ivanuser9 months ago
Connect Open WebUI to MCP (Model Context Protocol) servers
Content

MCP Connector for Open WebUI

A Pipe Function for Open WebUI that connects to MCP (Model Context Protocol) servers, allowing you to use MCP-compatible models directly within Open WebUI.

Features

  • 🌐 Connect to multiple MCP servers simultaneously
  • 🔑 Support for API key authentication
  • 🧠 Automatic model discovery from MCP servers
  • 🔄 Support for streaming responses
  • 🛡️ Robust error handling and timeout management
  • 🔍 Debug mode for troubleshooting

What is MCP?

MCP (Model Context Protocol) is a protocol used for AI model interactions. It provides a standardized way to interact with various AI models, similar to the OpenAI API specification.

Installation

Method 1: Install from GitHub

pip install git+https://github.com/ivanuser/open-webui-mcp-connector.git

Method 2: Install through Open WebUI

  1. Navigate to Workspace > Functions in Open WebUI
  2. Click "Import Function"
  3. Enter the GitHub URL: https://github.com/ivanuser/open-webui-mcp-connector
  4. Click "Import"

Usage

Once installed, you'll need to configure your MCP servers:

  1. Navigate to Workspace > Functions in Open WebUI
  2. Find the "MCP Connector" function and click the edit (pencil) icon
  3. Configure your MCP servers in the "MCP_SERVERS" field using the JSON format:
[
    {
        "name": "MyMCP Server 1",
        "url": "https://mcp.example.com",
        "api_key": "your_api_key_here"
    },
    {
        "name": "MyMCP Server 2",
        "url": "https://another-mcp.example.com",
        "api_key": "another_api_key_here"
    }
]
  1. Click "Save"
  2. Enable the function by toggling the switch

After configuration, your MCP server models will appear in the model selection dropdown with the prefix "MCP/" (you can customize this prefix in the settings).

Configuration Options

OptionDescriptionDefault
NAME_PREFIXPrefix added to model names in the UI"MCP/"
MCP_SERVERSJSON array of server configurations"[]"
CONNECTION_TIMEOUTTimeout in seconds for server connections30
DEBUG_MODEEnable detailed debug loggingfalse

Server Configuration Format

Each server in the MCP_SERVERS array should have the following format:

{
    "name": "Display Name",
    "url": "https://server-url.example.com",
    "api_key": "optional_api_key"
}
  • name: A user-friendly name for the server (will appear in the UI)
  • url: The base URL of the MCP server (e.g., "https://mcp.example.com")
  • api_key: Optional API key for authentication

Troubleshooting

DNS Resolution Issues

If you encounter errors like "No address associated with hostname", check:

  1. The server URL is correct
  2. Your network can reach the server
  3. DNS resolution is working properly

Connection Timeouts

If connections are timing out:

  1. Increase the CONNECTION_TIMEOUT value
  2. Check if the server is under high load
  3. Verify network connectivity

Enable Debug Mode

For detailed logging, enable DEBUG_MODE in the function settings.

License

MIT License - See LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Playwright McpPlaywright MCP server
Serper MCP ServerA Serper MCP Server
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Tavily Mcp
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
WindsurfThe new purpose-built IDE to harness magic
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Amap Maps高德地图官方 MCP Server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
ChatWiseThe second fastest AI chatbot™
DeepChatYour AI Partner on Desktop