mcpField
A
AI Agents in Container

AI Agents in Container

ローカル
github.com/katzByte007データ・分析05 週間前に更新

AI Agents in Container について

AI Agents in Container は、Kasm デスクトップコンテナで browser-use などを動かし、Ollama と MCP サーバーを設定する手順をまとめたガイドです。VS Code Insiders、Claude Desktop、Cursor、Windsurf での接続方法も記載しています。

主な機能

  1. 01Docker で Kasm デスクトップコンテナを実行
  2. 02browser-use と Web UI のセットアップ
  3. 03Ollama モデルのインストールと実行
  4. 04複数のクライアントで Puppeteer MCP サーバーを設定

活用シーン

  1. 01コンテナ環境で browser-use を構築
  2. 02Puppeteer MCP を対応クライアントに接続
  3. 03指定したモデルで Ollama を実行

MCP 対応

Puppeteer MCP サーバーのビルド方法と、VS Code Insiders、Claude Desktop、Cursor、Windsurf での設定方法を説明しています。

設定

ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。

mcp.json · 共通設定
{
"mcpServers": {
"AI-Driven-MCP-Server-Data-Processing-Platform": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"\\"
]
}
}
}
起動コマンドdocker run -i --rm '\'

ローカルサーバーにはマシン上の実行環境(Node.js 18 以上など)が必要です。設定ファイルの場所はクライアントごとに異なります。

パッケージ
oci\

ツール

ツール一覧はまだ取得されていません

ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。

詳細

コンテナ内の AI エージェント

kasm デスクトップ

docker run \
  --name browser-use \
  --shm-size=4096m \
  -w /mnt \
  -p 8080:6901 \
  -e VNC_PW=password \
  -id kasmweb/ubuntu-noble-desktop:1.16.1
  
user: kasm_user
password: password
browser-use

Python の最新バージョンをインストール

docker exec -u root -it browser-use bash
visudo
kasm-user ALL=(ALL) NOPASSWD: ALL
passwd kasm-user
passwd root
exit

docker exec -it browser-use bash
sudo apt update -y
sudo apt install -y python3-venv git xvfb python3-full
web-ui
# Start in Desktop directory
cd /home/kasm-user/Desktop

# Remove any existing web-ui directory if it exists
sudo rm -rf web-ui

# Clone the repository
git clone https://github.com/browser-use/web-ui.git
cd web-ui

# Create and set up virtual environment in your home directory instead
python3 -m venv ~/web-ui-venv
source ~/web-ui-venv/bin/activate

# Install UV
curl -LsSf https://github.com/astral-sh/uv/releases/latest/download/uv-installer.sh | sh
source $HOME/.local/bin/env

# Verify environment
whoami
uv --version
python3 --version

# Install requirements using the virtual environment in home directory
uv pip install -r requirements.txt

# Install Playwright dependencies
playwright install-deps 
playwright install

# Setup environment file
cp .env.example .env

# Run the application with Xvfb
xvfb-run -a --server-args="-screen 0 1280x1024x24" python webui.py --ip 0.0.0.0 --port 7788

# Access the application at:
# http://localhost:7788


# Remove existing venv
deactivate
cd /home/kasm-user/Desktop
sudo rm -rf web-ui
OLLAMA をインストール
curl -fsSL https://ollama.com/install.sh | sh

ollama serve &

http://localhost:11434

ollama pull deepseek-r1:8b

ollama pull deepseek-r1:8b  # I used this for docker

ollama run deepseek-r1:8b

ollama list

ollama stop deepseek-r1:8b

ollama rm deepseek-r1:8b
MAC OS
  • Python の最新バージョンをインストール
brew install python3

git clone https://github.com/browser-use/web-ui.git

# Install UV Package https://docs.astral.sh/uv/getting-started/installation/

cd web-ui

python3 -m venv .venv

source .venv/bin/activate

curl -LsSf https://github.com/astral-sh/uv/releases/latest/download/uv-installer.sh | sh

source $HOME/.local/bin/env

uv --version

python3 --version

uv pip install -r requirements.txt

playwright install-deps 

playwright install

cp .env.example .env

python webui.py --ip 127.0.0.1 --port 7788

http://localhost:7788
MAC OS に OLLAMA をインストール
https://ollama.com/download/mac

ollama pull deepseek-r1:8b  # I used this for Mac OS

ollama run deepseek-r1:8b
Vscode Insiders
Google AI Studio(API Key)
MCP サーバー
git clone https://github.com/modelcontextprotocol/servers.git
cd servers
docker build -t mcp/puppeteer -f src/puppeteer/Dockerfile .
  • vscode Insider の設定
{
    "mcp": {

      "inputs": [],
      "servers": {
        "puppeteer": {
          "command": "docker",
          "args": ["run", "-i", "--rm", "--init", "-e", "DOCKER_CONTAINER=true", "mcp/puppeteer"]
        }
      }
    }
    
  }
  • Claude Desktop の設定
{
  "mcpServers": {
    "puppeteer": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "--init", "-e", "DOCKER_CONTAINER=true", "mcp/puppeteer"]
    }
  }
}
  • Cursor
{
  "mcpServers": {
    "puppeteer": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "--init", "-e", "DOCKER_CONTAINER=true", "mcp/puppeteer"]
    }
  }
}
  • Codium Windsurf
{
  "mcpServers": {
    "puppeteer": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "--init", "-e", "DOCKER_CONTAINER=true", "mcp/puppeteer"]
    }
  }
}

コメント

MCP は初めてですか?

プロトコルの概要から最初のサーバーの導入まで、よくある疑問にまとめて答えます。

AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。