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

로스앤젤레스 공원에 연방 요원 다수 배치

로스앤젤레스 공원에 연방 요원 다수 배치

로스앤젤레스 공원에 연방 요원 다수 배치 로스앤젤레스 이민자 지역에 연방 요원들이 대거 출동했다 로스앤젤레스의 한 이민자 커뮤니티 공원에 다수의 연방 요원들이 출동하여 주민들과의 긴장이 고조되고 있다. 주요 내용 * 연방 요원들이 로스앤젤레스의 한 공원에 많게는 수십 명 출동했다. * 출동한 요원들은 이민자 커뮤니티와 관련된 조사를 진행 중이다. * 주민들은 요원들의 과도한 군사적 존재에

By King
텍사스 홍수 사망자 수 104명 넘어, 책임 요구 증가

텍사스 홍수 사망자 수 104명 넘어, 책임 요구 증가

텍사스 홍수 사망자 수 104명 넘어, 책임 요구 증가 텍사스에서 홍수로 인한 피해와 사망자 발생 텍사스의 케르빌에서 발생한 홍수로 인해 현재까지 104명이 사망했으며, 지역사회에서 책임 요구가 커지고 있습니다. 주요 내용 * 케르빌의 과달루페 강에서 대규모 홍수가 발생하고, 강의 수위가 30피트 이상 상승했습니다. * 신속한 구조작업이 진행되고 있으며, 이 과정에서 여러 생존자가 발견되고

By King
미 의회의 AI 규제: 소비자 보호와 주 정부의 자율성 승리

미 의회의 AI 규제: 소비자 보호와 주 정부의 자율성 승리

미국 의회, AI 규제에 대한 중요한 결정 최근 미국 상원은 인공지능(AI) 관련 중요한 결정을 내렸습니다. 트럼프 대통령이 추진했던 AI 규제 모라토리엄 조항을 삭제하며, 소비자와 아동의 안전을 최우선으로 고려했습니다. 주요 변화 * 각 주 정부의 AI 규제 권한 확보 * 10년간 AI 인프라 예산 관련 제한 철폐 * 소비자 보호에 중점 하원 공화당의

By King
호주 정부, 중국의 AI 협력 제안에 신중한 태도

호주 정부, 중국의 AI 협력 제안에 신중한 태도

중국의 AI 협력 제안, 알보니지 총리의 모호한 대응 최근 앤서니 알보니지 호주 총리가 중국의 AI 협력 제안에 대해 조심스러운 입장을 보이고 있습니다. 상하이, 베이징, 청두 방문을 앞두고 있는 알보니지 총리는 중국의 자유무역협정 AI 분야 포함 제안에 대해 명확한 입장을 피하고 있습니다. 신중한 대응의 이유 기자들의 질문에 "우리는 우리의 정책을

By King