TO

troylar/open-webui-mcp-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

11 stars 8 forks 품질 70 트렌드 8MIT

MCP server for managing Open WebUI - users, groups, models, knowledge bases, and more

개요

An MCP (Model Context Protocol) server that exposes Open WebUI's admin APIs as tools, allowing AI assistants to manage users, groups, models, knowledge bases, and more. - : List, get, update roles, delete users - : Create, update, add/remove members, delete groups - : Create custom models, update system prompts, manage parameters - : Create, list, delete knowledge bases - : List, view, delete chats - : List available tools and functions - : All operations respect the logged-in user's permissions : This server passes through the user's authentication token to Open WebUI. This means: - Admin operations require admin API keys - Regular users can only access their own resources - All permission checks are enforced by Open WebUI's API Optionally, set a default API key (can be overridden per-request): Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json): 2.

README

원문 README의 일부입니다. 원문 보기.

Open WebUI MCP Server

An MCP (Model Context Protocol) server that exposes Open WebUI’s admin APIs as tools, allowing AI assistants to manage users, groups, models, knowledge bases, and more.

Features

  • User Management: List, get, update roles, delete users
  • Group Management: Create, update, add/remove members, delete groups
  • Model Management: Create custom models, update system prompts, manage parameters
  • Knowledge Base Management: Create, list, delete knowledge bases
  • Chat Management: List, view, delete chats
  • Tool & Function Discovery: List available tools and functions
  • Permission-Aware: All operations respect the logged-in user’s permissions

Security

Important: This server passes through the user’s authentication token to Open WebUI. This means:

  • Admin operations require admin API keys
  • Regular users can only access their own resources
  • All permission checks are enforced by Open WebUI’s API

Installation

pip install openwebui-mcp-server

Or with uv:

uv pip install openwebui-mcp-server

Configuration

Set the required environment variable:

export OPENWEBUI_URL=https://your-openwebui-instance.com

Optionally, set a default API key (can be overridden per-request):

export OPENWEBUI_API_KEY=your-api-key

Usage

With Claude Desktop

Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json):

{
  "mcpServers": {
    "openwebui": {
      "command": "openwebui-mcp",
      "env": {
        "OPENWEBUI_URL": "https://your-openwebui-instance.com",
        "OPENWEBUI_API_KEY": "your-api-key"
      }
    }
  }
}

With Open WebUI (via MCPO)

  1. Start the server in HTTP mode:
export OPENWEBUI_URL=https://your-openwebui-instance.com
export MCP_TRANSPORT=http
export MCP_HTTP_PORT=8001
openwebui-mcp
  1. Add as MCP server in Open WebUI:
    • Go to Admin Settings → External Tools
    • Add new MCP server with URL: http://localhost:8001/mcp

Programmatic Usage

from openwebui_mcp.client import OpenWebUIClient

client = OpenWebUIClient(
    base_url="https://your-openwebui-instance.com",
    api_key="your-api-key"
)

# List all users (admin only)
users = await client.list_users()

# Create a group
group = await client.create_group("Engineering", "Engineering team")

# Create a custom model
model = await client.create_model(
    id="my-assistant",
    name="My Assistant",
    base_model_id="gpt-4",
    meta={"system": "You are a helpful assistant."},
    params={"temperature": 0.7}
)

Available Tools

User Management

Tool Description Permission
get_current_user Get authenticated user’s profile Any
list_users List all users Admin
get_user Get specific user details Admin
update_user_role Change user role Admin
delete_user Delete a user Admin

Group Management

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "openwebui": { "command": "openwebui-mcp", "env": { "OPENWEBUI_URL": "https://your-openwebui-instance.com", "OPENWEBUI_API_KEY": "your-api-key" } } } }