Skip to main content
Glama
Lokii0911
by Lokii0911

Selenium MCPサーバー

Seleniumブラウザ自動化のための、デプロイ可能なPython MCPサーバーです。ローカルでのSTDIO使用と、/mcpでの本番環境向けストリーミングHTTP、さらにコンテナプラットフォーム用のヘルスチェックエンドポイントをサポートしています。

ツール

  • browser_start, browser_stop, browser_reset, browser_state

  • navigate, go_back, go_forward, refresh

  • set_window_size, open_new_tab, switch_window, close_window

  • find_element, wait_for_element, click, type_text

  • get_text, get_attribute, execute_script, scroll

  • page_source, screenshot, save_screenshot

  • list_cookies, add_cookie, delete_cookies

ロケーター戦略: id, name, css selector, xpath, link text, partial link text, tag name, class name

Related MCP server: Selenium MCP Server

HTTPエンドポイント

  • POST /mcp および関連するストリーミング可能なHTTP MCP呼び出し

  • GET /healthz

  • GET /readyz

  • POST /browser/start

  • POST /browser/stop

ローカルセットアップ

Windows Pythonの前提条件

PowerShellで Python was not found と表示される場合は、まずPython 3.11以降をインストールしてください。最も簡単な方法は以下の通りです:

winget install Python.Python.3.12

その後、PowerShellを閉じて再度開いてください。python --version で依然としてMicrosoft Storeのプロンプトが開く場合は、以下の場所で python.exe および python3.exe のアプリ実行エイリアスを無効にしてください:

Settings > Apps > Advanced app settings > App execution aliases
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

PowerShell:

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev]"

ローカルSTDIO MCPサーバーとして実行:

selenium-mcp

ストリーミング可能なHTTP MCPサーバーとして実行:

selenium-mcp-http

その後、MCPクライアントを以下に接続します:

http://localhost:8000/mcp

Claude Desktopの例

{
  "mcpServers": {
    "selenium": {
      "command": "selenium-mcp",
      "env": {
        "SELENIUM_BROWSER": "chrome",
        "SELENIUM_HEADLESS": "true"
      }
    }
  }
}

Docker

コンテナ内のChromiumブラウザでビルドおよび実行:

docker build -t selenium-mcp .
docker run --rm -p 8000:8000 selenium-mcp

専用のSelenium Gridブラウザコンテナで実行:

docker compose up --build

設定

.env.example.env にコピーして調整してください:

SELENIUM_BROWSER=chrome
SELENIUM_HEADLESS=true
SELENIUM_REMOTE_URL=
SELENIUM_IMPLICIT_WAIT_SECONDS=2
SELENIUM_PAGE_LOAD_TIMEOUT_SECONDS=30
SELENIUM_SCRIPT_TIMEOUT_SECONDS=30
SELENIUM_WINDOW_WIDTH=1440
SELENIUM_WINDOW_HEIGHT=1000
SELENIUM_ALLOW_FILE_URLS=false
SELENIUM_DEFAULT_DOWNLOAD_DIR=/tmp/selenium-downloads
SELENIUM_HTTP_HOST=0.0.0.0
SELENIUM_HTTP_PORT=8000
SELENIUM_MCP_TRANSPORT=stdio

リモートのSelenium Gridを使用する場合は、以下を設定してください:

SELENIUM_REMOTE_URL=http://selenium:4444/wd/hub

セキュリティ上の注意

このサーバーはWebの閲覧、JavaScriptの実行、ページHTMLの読み取り、ホスト上へのスクリーンショット保存が可能です。本番環境では、制限されたコンテナまたはVM内で実行し、アウトバウンドネットワークアクセスを制限し、SELENIUM_ALLOW_FILE_URLS=false を維持し、HTTP MCPエンドポイントをプラットフォームの認証レイヤーの背後に配置してください。

検証

ruff check .
pytest
Install Server
A
license - permissive license
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…

  • Automate cloud browsers to navigate websites, interact with elements, and extract structured data.…

  • Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lokii0911/SeleniumMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server