se-mcp
Supports launching and controlling Firefox browser sessions for web automation, including navigation, element interaction, screenshots, and state management.
Provides Selenium browser automation tools, including session management, navigation, interaction, snapshots, screenshots, tab management, and network mocking via WebDriver.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@se-mcpOpen https://news.ycombinator.com, get the top 5 story titles, and return them as a list"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Overview
se-mcp is the recommended way for MCP-aware AI clients (VS Code, Claude Desktop, Cursor, etc.) to use se-cli — a token-efficient Selenium browser automation CLI.
This package is a thin wrapper around se-cli's built-in MCP server. It provides a standalone entry point (npx @browsers-cli/se-mcp) so MCP clients can discover and invoke all browser automation tools without manually configuring the se-cli binary.
Architecture
┌──────────────────┐ JSON-RPC 2.0 ┌──────────────────┐
│ MCP Client │ ◄─── over stdio ───► │ se-mcp │
│ (VS Code, │ │ (this package) │
│ Claude, etc.) │ │ thin wrapper │
└──────────────────┘ └────────┬─────────┘
│
require() │ delegates to
▼
┌──────────────────┐
│ @browsers-cli/ │
│ se-cli │
│ MCP Server │
│ (mcp-server.ts) │
└────────┬─────────┘
│
JSON line │ over socket
▼
┌──────────────────┐
│ se-cli Daemon │
│ (long-lived) │
│ WebDriver + │
│ Selenium │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Browser │
│ (Chrome/Edge/ │
│ Firefox) │
└──────────────────┘The MCP server reads JSON-RPC 2.0 requests from stdin and writes responses to stdout. Browser commands are forwarded to the se-cli daemon over a Unix socket (or Windows named pipe), which holds the WebDriver instance across calls.
Related MCP server: Selenium MCP Server
Installation
For MCP clients (recommended)
You do not need to install anything globally. MCP clients will use npx automatically:
npx @browsers-cli/se-mcpGlobal install (optional)
npm install -g @browsers-cli/se-mcpNote: se-mcp depends on
@browsers-cli/se-clias a peer dependency. It will be installed automatically bynpxor when you install se-mcp with npm 7+.
Configuration
VS Code
Add to your VS Code settings (settings.json):
{
"mcp.servers": {
"se-cli": {
"command": "npx",
"args": ["-y", "@browsers-cli/se-mcp"]
}
}
}Or use the bundled server.json file directly — copy its contents into your MCP client configuration.
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"se-cli": {
"command": "npx",
"args": ["-y", "@browsers-cli/se-mcp"]
}
}
}Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"se-cli": {
"command": "npx",
"args": ["-y", "@browsers-cli/se-mcp"]
}
}
}Claude Code
Add to .mcp.json in your project root:
{
"mcpServers": {
"se-cli": {
"command": "npx",
"args": ["-y", "@browsers-cli/se-mcp"]
}
}
}Generic MCP client
Use the server.json file included in this package:
{
"mcpServers": {
"se-cli": {
"command": "npx",
"args": ["-y", "@browsers-cli/se-mcp"],
"env": {}
}
}
}Tool Catalog
se-mcp exposes 50+ MCP tools covering the full browser automation lifecycle. All tools are prefixed with browser_.
Session & Browser Management
Tool | Description |
| Start a browser session (Chrome, Edge, or Firefox) |
| Close a browser session and stop the daemon |
| List all active browser sessions |
| Close all active browser sessions |
Navigation
Tool | Description |
| Navigate to a URL |
| Navigate back in history |
| Navigate forward in history |
| Reload the current page |
| Get the current page title |
| Get the current page URL |
Interaction
Tool | Description |
| Click an element by ref or CSS selector |
| Fill an input field with text |
| Type text into the focused element |
| Press a keyboard key |
| Select a dropdown option |
| Check a checkbox |
| Uncheck a checkbox |
| Hover over an element |
| Double-click an element |
| Drag and drop between elements |
Snapshot & Search
Tool | Description |
| Take an accessibility (aria) snapshot with element refs |
| Find elements by text content |
| Take a screenshot of the page or element |
| Execute JavaScript in the page |
Tab Management
Tool | Description |
| List all open tabs |
| Open a new tab |
| Close the current tab |
| Switch to a tab by index |
Storage & State
Tool | Description |
| List all cookies |
| Get a specific cookie |
| Set a cookie |
| Delete a cookie or all cookies |
| Save browser state to JSON |
| Load browser state from JSON |
Advanced Input
Tool | Description |
| Accept an alert/confirm/prompt dialog |
| Dismiss a dialog |
| Upload a file to a file input |
| Set the viewport size |
| Press and hold a key |
| Release a held key |
| Move mouse to coordinates |
| Press a mouse button |
| Release a mouse button |
| Scroll the mouse wheel |
| Chain multiple actions in one call |
Assertions
Tool | Description |
| Assert conditions (visible, hidden, text, value, etc.) |
Network & Debugging
Tool | Description |
| Outline elements for visual debugging |
| Get buffered console messages and JS errors |
| List buffered network requests |
| Show details of a specific request |
| Mock a network route |
| List active route mocks |
| Remove a route mock |
How It Works
MCP client (e.g., VS Code) spawns
npx @browsers-cli/se-mcpas a subprocess.se-mcp loads the MCP server from
@browsers-cli/se-cliand starts listening on stdin/stdout.When the MCP client calls a tool (e.g.,
browser_open), the server maps it to se-cli CLI args and sends them to the se-cli daemon over a socket.The daemon holds the WebDriver instance and executes the command, returning a JSON response.
The server wraps the response in a JSON-RPC 2.0 envelope and writes it to stdout.
Why a daemon?
The daemon architecture means the browser stays open across tool calls. There is no reconnection cost, no driver restart overhead, and the WebDriver instance is reused. This is what makes se-cli token-efficient compared to traditional MCP browser implementations.
Aria snapshots and element refs
The browser_snapshot tool returns a compact YAML-like accessibility tree with element references (e1, e2, etc.). Subsequent commands can reference these elements by ref instead of verbose CSS selectors, dramatically reducing token usage.
Programmatic API
You can also use se-mcp programmatically:
const { startMcpServer, McpServer, toolDefinitions, mapToolToCliArgs } = require('@browsers-cli/se-mcp');
// Start the MCP server (reads JSON-RPC from stdin, writes to stdout)
startMcpServer();
// Or create an instance with a custom workspace directory
const server = new McpServer('/path/to/workspace');
server.start();TypeScript
import { startMcpServer, McpServer, toolDefinitions, mapToolToCliArgs } from '@browsers-cli/se-mcp';
// startMcpServer(workspaceDir?: string): void
// McpServer: class { constructor(workspaceDir?: string); start(): void }
// toolDefinitions: ToolDef[]
// mapToolToCliArgs(toolName: string, args: any): string[] | nullRelated
se-cli — The core Selenium CLI with daemon architecture
se-cli documentation — Full documentation and guides
se-cli npm — Core package on npm
License
Apache License 2.0 — see LICENSE for details.
This server cannot be installed
Maintenance
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
Alicense-qualityCmaintenanceMCP server that enables AI tools to control local browser sessions for ChatGPT, Claude, and other AI services, supporting querying, navigation, file uploads, and artifact management.Last updated86491Mozilla Public 2.0- AlicenseAqualityCmaintenanceExposes Selenium WebDriver as an MCP server, enabling AI agents and LLMs to control real browsers for automation tasks like navigation, element interaction, and screenshot capture.Last updated223MIT
- Alicense-qualityDmaintenanceAn MCP server for web automation using Selenium WebDriver, enabling AI assistants to navigate, interact with elements, take screenshots, and manage browser storage.Last updated10MIT
- AlicenseBqualityCmaintenanceA production-ready MCP server that exposes Selenium 4 browser automation as MCP tools.Last updated27MIT
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/se-cli/se-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server