Visitors

OPEN WEBUI 에 MCP 추가하기

OPEN WEBUI 에 MCP 추가하기

사전설치

  1. node, npm
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y npm node
node -v
npm -v
  • node 는 20.19.2, npm은 10.8.2 버전 사용함
  1. python, uv, mcpo
sudo apt install python3.12-venv
python3.12 -m venv venv
pip install uv
uv pip install mcpo mcp-server-fetch mcp-server-time
  1. config.json
 {
    "mcpServers": {
      "fetch": {
        "command": "uvx",
        "args": ["mcp-server-fetch"]
      },
      "time": {
        "command": "uvx",
        "args": ["mcp-server-time", "--local-timezone=Asia/Seoul"]
      },
    "sequential-thinking": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sequential-thinking"
      ]
    },
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-brave-search"],
      "env": { "BRAVE_API_KEY": "YOUR BRAVE_API_KEY" }
    },
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "~/mcpo/tmp"
      ]
    },
    "terminal": {
      "command": "npx",
      "args": [
        "-y",
        "@dillip285/mcp-terminal"
      ],
      "config": {
        "allowedCommands": [
          "npm",
          "npx",
          "node",
          "git",
          "python",
          "pip",
          "pipx",
          "pipenv",
          "poetry",
          "pytest",
          "tox",
          "flake8",
          "pylint",
          "black",
          "isort",
          "mypy",
          "coverage",
          "cProfile",
          "pyinstrument",
          "ab",
          "wrk",
          "siege",
          "locust",
          "k6",
          "hey",
          "pytest-benchmark",
          "curl",
          "http",
          "ls",
          "dir",
          "mysql"
        ],
        "defaultTimeout": 30000
      }
    },
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp@latest"
      ]
    },
    "text-editor": {
        "command": "npx",
        "args": ["mcp-server-text-editor"]
    },
    "tavily": {
      "command": "npx",
      "args": ["-y","tavily-mcp@0.2.0"],
      "env": {
          "TAVILY_API_KEY": "YOUR TAVILY_API_KEY"
        }


    },
    "google-maps": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-google-maps"],
      "env": { "GOOGLE_MAPS_API_KEY": "YOUR GOOGLE_MAPS_API_KEY" }
    },
    "weather": {
      "command": "npx",
        "args": [
            "-y",
            "@h1deya/mcp-server-weather"
        ]
    },
    "perplexity-ask": {
      "command": "npx",
      "args": [
        "-y",
        "server-perplexity-ask"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "YOUR Perplexity API KEY"
      }
    },
    "shrimp-task-manager" : {
       "command" : " npx " ,
       "args" : [ " -y " , " mcp-shrimp-task-manager " ],
       "env" : {
         "DATA_DIR" : " /mcp-shrimp-task-manager/data " ,
         "TEMPLATES_USE" : " en " ,
         "ENABLE_GUI" : " false "
      }
    },
    "playwright_sse": { 
      "url": "http://localhost:8931/sse"
    }
  }
}
  1. playwright 서버 별도 설치( using Docker)
    1. Dockerfile
# Specify the base image (check for the latest tag and specify if preferred)
FROM mcr.microsoft.com/playwright:v1.51.1-noble

# Set working directory (optional)
WORKDIR /app

# Install @playwright/mcp globally
# RUN npm cache clean --force # Try this if you encounter caching issues
RUN npm install -g @playwright/mcp@0.0.7

# Install Chrome browser and dependencies required by Playwright
# Although the base image should include them, explicitly install in case MCP cannot find them
RUN npx playwright install chrome && npx playwright install-deps chrome

# Copy the entrypoint script
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh

# Set the entrypoint
ENTRYPOINT ["/app/entrypoint.sh"]

b. .env

# Port on the host machine to connect to the MCP server
MCP_HOST_PORT=8931

# Set to true to run in headless mode
HEADLESS=true

# --- Settings for headed mode (uncomment and modify as needed) ---
# DISPLAY=:0
# WAYLAND_DISPLAY=wayland-0
# XDG_RUNTIME_DIR=/run/user/0 # Match the user ID inside the container (root=0, pwuser=1000)
# X11_HOST_PATH=/tmp/.X11-unix # Host path for X11 socket
# WSLG_HOST_PATH=/mnt/wslg     # Host path for WSLg

# -- For WSL2 (when running docker from the host OS terminal, not inside WSL) --
# DISPLAY=:0
# WAYLAND_DISPLAY=wayland-0
# XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir
# X11_HOST_PATH=\\wsl.localhost\Ubuntu\tmp\.X11-unix # Example for Ubuntu distro
# WSLG_HOST_PATH=\\wsl.localhost\Ubuntu\mnt\wslg     # Example for Ubuntu distro

c. docker-compose.yml

services:
  playwright-mcp:
    build: .
    container_name: playwright-mcp-server
    tty: true
    env_file:
      - .env
    environment:
      # Default is headed mode (SSE connection) unless overridden by .env
      - HEADLESS=${HEADLESS:-false}
      # Internal container port (used by entrypoint.sh)
      - MCP_PORT=${MCP_HOST_PORT:-8931}
      # --- Settings for headed mode (assuming WSL2 + WSLg) ---
      # Read from .env file (with defaults)
      - DISPLAY=${DISPLAY:-:0}
      - WAYLAND_DISPLAY=${WAYLAND_DISPLAY:-wayland-0}
      - XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/0} # Default assumes root (ID 0)
    ports:
      # Map host port (from .env) to the same internal port
      - "${MCP_HOST_PORT:-8931}:${MCP_HOST_PORT:-8931}"
    volumes:
      # --- Volume mounts for headed mode (WSL2 + WSLg) ---
      # Read host paths from .env file (with defaults)
      - ${X11_HOST_PATH:-/tmp/.X11-unix}:/tmp/.X11-unix:rw
      - ${WSLG_HOST_PATH:-/mnt/wslg}:/mnt/wslg:ro # WSLg related (read-only)
    # shm_size: '2gb' # Increase shared memory size if needed
    # init: true # Use an init process to reap zombie processes

d. entrypoint.sh

#!/bin/sh
set -e

# Default arguments and port
MCP_ARGS=""
# Use MCP_PORT from environment or default to 8931
INTERNAL_PORT=${MCP_PORT:-8931}

# Add --headless if HEADLESS environment variable is true
if [ "$HEADLESS" = "true" ]; then
  MCP_ARGS="$MCP_ARGS --headless"
fi

# Add --port if MCP_PORT is set (for SSE connection)
# This allows SSE connection even when HEADLESS=true
if [ -n "$MCP_PORT" ]; then
  MCP_ARGS="$MCP_ARGS --port $INTERNAL_PORT"
fi

# Add other options if needed (e.g., --vision)
# if [ "$VISION_MODE" = "true" ]; then
#   MCP_ARGS="$MCP_ARGS --vision"
# fi

echo "Starting @playwright/mcp with args: $MCP_ARGS $@"
echo "Internal MCP port (if using SSE): $INTERNAL_PORT"

# Execute @playwright/mcp using npx, passing arguments ($@)
exec npx @playwright/mcp@0.0.7 $MCP_ARGS "$@"

e. 실행(playwright)

docker compose up -d

MCP 서버 실행

uvx mcpo --config ~/mcpo/config.json --host localhost --port 8085
  • 만약 배치파일로 만들어 사용한다면
# run.sh

cd
cd /mcpo
source ~/mcpo/venv/bin/activate
uvx mcpo --config ~/mcpo/config.json --host localhost --port 8085

이제 nginx 에서 8085로 연결 시키고, open webui 개인설정- 도구에 추가 시키면 완료

  • nginx 연결은 nginx 설정파일을 참고

Read more

AI, 국제수학올림피아드에서 금빛 업적 달성! 구글과 오픈AI의 놀라운 성과

AI, 국제수학올림피아드에서 금빛 업적 달성! 구글과 오픈AI의 놀라운 성과

AI의 수학적 혁명: IMO 금메달 도전기 AI, 국제수학올림피아드에서 금메달 획득! 2025년, 구글과 오픈AI의 인공지능이 세계 최고 난이도의 수학 대회에서 놀라운 성과를 거두었습니다. 이는 AI의 수학적 추론 능력이 인간 수준에 근접했음을 보여주는 획기적인 순간입니다. 주요 성과 * 🏅 오픈AI: 6문제 중 5문제 해결, 42점 만점 중 35점 획득 * 🏅 구글 Gemini: IMO 금메달 기준

By King
WebAgent: Alibaba's Next-Gen AI Agent for Autonomous Web Information Exploration

WebAgent: Alibaba's Next-Gen AI Agent for Autonomous Web Information Exploration

WebAgent란 무엇인가? WebAgent는 알리바바의 통이랩(Tongyi Lab)에서 개발한 혁신적인 오픈소스 프로젝트로, AI 기반 웹 탐색의 한계를 넓히는 기술입니다. 핵심은 대형 언어 모델(LLM)을 기반으로 한 자율 에이전트로, 최소한의 인간 개입으로 웹을 탐색하고 정보를 수집하며 복잡한 추론 작업까지 수행할 수 있습니다. 이제 이 흥미로운 기술을 자세히 살펴보고 어떻게 작동하는지

By King
YOLO 모델 학습 결과 비교 기준과 효율적 평가 방법에 관한 고찰

YOLO 모델 학습 결과 비교 기준과 효율적 평가 방법에 관한 고찰

YOLO 모델 학습을 진행하며 데이터셋 증강, 배치 구성 등의 변수 조작 후 학습 결과 비교를 위한 연구는 매우 중요한 과정입니다. 특히, 논문 작성 시 수정이 가해지지 않은 기본 상태와 고안한 방법을 적용한 상태의 학습 결과를 비교할 때 어떤 모델 파일을 기준으로 할지 고민하는 경우가 많습니다. YOLO 학습을 400 epoch로 설정할

By King
역사의 장막을 벗기다: MLK 기밀문서, 정치 스캔들, 그리고 헌터 바이든의 충격 발언

역사의 장막을 벗기다: MLK 기밀문서, 정치 스캔들, 그리고 헌터 바이든의 충격 발언

미국 정치의 숨겨진 진실들, 이제 공개된다! 🔍 마틴 루터 킹 주니어 암살 문서 23만쪽 전격 공개 2025년 7월 21일, 국가정보국(DNI)이 MLK 암살 사건의 숨겨진 진실을 담은 6,000여 건의 문서를 최초로 공개했습니다. 트럼프 대통령의 행정명령에 따라 국민의 알 권리를 위해 추진된 이번 공개는 역사적 투명성의 중요한 이정표로 평가됩니다. 📂 오바마-코미

By King