openwebui-mcp-server
Connects Claude to Open WebUI, enabling chat management, RAG knowledge bases, files, functions, and prompts directly from Claude.
README
Open WebUI MCP Server
Connect Claude Code and Claude Desktop to your Open WebUI instance. Manage chats, RAG knowledge bases, files, functions, and prompts — directly from Claude.
What This Does
Open WebUI is a powerful self-hosted AI interface — but until now, you couldn't interact with it from Claude. This MCP server bridges that gap.
Once connected, Claude can search your chat history, build RAG knowledge bases from files you describe, create custom pipeline functions, and manage prompts — all without leaving your conversation.
Who it's for: Claude Code users, Claude Desktop users, AI developers, and Open WebUI power users who want Claude to help manage their AI infrastructure.
Quick Start
Claude Code (3 commands)
# 1. Get your API key from Open WebUI: Settings → Account → API Keys
# 2. Add the MCP server
claude mcp add openwebui \
-e OPENWEBUI_URL=http://localhost:3000 \
-e OPENWEBUI_API_KEY=sk-your-key-here \
-- npx -y openwebui-mcp-server
# 3. Verify it's connected
# In Claude Code, run: /mcp
Claude Desktop
Paste this into your claude_desktop_config.json:
{
"mcpServers": {
"openwebui": {
"command": "npx",
"args": ["-y", "openwebui-mcp-server"],
"env": {
"OPENWEBUI_URL": "http://localhost:3000",
"OPENWEBUI_API_KEY": "your-api-key-here"
}
}
}
}
Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Available Tools (23 total)
Chats
| Tool | Description |
|---|---|
openwebui_list_chats |
List recent conversations, paginated |
openwebui_search_chats |
Search chat history by keyword |
openwebui_get_chat |
Get full chat with all messages |
openwebui_delete_chat |
Delete a chat (requires confirm) |
openwebui_get_chat_tags |
List all tags used across chats |
Knowledge Bases (RAG)
| Tool | Description |
|---|---|
openwebui_list_knowledge |
List all knowledge base collections |
openwebui_get_knowledge |
Get collection details and file list |
openwebui_create_knowledge |
Create a new collection |
openwebui_update_knowledge |
Update name or description |
openwebui_add_file_to_knowledge |
Add uploaded file to a collection |
openwebui_remove_file_from_knowledge |
Remove file from a collection |
Files
| Tool | Description |
|---|---|
openwebui_list_files |
List all uploaded files |
openwebui_upload_file |
Upload file (base64 content) |
openwebui_get_file_info |
Get file metadata |
openwebui_delete_file |
Delete a file (requires confirm) |
Functions (Pipes, Filters, Actions)
| Tool | Description |
|---|---|
openwebui_list_functions |
List all functions by type |
openwebui_get_function |
Get function with source code |
openwebui_create_function |
Create a new Python function |
openwebui_update_function |
Update function code or metadata |
openwebui_delete_function |
Delete a function (requires confirm) |
Models
| Tool | Description |
|---|---|
openwebui_list_models |
List all available models |
Prompts
| Tool | Description |
|---|---|
openwebui_list_prompts |
List all saved prompts |
openwebui_create_prompt |
Create a new saved prompt |
openwebui_update_prompt |
Update prompt title or content |
openwebui_delete_prompt |
Delete a prompt (requires confirm) |
System
| Tool | Description |
|---|---|
openwebui_get_status |
Check health, version, and config |
Configuration
| Variable | Required | Description |
|---|---|---|
OPENWEBUI_URL |
Yes | Base URL (e.g. http://localhost:3000) |
OPENWEBUI_API_KEY |
Yes | Bearer token from Settings → Account → API Keys |
DEBUG |
No | Set to openwebui-mcp to log HTTP requests to stderr |
Examples
Build a RAG knowledge base
"Create a knowledge base called 'Security Runbooks' for incident response docs"
→ openwebui_create_knowledge(name: "Security Runbooks", ...)
Knowledge base created. ID: abc-123
"Upload this runbook and add it to Security Runbooks"
→ openwebui_upload_file(filename: "incident-response.md", ...)
→ openwebui_add_file_to_knowledge(knowledge_id: "abc-123", file_id: "xyz-456")
File added. Now available for RAG retrieval.
Search and review conversations
"Search my chats for any discussion about Kubernetes networking"
→ openwebui_search_chats(query: "kubernetes networking")
Found 3 chats: [list of results]
"Show me the full conversation from last week about DNS issues"
→ openwebui_get_chat(id: "...")
[Full conversation displayed]
Create a reusable prompt
"Create a prompt /standup that generates a standup update from {{input}}"
→ openwebui_create_prompt(
command: "/standup",
title: "Daily Standup",
content: "Generate a concise standup update from these notes: {{input}}"
)
Prompt created. Type /standup in any Open WebUI chat to use it.
Install a custom pipe function
"Create a pipe function that translates all responses to French"
→ openwebui_create_function(
id: "french_translator",
name: "French Translator",
type: "filter",
content: "# Python code..."
)
Function created. Enable it in Settings → Functions.
Requirements
- Node.js >= 18.0.0
- Open WebUI >= 0.3.0 (any self-hosted install)
- API key from Open WebUI Settings → Account → API Keys
Contributing
See CONTRIBUTING.md for guidelines.
Issues and PRs welcome — especially for new API endpoints added in newer Open WebUI versions.
License
MIT — see LICENSE
Built by Marc — cybersecurity and automation infrastructure at CyberLeda
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。