Skip to main content
Glama
bytesbrains

mcp-textbrowser

by bytesbrains

@bytesbrains/mcp-textbrowser

npm version license CI

MCP server — text-first headless browser for Claude Code and any MCP host. DOM + OCR text maps. Zero image tokens by default. 5-15x cheaper than screenshot-based browser MCPs.

browser_navigate(url)             → DOM elements + OCR text   (~200 tokens)
browser_navigate(url, visual=true) → text + PNG               (use for layout/color only)

Why

Every screenshot-based browser MCP sends a PNG to the AI on every action. At 1280×800 that's ~1,300 image tokens per page — 5-15x more expensive than reading the same content as text.

mcp-textbrowser captures a screenshot for OCR, extracts the text, then discards the image. Only structured DOM elements and OCR text reach the model. Switch to visual=true only when you genuinely need pixels (layout checks, color, design review).

Mode

Tokens per action

When to use

text-only (default)

~150–400

Everything: navigation, forms, data extraction, workflows

visual=true

~1,500–3,000

Layout, colors, CSS, design review

Related MCP server: MCP Master Puppeteer

Install

Step 1 — install Chromium (one-time, ~130MB):

npx playwright install chromium

Step 2 — add the MCP server:

Claude Code (CLI) — one command

claude mcp add textbrowser -- npx -y @bytesbrains/mcp-textbrowser

That's it. Restart Claude Code and the tools are ready.

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "textbrowser": {
      "command": "npx",
      "args": ["-y", "@bytesbrains/mcp-textbrowser"]
    }
  }
}

Restart Claude Desktop.

Manual (any MCP host)

Use command: npx, args: ["-y", "@bytesbrains/mcp-textbrowser"] in your host's MCP server config.

Tools

Tool

What it does

browser_navigate

Open a URL, return page context

browser_click

Click by CSS selector / XPath / visible text

browser_type

Fill an input field

browser_scroll

Scroll page or element into view

browser_screenshot

Capture current page context

browser_read

Read current page without navigating

browser_evaluate

Run JS in the page (safe DOM ops only)

All tools default to text-only — pass visual: true to any tool to also receive the PNG.

Example output

Page: https://example.com/
Title: Example Domain
Viewport: 1280x800

Elements (3 interactive of 14 total):
  [1] <a> href="https://iana.org/domains/example" bbox=(133,175,254,195)
      text: "More information..."

OCR (full page screenshot):
Example Domain
This domain is for use in illustrative examples in documents.
You may use this domain in literature without prior coordination or asking for permission.

Requirements

  • Node.js 18+

  • Chromium: npx playwright install chromium (one-time, ~130MB)

License

MIT © BytesBrains


Built by Agent, for Agents 🤖


Built and maintained by BytesBrains — AI automation & agents, engineered to production standards. The model proposes, code guarantees.

Available Tools

7 tools
browser_clickA

Click an element on the current page. Identify the target by CSS selector, XPath, or visible text. Returns updated page context after the click.

ParametersJSON Schema
NameRequiredDescriptionDefault
textNoVisible text content to match (partial, case-insensitive)
xpathNoXPath expression
visualNoReturn base64 PNG alongside text (default false)
selectorNoCSS selector

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully convey behavior. It mentions returning updated page context but omits details about side effects, failure modes, or element matching behavior when multiple elements match.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the action, no extraneous text. Every sentence serves a purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity and full schema descriptions, the description adequately covers the purpose and return value. It does not need to explain output since no output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with each parameter described. The description reinforces the identification methods (CSS, XPath, text) but adds no new information beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Click an element') and the resource ('on the current page'), and distinguishes itself from siblings by specifying the core interaction type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool (to click elements) but does not provide explicit exclusions or comparisons with siblings like browser_type or browser_scroll.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

browser_evaluateA

Execute JavaScript in the current page context and return the result. Restricted to safe DOM read operations — eval, Function, fetch, WebSocket, and document.write are blocked.

ParametersJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript expression to evaluate (must not use eval, Function, import, fetch, WebSocket, or document.write)

TDQS

A4.3/5.0
Behavior4/5

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 explicitly states the tool executes JavaScript and returns the result, and lists blocked functions. It does not mention error handling or return type details, but the restrictions clarify safety.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose, followed by restrictions. Every sentence adds essential information with no redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the basic purpose and constraints but lacks details on return value format, error behavior, or potential side effects. Given no output schema, some additional context would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, providing a baseline of 3. The description adds value by explaining the execution context and restrictions beyond the schema's parameter description, which only says 'JavaScript expression to evaluate'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'execute' and the resource 'JavaScript in the current page context' with the outcome 'return the result'. It distinguishes from sibling tools like browser_click by emphasizing execution of code rather than UI interactions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use (safe DOM read operations) and restrictions (blocked functions like eval, fetch). However, it does not explicitly suggest alternative tools for non-read operations, though the restrictions implicitly guide usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

browser_navigateA

Open a URL in the browser and return the page context (DOM elements + OCR text). Default text-only mode — screenshot is captured only for OCR then discarded, zero image tokens. Set visual=true to also receive the PNG.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL to open
visualNoReturn base64 PNG alongside text (default false = text-only, zero image tokens)
headlessNoRun headless (default true)

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description reveals that by default no image tokens are consumed, the screenshot is discarded after OCR, and visual mode returns a PNG. This provides useful behavioral insight, though it omits potential side effects like cookie handling or timeout behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, no wasted words. The first sentence states the core purpose, the second explains key options and defaults. It is front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains the return value sufficiently for an agent to understand what to expect (DOM + OCR text, optionally PNG). Given no output schema, this is adequate. However, it does not cover error conditions or timeouts, which could be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds meaningful context beyond the schema: it explains the default (text-only, zero image tokens), the effect of visual=true, and that headless mode defaults to true. This helps the agent select parameters correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Open a URL' and the resource 'browser', and specifies the return value as 'page context (DOM elements + OCR text)'. This distinguishes it from siblings like browser_click or browser_screenshot.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the default text-only mode and how to enable visual output, but does not explicitly state when to use this tool instead of alternatives like browser_read or browser_screenshot. The context is clear but lacks explicit when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

browser_readA

Read the current page context (DOM elements + OCR text) without navigating or clicking anything.

ParametersJSON Schema
NameRequiredDescriptionDefault
visualNoReturn base64 PNG alongside text (default false)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so the description carries full burden. It states it's read-only (no navigation/clicking) and returns DOM+OCR, but lacks details on side effects, performance, or limits. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence that covers purpose and constraints without any wasted words. Highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given one simple parameter and no output schema, the description is nearly complete. It could mention the optional return of base64 PNG, but overall it sufficiently informs an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a single boolean parameter (visual). The description adds no extra meaning beyond what the schema already provides, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool reads the current page context (DOM elements + OCR text) and explicitly distinguishes it from navigation or clicking, making its purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for read-only context capture, contrasting with interactive tools. It could be more explicit about when to use this over browser_screenshot, but the distinction is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

browser_screenshotA

Capture the current page and return an OCR-based text map. The screenshot itself is discarded unless visual=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
visualNoReturn base64 PNG alongside text (default false)

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but description clearly discloses that the screenshot is discarded unless visual=true, and that it returns an OCR-based text map. Covers key behavior, though could mention that a page must be loaded.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler, immediate purpose and parameter explanation. Efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool (1 optional param, no output schema), the description covers purpose, parameter, and a nuance (screenshot discarding). Lacks explicit mention of prerequisite (page must be navigated).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one boolean parameter (visual) with 100% schema coverage. Description mentions the parameter's effect (base64 PNG) and default, adding minimal value beyond the schema's own description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states 'Capture the current page and return an OCR-based text map' – specific verb and resource, and distinguishes from sibling tools like browser_read (DOM reading) and browser_scroll (scrolling).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implied usage for extracting text from rendered page (e.g., images), but no explicit guidance on when to use versus alternatives like browser_read or browser_evaluate for script-controlled content.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

browser_scrollA

Scroll the current page. Use direction (up/down/left/right) with an optional pixel amount, or provide a selector to scroll that element into view.

ParametersJSON Schema
NameRequiredDescriptionDefault
amountNoPixels to scroll (default 800)
visualNoReturn base64 PNG alongside text (default false)
selectorNoCSS selector — scroll this element into view instead
directionNoScroll direction (default: down)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must disclose behaviors. It mentions scrolling and the visual parameter, but does not clarify if scrolling is smooth, if it handles dynamic content, or what happens when both selector and direction are specified. Lacks full behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences that front-load the purpose and quickly cover the two usage modes. No redundant or unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity, the description covers the main usage scenarios. However, it could mention what happens with conflicting inputs (e.g., both direction and selector) or edge cases. Without output schema or annotations, a bit more detail on return behavior would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers all four parameters with descriptions. The description repeats the parameter usage but adds no new meaning beyond stating the default pixel value (800) and that visual returns base64 PNG. With 100% schema coverage, the description adds minimal additional value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool scrolls the current page and specifies two modes: direction with optional pixel amount, or a selector to scroll element into view. This distinguishes it from sibling tools like browser_navigate or browser_click.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains when to use each scrolling mode (direction/amount vs. selector), but does not explicitly warn against using this tool when alternatives like browser_navigate or browser_read are more appropriate. The sibling list provides context but the description itself lacks direct guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

browser_typeA

Type text into an input field on the current page. By default clears the field first. Returns updated page context.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesText to type
clearNoClear existing value before typing (default true)
visualNoReturn base64 PNG alongside text (default false)
selectorYesCSS selector for the input element

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It notes that the tool types text, clears by default, and returns updated page context. This is adequate but does not cover potential error conditions, waiting behavior, or what happens if the element is not found. More detail would improve transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise—two sentences that immediately convey the purpose and key behavior. Every sentence earns its place, and there is no unnecessary information. It is well-structured with the primary action stated first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (four parameters, no output schema), the description covers essential aspects: what the tool does, default clearing, and return type. It could mention prerequisites like page load or element existence, but overall it provides sufficient context for an AI agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds minimal additional meaning beyond the schema, only clarifying that the clear parameter defaults to true. It does not elaborate on the 'text', 'selector', or 'visual' parameters, so it provides only marginal added value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: typing text into an input field on the current page. The specific verb 'Type' and resource 'input field' make the purpose unambiguous. It also distinguishes from sibling tools like browser_click and browser_read, which have different actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions a key default behavior (clearing the field first), which is helpful. However, it does not explicitly state when to use this tool over alternatives or provide exclusions. The context implied by sibling names offers some guidance, but the description itself lacks explicit usage direction.

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.

  1. 7 tool updatesv1.1.3
    • First observedbrowser_click
    • First observedbrowser_evaluate
    • First observedbrowser_navigate
    • First observedbrowser_read
    • First observedbrowser_screenshot
    • First observedbrowser_scroll
    • First observedbrowser_type

TDQS

A4.1/5.0
Disambiguation5/5

Each tool targets a distinct browser action (navigate, click, type, scroll, read, screenshot, evaluate) with no overlap in purpose.

Naming Consistency5/5

All tool names follow the consistent 'browser_verb' pattern, making the set predictable and easy to understand.

Tool Count5/5

7 tools is well-scoped for a browser automation server, covering essential interactions without being excessive or insufficient.

Completeness4/5

Covers core browsing actions well, but lacks explicit back/forward navigation or page refresh, which are minor gaps for typical workflows.

Maintenance

ActivitySlowing
ResponsivenessSyncing

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

Related MCP Servers

  • A
    license
    B
    quality
    F
    maintenance
    A headless browser MCP server that allows AI agents to fetch web content and perform Google searches without API keys, supporting various output formats like Markdown, JSON, HTML, and text.
    2
    24
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    An advanced MCP server for browser automation using Puppeteer, specifically optimized for token efficiency through minimal data returns and progressive enhancement. It enables agents to navigate pages, capture LLM-optimized screenshots, extract structured content, and perform batch interactions.
    3
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Agent-native headless browser for AI agents. Converts web pages to a Semantic Object Model (SOM) instead of raw HTML — 17x average token reduction across real-world sites (up to 117x on complex pages). Native MCP server with fetch_page, extract_text, extract_links, and full browser automation. No API key required.
    54
    Apache 2.0

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/bytesbrains/mcp-textbrowser'

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