TO

troylar/open-webui-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

11 stars 8 forks 品質 70 トレンド 8MIT

Open WebUI を管理するための MCP サーバー - ユーザー、グループ、モデル、ナレッジベースなど

概要

Open WebUI の管理者 API をツールとして公開する MCP (Model Context Protocol) サーバーで、AI アシスタントがユーザー、グループ、モデル、ナレッジベースなどを管理することができます。 - : リスト、取得、更新ロール、削除ユーザー - : 作成、更新、追加/削除メンバー、削除グループ - : カスタムモデルの作成、システムプロンプトの更新、パラメータの管理 - : 作成、リスト、ナレッジベースを削除 - : リスト、ビュー、チャットの削除 - : 利用可能なツールと機能のリスト - : すべての操作は、ログインしたユーザーの許可を尊重します : このサーバは、ユーザ認証トークンを WebUI を開きます。 つまり: - 管理者操作には管理者 API キーが必要です - 通常のユーザーは自分のリソースにアクセスすることができます - すべての権限チェックは、Open WebUIのAPIによって強制されます オプションで、デフォルト API キーを設定 (要求ごとにオーバーライドできます): Claudeデスクトップコンフィグ(~/.config/claude/claude desktop config.json)に追加します。 2.

概要(AI 翻訳)

Open WebUI の管理者 API をツールとして公開する MCP (Model Context Protocol) サーバーで、AI アシスタントがユーザー、グループ、モデル、ナレッジベースなどを管理することができます。

##特徴

  • ユーザー管理: リスト、取得、更新ロール、削除ユーザー
  • グループ管理: 作成、更新、メンバーの追加/削除、グループ削除
  • モデル管理: カスタムモデルの作成、システムプロンプトの更新、パラメータの管理
  • ナレッジベース管理: 知識ベースの作成、リストの作成、削除 -チャット管理:チャットリスト、ビュー、削除
  • ツールと機能のディスカバリー:利用可能なツールと機能のリスト -Permission-Aware:すべての操作は、ログインしたユーザーの許可を尊重します

セキュリティ

重要: このサーバーは、ユーザーの認証トークンを WebUI を開きます。 つまり:

  • 管理者操作は管理APIのキーを要求します
  • 通常のユーザーは、自分のリソースにアクセスできる
  • すべての許可チェックは、Open WebUIのAPIによって強制されます

インストール

または紫外線と:

設定

必要な環境変数を設定します。

オプションで、デフォルト API キーを設定 (要求ごとにオーバーライドできます):

使用法

##Claudeデスクトップ付き

Claudeデスクトップコンフィグ(`~/)に追加します.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

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" } } } }