Give an OpenAI Agents SDK agent eyes by attaching a computer-use runtime or browser automation service that returns screenshots, then expose that capability as an MCP tool. MCP standardizes the tool connection; it does not create a browser, desktop, login session, or screenshot by itself. Your application keeps the runtime alive, executes the model’s requested actions, and sends a fresh image observation whenever the page state is unknown.
The reliable loop is: the agent calls a tool such as click, type, scroll or keypress; your runtime performs it; the runtime captures the current display; and the tool result includes that screenshot. The same browser session must remain available between calls.
What “eyes” means in the Agents SDK
An agent does not see a webpage merely because an MCP server is connected. The model receives an image only when a computer or browser runtime captures the current display and returns it as tool output. MCP is the plumbing that describes and transports those tools.
Keep these responsibilities separate:
- Agents SDK application: defines the agent, model, instructions, tools, and approval policy.
- MCP server or computer adapter: exposes actions such as clicking, typing, scrolling, waiting, and taking a screenshot.
- Browser or desktop runtime: owns Chromium, a remote browser, or a desktop display; it holds cookies, authentication, tabs, and page state.
- Model: chooses the next action from the tool result and image observation.
When state is uncertain—for example, after navigation, a modal opening, or a network-heavy update—return a new screenshot before allowing the model to continue. A text-only success message is not a substitute for visual confirmation.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Choose how the agent reaches a screenshot tool
| Connection | Process boundary and reachability | Where state lives | Image behavior | Best fit |
|---|---|---|---|---|
| Local computer implementation | Your application calls a local adapter directly; normally private to that process or host. | Your computer or browser runtime; you must preserve it between turns. | A custom Computer implementation returns a base64-encoded PNG of the current display. |
Maximum control over Playwright, PyAutoGUI, an internal browser, or a desktop VM. |
| stdio MCP | The SDK starts a local child process and communicates over standard input/output. | The child process and its browser session; keep both alive for the conversation. | MCP image content is returned as an image-type tool result. | A single application on one machine, with no public endpoint. |
| Streamable HTTP MCP | The SDK connects to an HTTP-oriented local or remote service. | The service must explicitly persist the browser context and authentication state. | The server returns MCP image content with each observation. | Shared infrastructure, containers, or a separately scaled browser service. |
| Hosted MCP tool | A hosted model surface delegates calls to a publicly reachable server. | The hosted integration or your remote runtime; define session ownership and cleanup. | Images are delivered through the hosted tool result. | When your architecture already permits a trusted remote service. |
| SSE | Legacy HTTP-style transport. | Whatever runtime the SSE server owns. | Supports image tool results where implemented. | Compatibility with an existing server; the JavaScript MCP guide describes SSE as deprecated by the MCP project. |
Transport does not change the security model. A remote server can act with the permissions granted to it, so endpoint exposure, credentials, browser isolation, and approvals matter more than whether the connection is stdio or HTTP.
Build the minimal screenshot loop
1. Prepare the runtime
Install a current Python or JavaScript Agents SDK, an MCP-capable server, and a browser environment that the server can control. The browser may be local Chromium, a containerized browser, or a hosted session. Decide how the server identifies a session before writing the agent: a process-local session, an explicit session ID, or a per-user browser context.
Your MCP server should expose a small, predictable contract. A practical minimum is:
navigate(url)— loads an allowed URL.click(x, y)orclick_selector(selector)— performs one click.type(text)— types into the focused control.scroll(delta_y)— scrolls the viewport.screenshot()— captures the current display and returns MCP image content.
Return a screenshot after navigation and after any action that can change layout. You can group a few deterministic actions, but capture immediately when a popup, redirect, login challenge, or asynchronous update could have changed what is visible.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
2. Connect a Python agent to a stdio MCP server
The following application pattern keeps the MCP process open for the complete run. Replace the command and arguments with your server’s launcher; the server must implement the tools described above.
import asyncio
from agents import Agent, Runner
from agents.mcp import MCPServerStdio
async def main():
server = MCPServerStdio(
params={
"command": "python",
"args": ["my_browser_mcp_server.py"],
}
)
async with server:
agent = Agent(
name="Visual web agent",
instructions=(
"Use the browser tools to inspect the page. "
"After navigation or a state-changing action, request a screenshot. "
"Never submit a purchase, send a message, or change an account setting "
"without asking the user for approval."
),
mcp_servers=[server],
)
result = await Runner.run(
agent,
"Open the allowed test site, find its pricing link, and describe what is visible."
)
print(result.final_output)
if __name__ == "__main__":
asyncio.run(main())
Keep the MCP server object inside the same lifetime as the run. Starting a new server for every tool call commonly loses the tab, cookies, and login state. If your installed SDK uses a different class name for a transport, use the equivalent stdio or Streamable HTTP MCP server class documented for that SDK version.
3. Use JavaScript with an HTTP-oriented MCP server
For a service reachable over Streamable HTTP, create one MCP connection and reuse it while the agent works. The exact import names can vary by Agents SDK release, but the lifecycle is the same: connect once, pass the server to the agent, run, then close it.
import { Agent, run } from "@openai/agents";
import { MCPServerStreamableHttp } from "@openai/agents/mcp";
const mcp = new MCPServerStreamableHttp({
url: process.env.BROWSER_MCP_URL,
headers: {
Authorization: `Bearer ${process.env.BROWSER_MCP_TOKEN}`
}
});
await mcp.connect();
try {
const agent = new Agent({
name: "Visual web agent",
instructions: "Use browser tools and request a screenshot whenever page state is uncertain. Ask before sensitive actions.",
mcpServers: [mcp]
});
const result = await run(agent, "Inspect the test page and report the visible heading.");
console.log(result.finalOutput);
} finally {
await mcp.close();
}
Do not put bearer tokens in a URL. Supply them through an authorization header or the SDK’s authorization field. If the server only supports SSE, it can be used for legacy compatibility, but prefer Streamable HTTP for a new JavaScript integration.
Recommended Free Tools
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
4. Implement a direct Computer adapter when MCP is unnecessary
MCP is optional. A local computer implementation can be simpler when the browser and agent run in one application. The Python Computer interface requires screenshot() to return a base64-encoded PNG of the current display. A minimal shape looks like this:
import base64
from pathlib import Path
class MyComputer:
def click(self, x: int, y: int):
# Call your Playwright, PyAutoGUI, or desktop driver here.
pass
def type(self, text: str):
pass
def scroll(self, delta_y: int):
pass
def screenshot(self) -> str:
png_bytes = Path("current-screen.png").read_bytes()
return base64.b64encode(png_bytes).decode("ascii")
In production, capture the live display rather than reading a fixed file, preserve the image’s resolution, and return a new image after every state-changing operation. The adapter is responsible for translating model actions into real input events; the SDK does not operate the browser for you.
Preserve state and return useful observations
Keep one browser session
Cookies, local storage, open tabs, viewport size, and authentication challenges all belong to the execution environment. Store a session handle with the conversation and map every tool call to that same browser context. Continuing a model response without continuing the runtime does not restore state.
Capture at the right times
- Capture after the initial navigation.
- Capture after clicks that open menus, dialogs, tabs, or redirects.
- Capture after typing into a form when validation or autocomplete may appear.
- Capture after scrolling when the target may have moved into view.
- Capture whenever a tool reports an uncertain, timed-out, or partially completed action.
Include concise text alongside the image: current URL, viewport dimensions, action result, and any visible error detected by the runtime. Text helps the model reason about state; it does not replace the image.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Control image size and timing
Large screenshots increase transfer time and model input cost, while overly small images hide labels and controls. Choose a viewport and image scale that make the target UI legible. Wait for a selector, a short deterministic delay, or network idle before capturing; do not rely on a fixed long sleep for every page. Measure end-to-end latency in your own model, browser, image-detail, and network configuration. The official documentation does not publish a universal screenshot latency, accuracy, reliability, or price-per-image benchmark.
Secure an MCP computer integration
Treat a browser MCP server as a privileged integration. Connect only to servers you trust and grant the narrowest credentials possible. Keep tokens in authorization fields or headers, not query strings or page URLs.
- Allowlist destinations: prevent navigation to internal metadata endpoints, private administration panels, or arbitrary local files unless explicitly required.
- Separate identities: use a test account and isolated browser profile for automation that does not need a user’s production session.
- Require approvals: pause before submitting forms, sending messages, making purchases, changing settings, deleting data, or performing any action with an external side effect.
- Log the loop: retain tool name, arguments, timestamp, result status, and the corresponding screenshot reference for audit and debugging.
- Limit action scope: expose only the clicks, navigation targets, and resources the task needs.
Troubleshooting screenshot agents
| Symptom | Likely cause | Fix |
|---|---|---|
| The agent says it cannot see the page. | The tool returned text only, or the image field was not encoded as MCP image content. | Verify that every screenshot result contains an image payload and that a direct Computer adapter returns base64 PNG data. |
| Each turn starts at a blank tab. | A new browser process or MCP server is created for every call. | Keep one server and browser context alive for the entire agent run and persist its session handle. |
| The screenshot shows an old page. | Capture occurred before navigation, rendering, or a modal animation completed. | Wait for a selector, network idle, or a bounded delay, then capture again; return the current URL in the tool result. |
| Clicks land in the wrong place. | Viewport, device scale, browser zoom, or screenshot dimensions differ from the input coordinate system. | Keep viewport and scale fixed, report dimensions, and prefer selector-based actions where possible. |
| HTTP MCP calls fail with authorization errors. | Token is missing, expired, or placed in a URL that the server does not read. | Send a fresh token in an Authorization header, check server logs, and rotate credentials if they were exposed. |
| The model loops after a failed action. | The runtime reports success without describing the failure or providing a fresh observation. | Return an explicit error, current URL, and screenshot after uncertain actions; cap retries and ask for approval when state is ambiguous. |
| A remote server can reach more than intended. | Network access and credentials are broader than the task requires. | Use an allowlist, isolated browser/container, least-privilege account, and approval gate for sensitive operations. |
Or skip the browser setup
ScreenshotNeo is a hosted website screenshot API and MCP server for developers. It can remove cookie and consent banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and each response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers. Its MCP tools—take_screenshot, get_page_info, and capture_pdf—can be used by Claude, Cursor, or another MCP client alongside your agent architecture.
For a one-call screenshot, see the ScreenshotNeo API documentation and run:
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallcurl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
const buffer = Buffer.from(await res.arrayBuffer());
await import('fs/promises').then(fs => fs.writeFile('shot.webp', buffer));
ScreenshotNeo supports PNG, JPEG, WebP, PDF, full-page captures with lazy images loaded, CSS-selector element shots, custom CSS and JavaScript, clicks before capture, waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, selectable cache TTLs, signed image links, asynchronous jobs with signed webhooks, bulk capture for up to 100 URLs per call, usage reporting, and an OpenAPI specification. Parameters used by other screenshot APIs are also accepted to ease migration.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 screenshots; every feature is available on every plan. Create a free ScreenshotNeo account to get the 1,000 included screenshots.
FAQ
Can MCP itself open a browser?
No. MCP defines how an application discovers and calls tools. A browser, desktop, or hosted automation runtime must be supplied separately and must return the screenshot.
Is a screenshot required after every single action?
Not always. Group deterministic actions when the resulting state is known, but capture after navigation, asynchronous changes, dialogs, redirects, or any action whose outcome is uncertain.
Can I expose a production login session to a remote MCP server?
You can technically do so, but it increases risk. Prefer an isolated test account and browser profile, least-privilege credentials, destination allowlists, and explicit approval before external side effects.
Frequently Asked Questions
Can MCP itself open a browser?
No. MCP standardizes tool calls; a separate browser or desktop runtime must execute actions and return screenshots.
Is a screenshot required after every action?
Capture whenever navigation, asynchronous UI changes, dialogs, redirects, or uncertain results can alter the visible state; deterministic actions may be grouped.
Can a remote MCP server use my production login?
It can, but an isolated test account and browser profile with least-privilege access are safer, with approvals for external side effects.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

