Selenium MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| open_browserA | Launch a new browser session. PurposeCreates a Selenium WebDriver instance and registers it in the MCP
session store. The returned Typical Agent Workflow
Parametersbrowser : str Browser type to launch (default: "chrome"). headless : bool Run without a visible window (default: False). Set True on servers, Docker containers, or CI environments. Returnsdict {"session_id": str, "browser": str, "headless": bool, "status": str, "message": str} NoteOnly call this tool ONCE per workflow, unless explicitly instructed. Do not call it again unless the previous browser session was closed. |
| close_browserC | Close the browser session and free its resources. Parameterssession_id : str Active browser session identifier. |
| maximize_browserC | Maximize the browser window. Parameterssession_id : str Active browser session identifier. |
| fullscreen_browserC | Switch the browser to fullscreen mode. Parameterssession_id : str Active browser session identifier. |
| open_urlB | Navigate the browser to a specific URL. Parameterssession_id : str Active browser session identifier. url : str Full URL to open (must include scheme, e.g. https://). |
| navigate_backB | Navigate back one step in browser history. Parameterssession_id : str Active browser session identifier. |
| navigate_forwardC | Navigate forward in browser history. Parameterssession_id : str Active browser session identifier. |
| refresh_pageB | Reload the current web page. Parameterssession_id : str Active browser session identifier. |
| wait_for_pageA | Wait until the page body element is present in the DOM. PurposeCall after Parameterssession_id : str Active browser session identifier. timeout : int Maximum seconds to wait (default: 10). Returnsdict { "session_id": str, "timeout_set": timeout that was passed as a parameter, "status": str, "message": str } |
| get_tabsA | Retrieve all open browser tabs for the current session. PurposeProvides visibility into all tabs so the agent can decide which tab to switch to. Each tab is identified by an index and optional name. Parameterssession_id : str Active browser session identifier. Returnsdict { "session_id": str, "status": str, "message": str, "tabs": [ { "index": int, "name": str, "current": bool } ] } |
| get_current_tabA | Retrieve the currently active browser tab. PurposeAllows the agent to confirm which tab is currently active without listing all tabs. Parameterssession_id : str Active browser session identifier. Returnsdict { "session_id": str, "status": str, "message": str, "tab": { "index": int, "name": str, "current": bool } } |
| switch_tabA | Switch to a specific browser tab using its index. PurposeAllows the agent to move between multiple open tabs in the same browser session. Always call Parameterssession_id : str Active browser session identifier. index : int Index of the tab to switch to. Returnsdict { "session_id": str, "status": str, "message": str } |
| open_new_tabA | Open a new browser tab and optionally navigate to a URL. PurposeCreates a new tab within the current browser session. The newly opened tab becomes the active tab. Parameterssession_id : str Active browser session identifier. url : str, optional URL to open in the new tab. If not provided, a blank tab is opened. Returnsdict { "session_id": str, "status": str, "message": str } |
| close_tabA | Close a specific browser tab using its index. PurposeAllows the agent to close tabs that are no longer needed. After closing, focus automatically shifts to a valid remaining tab. Parameterssession_id : str Active browser session identifier. index : int Index of the tab to close. Returnsdict { "session_id": str, "status": str, "message": str } |
| name_tabA | Assign a custom name to a browser tab. PurposeHelps the agent label tabs meaningfully for easier navigation across multiple tabs. Parameterssession_id : str Active browser session identifier. index : int Index of the tab to name. name : str Custom name to assign to the tab. Returnsdict { "session_id": str, "status": str, "message": str } |
| click_elementA | Click an interactive element on the current webpage using its index. PurposeThis tool allows the agent to click buttons, links, or other interactive
UI elements on the page. The element must first be discovered using
The index returned by Recommended Agent Workflow
Parameterssession_id : str
Active browser session identifier returned by index : int
Index of the element to click. This index must correspond to an
element returned by Returnsdict { "session_id": str "index": index of the element that was clicked, "status": str "message": str } Error Conditions
NotesThe tool automatically scrolls the element into view before clicking to ensure it is visible and interactable. |
| type_into_elementA | Enter text into an input field or textarea using an element index. PurposeThis tool allows the agent to type text into editable elements such as
input fields or textareas. The element must first be discovered using
The index returned by Recommended Agent Workflow
Parameterssession_id : str
Active browser session identifier returned by index : int
Index of the element to type into. This must correspond to the index
returned by text : str The text to be entered into the selected element. Returnsdict { "session_id": str, "index": index of the element used, "text_to_type": the text to enter, "status": str, "message": str } Error ConditionsIf NotesThis tool automatically clears any existing text in the element before entering the new text. |
| get_interactive_elementsA | Retrieve visible interactive elements from the current web page. PurposeThis tool scans the page for interactive elements using a performance-optimized selector that works across modern web applications (React, Angular, dynamic UIs). It identifies elements based on interaction signals such as: - semantic HTML tags (button, input, link) - ARIA roles (button, link, tab, option) - click handlers (onclick) - focusable elements (tabindex) The discovered elements are returned with an assigned The function also stores the discovered Selenium elements in an internal session cache so that subsequent tools can safely interact with the exact same elements without re-querying the DOM. Recommended Agent Workflow
Parameterssession_id : str Active browser session identifier. Returnsdict { "session_id": str, "count": int, "elements": [ { "index": int, "role": str, "label": str } ], "status": str, "message": str } Notes
|
| get_accessibility_treeA | Retrieve a simplified accessibility tree of the current page. PurposeReturns interactive elements with semantic roles so AI agents
can understand UI meaning (buttons, links, inputs, dropdowns).
Returned Parameterssession_id : str Active browser session identifier. Returnsdict { "session_id": str, "count": int, "nodes": [{"index": int, "role": str, "name": str, "tag": str, "id": str, "name_attr": str, "placeholder": str, "aria_label": str}], "status": str, "message": str } |
| get_page_titleB | Retrieve the title of the current web page. Parameterssession_id : str Active browser session identifier. Returnsdict { "session_id: str, "page_title": str (title of the page), "status": str, "message": str } |
| get_page_textA | Retrieve visible text from the page body. PurposeProvides page text for reasoning, validation, or extraction.
Text is truncated to Parameterssession_id : str Active browser session identifier. max_chars : int Maximum characters to return (default: 5000). Returnsdict { "session_id": str, "page_text": str (Page text extract), truncated": bool (True, if the page_text is truncated. Else, False), "total_chars": int, "status": str, "message": str } |
| take_screenshotA | Capture a screenshot of the current browser window. PurposeUseful for debugging, failure reporting, or visual analysis. Screenshots are saved to the directory set by the MCP_SCREENSHOT_DIR environment variable (default: system temp dir). Parameterssession_id : str Active browser session identifier. Returnsdict { "session_id": str, screenshot_path: str, "status": str, "message": str } |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- 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/nayakprashant/selenium-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server