self-healing-browser-mcp
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., "@self-healing-browser-mcpGo to https://example.com and click the 'Get Started' button."
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.
self-healing-browser-mcp
An MCP server that hands an AI agent — Claude Desktop, Claude Code, Cursor, or anything that speaks MCP — a real browser to drive, with self-healing locators.
Why
The moment you let an agent automate a browser, brittle selectors bite: a data-testid gets renamed, the DOM is restructured, a button's markup changes — and the run dies on a locator not found. Agents burn tokens retrying, or just give up.
This server takes a different contract. You describe an element by whatever you know — a test id, a role + accessible name, a label, some text, a CSS selector — and it resolves the element using the most stable strategy that still works. If your preferred locator has drifted, it heals to a fallback and tells you so, instead of failing.
Related MCP server: AgentBrowser
How the self-healing works
Each element tool accepts the same optional strategies. The resolver tries them in priority order and uses the first that matches exactly one visible element:
testid → role + name → label → placeholder → text → css → fuzzy (accessible-name match)If your first-choice strategy resolves the element, great — no heal.
If it doesn't (renamed test id, changed structure) but a later strategy does, the result is flagged
healedso you know the locator drifted and should be updated.If only a name is known and its casing/wording shifted, a final fuzzy pass matches the accessible name across interactive roles.
The agent "sees" the page semantically via browser_snapshot (roles + accessible names from the accessibility tree), not raw HTML or screenshots.
Demo
See it heal live — the same locator hint keeps working after a refactor deletes the element's data-testid (examples/self_healing_demo.py):
$ python examples/self_healing_demo.py
1) Original app — the preferred data-testid resolves the button:
-> resolved via 'testid' healed=False
2) After a refactor removed the data-testid — SAME hint, no code change:
-> resolved via 'role' healed=True
-> clicked the recovered element successfullyThe data-testid the agent learned is gone, but because the hint also carried the button's role and accessible name, the engine recovered the element, flagged the heal, and the element stayed clickable — no test edit, no agent retry loop.
Tools
Tool | What it does |
| Open a URL in the shared page |
| List interactive elements as |
| Click an element (self-healing) |
| Type into a field (self-healing) |
| Read an element's text |
| Assert an element is visible — |
| Close the browser |
The ... on element tools is the locator strategy set: testid, role, name, label, placeholder, text, css — all optional; pass as many as you know.
Install
# install straight from the repo (PyPI release coming)
pip install "git+https://github.com/RAJUSHANIGARAPU/self-healing-browser-mcp"
python -m playwright install chromiumUse it from an MCP client
Claude Code:
claude mcp add self-healing-browser -- self-healing-browser-mcpClaude Desktop / Cursor — add to the MCP servers config:
{
"mcpServers": {
"self-healing-browser": {
"command": "self-healing-browser-mcp"
}
}
}Then ask your agent to, e.g., "open example.com, snapshot the page, and click the Sign in button." When a selector has drifted, the tool result will say it healed.
Configuration
Env var | Default | Purpose |
|
| The attribute |
| (unset) | Set to |
Develop
pip install -e ".[dev]"
python -m playwright install chromium
pytestThe self-healing engine (src/self_healing_browser_mcp/engine.py) is decoupled from the MCP layer and tested deterministically against in-memory HTML — no external site, no flakiness.
Releasing
Publishing to PyPI is automated with GitHub Actions via
PyPI Trusted Publishing (OIDC) — no API
token is stored in the repo. Every push builds and twine checks the distribution in
CI, so main is always release-ready.
To cut a release:
One-time: on PyPI, create the
self-healing-browser-mcpproject's Trusted Publisher pointing at this repo, workflowpublish.yml, and environmentpypi.Bump
versioninpyproject.toml, commit, and tag (git tag v0.1.1 && git push --tags).Publish a GitHub Release for that tag — the
Publish to PyPIworkflow builds and uploads automatically. After that,pip install self-healing-browser-mcpworks.
License
MIT — see LICENSE.
Available Tools
7 toolsbrowser_assert_visibleC
Assert the described element is present and visible. Returns PASS or FAIL.
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | ||
| name | No | ||
| role | No | ||
| text | No | ||
| label | No | ||
| testid | No | ||
| placeholder | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Only mentions return value 'PASS or FAIL', but fails to disclose waiting behavior, timeouts, or error handling. With no annotations, this is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence is concise, but it omits critical details. Conciseness is not inherently valuable if it sacrifices necessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 7 parameters and no annotations, the description is severely incomplete. Does not explain parameter roles, return format, or assertion behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
7 parameters with 0% schema coverage and no description explaining how to specify the element. Agent gets no help on parameter usage or selection.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states verb 'assert' and resource 'element is present and visible', and differentiates from sibling tools like browser_click or browser_snapshot.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives. Does not provide context for selection among sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
browser_clickA
Click an element described by any combination of locator strategies.
Provide as many as you know (e.g. role='button' + name='Log in', and a
testid if you have one). The most stable available strategy wins; if it
healed to a fallback, the result says so.
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | ||
| name | No | ||
| role | No | ||
| text | No | ||
| label | No | ||
| testid | No | ||
| placeholder | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden. It discloses that the most stable strategy wins and fallback is reported, which provides insight into internal behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is succinct, with two sentences. The first sentence states the core purpose, and the second provides usage guidance, making it efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Although there is an output schema, the description covers essential behavior for a click tool. It explains fallback behavior, which is valuable for expected output.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description gives examples of locator strategies (role, name, testid) but does not explain all 7 parameters. Schema coverage is 0%, so partial compensation is provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool clicks an element using locator strategies. It distinguishes from siblings like browser_fill (filling) and browser_get_text (getting text) by specifying 'click' action.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description advises providing multiple locator strategies and mentions fallback, giving context for effective use. However, it does not explicitly state when not to use or compare to alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
browser_closeA
Close the browser and release its resources.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description mentions that it closes the browser and releases resources, which is the core behavior. However, it does not disclose potential side effects like discarding unsaved state or whether it can be called multiple times. With no annotations, the burden is on the description, and it is adequate but could be more informative.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence of six words, front-loaded with the verb 'Close'. Every word is necessary and there is no extraneous content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists and there are no parameters, the description is largely complete. It covers the primary function, though it could mention prerequisites like the browser being open or whether it errors if already closed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so the description does not need to add parameter information. With 0 parameters, the baseline is 4, and the description does not repeat anything from the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Close' and resource 'browser', clearly stating the action. It effectively distinguishes from sibling tools like browser_navigate or browser_click by indicating a teardown operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when the browser session is complete, but it does not explicitly state when to use or when not to use this tool versus alternatives. No exclusions or context are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
browser_fillC
Type value into an input described by the locator strategies.
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | ||
| name | No | ||
| role | No | ||
| text | No | ||
| label | No | ||
| value | Yes | ||
| testid | No | ||
| placeholder | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does not disclose whether existing input is cleared, whether events are triggered, or how locator strategies interact (e.g., precedence, combination). The behavioral traits beyond 'type' are absent, making the tool's behavior opaque for an AI agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no extraneous words. It directly states the action and hints at the key concept (locator strategies). However, it is so brief that it sacrifices clarity on parameter usage.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 8 parameters with 0% schema description coverage and no annotations, the description is far too sparse. It does not explain how to properly use locator strategies, the expected behavior (e.g., clearing, events), or the structure of the output schema. A more complete description would include usage patterns and behavioral details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description adds no meaning to the 8 parameters. It mentions 'locator strategies' but does not explain the role of each parameter (css, name, role, etc.) or that exactly one locator should likely be provided. The required 'value' parameter's purpose is obvious, but the optional locators are left entirely to the schema names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action 'Type value into an input', using backticks for the value. It mentions 'locator strategies' which hints at the multiple element selection parameters. However, it does not explicitly differentiate from sibling tools like browser_click or browser_get_text, but the action of typing is distinct enough.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for filling form inputs, but provides no explicit guidance on when to use this tool versus alternatives. No exclusions or prerequisites are mentioned, and the sibling tools are not referenced. The verb 'type' strongly suggests text input, but the lack of comparative guidance leaves some ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
browser_get_textC
Return the visible text of the described element.
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | ||
| name | No | ||
| role | No | ||
| text | No | ||
| label | No | ||
| testid | No | ||
| placeholder | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description only says 'visible text' without explaining behavior for hidden elements, multiple matches, or element not found. Key behavioral traits remain undisclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The one-sentence description is too short for a tool with 7 parameters and no annotations. It sacrifices essential details for brevity, making it under-specified rather than concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite the presence of an output schema (unspecified), the description fails to explain element selection, visibility criteria, return format, or error handling. The tool's complexity is not matched by the description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description does not explain any of the 7 optional parameters (css, name, role, text, label, testid, placeholder), leaving their use and meaning entirely implied by names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Return') and the resource ('visible text of the described element'). It distinguishes from siblings like browser_click or browser_fill, but could be more specific about what 'described element' entails.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives such as browser_snapshot or browser_assert_visible. No prerequisites or conditions mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
browser_snapshotA
Return the page's interactive elements as roles + accessible names.
Use this to 'see' the page semantically before deciding what to click or type.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It implies a read-only operation ('return', 'see'), but does not explicitly state safety, side effects, or performance. Basic transparency is present, but deeper behavioral details are missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the core action, and a usage hint. No extraneous words; every sentence serves a purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and an output schema, the description covers the essential aspects: what it returns and why to use it. Minor missing details could include whether it captures the full page or visible viewport.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so schema coverage is 100%. The description adds value by explaining the output nature (roles and accessible names), going beyond the minimal schema. Baseline 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it returns interactive elements as roles and accessible names, with a usage hint. It distinguishes from siblings like browser_click and browser_fill by focusing on semantic introspection, but does not explicitly contrast with browser_get_text.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes 'Use this to see the page semantically before deciding what to click or type', providing a clear context. However, it does not specify when not to use it or mention alternatives like browser_get_text for text extraction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
7 tool updates
v0.1.0- First observed
browser_assert_visible - First observed
browser_click - First observed
browser_close - First observed
browser_fill - First observed
browser_get_text - First observed
browser_navigate - First observed
browser_snapshot
TDQS
Each tool targets a distinct action (navigate, snapshot, click, fill, get text, assert visibility, close) with no overlap. The descriptions clearly differentiate their purposes.
All tools follow a consistent 'browser_verb_noun' pattern in snake_case, making the set predictable and easy to understand.
The server has 7 tools, which is well-scoped for a browser automation server. Each tool provides a necessary function without redundancy or bloat.
The tool set covers core browser operations (navigation, interaction, state inspection, assertion). Minor gaps like scrolling or waiting exist but do not critically hinder typical agent workflows.
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 Connectors
AI-powered web automation. Navigate websites using AI agents for one page or a thousand
AI-powered web automation. Navigate websites using AI agents for one page or a thousand
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
Browser-based QA for AI-built software. Test pages with real browsers via agents.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with web browsers using natural language, featuring automated browsing, form filling, vision-based element detection, and structured JSON responses for systematic browser control.62MIT
- FlicenseNot gradedqualityBmaintenanceA semantic browser runtime for AI agents that replaces raw HTML with structured data and dynamic, page-specific tools. It features built-in site memory and automated bot detection bypass to enable efficient, self-healing web automation.1-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to fully control a browser for web automation, including navigation, clicking, typing, scrolling, screenshots, and DOM inspection, with session persistence and anti-bot bypass.14MIT
- AlicenseBqualityDmaintenanceEnables visual browser automation through natural language descriptions, allowing AI to click, type, and navigate web pages by seeing the page.18MIT
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/RAJUSHANIGARAPU/self-healing-browser-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server