stdout-mcp
An MCP server that lets a coding agent read console logs from Chrome extensions instrumented with stdout(), wait for new output, mark points in the log, and reload the extension.
get_logs— read the most recent log entries, page forward from a cursor, or center on a given entry; filter by level, extension, browser, filename, regex, or recency (e.g.10m).wait_for_log— block until a message matching a regex appears (default 30s, max 120s), e.g. after asking the user to reproduce a bug.mark— insert a labeled line into the log and get a cursor to fetch everything logged after it.reload_extension— reload an unpacked extension to pick up code changes, optionally re-readingmanifest.jsonto confirm it came back up; returns a cursor for subsequent logs.list_sources— see which browsers, extensions, and pages are sending logs, and when each last connected.
Click on "Deploy 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., "@stdout-mcp show me recent error logs from my extension"
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.
![]()
stdout-mcp
Let coding agents reload your Chrome extension and read its console logs, without keeping its service worker awake
stdout-mcp has three parts:
stdout(), an import you call from your extension to forward its console output to thestdout-mcpextension.The
stdout-mcpextension, which you load unpacked in Chrome or Edge. It stores the last 10,000 messages and shows them in its own console.An MCP server that lets your coding agent read those messages and reload the extension.
Why?
A Manifest V3 extension often does most of its work in a service worker that Chrome shuts down after about 30 seconds, once it's stopped getting events. Then Chrome starts it again for the next event. Bugs often hide in that restart flow: state kept in a variable is gone, or a listener isn't registered in time.
You can inspect the service worker's console, but while that devtools window is open, Chrome keeps the worker running. So you'll never see your extension go from active to inactive and back again, preventing you from reproducing a bug your users might see. stdout-mcp collects your console output in a separate extension, so the worker in your own extension can stop and start just as it would in production.
Coding agents have it worse. They can't see your extension's console at all, so they ask you to copy the logs and to click reload after every change. With the stdout-mcp server, an agent can:
read what your extension logged, including messages from before the agent session started
add a marker to the logs, then ask you to reproduce a problem and wait for the new messages to come in
reload your extension after changing its code, and tell whether it came back up successfully
Related MCP server: Chrome Ops MCP
Installation
npm install --save-dev stdout-mcpThen load the stdout-mcp extension in your browser:
Open
chrome://extensions(oredge://extensionsin Edge) and turn on Developer mode.Click Load unpacked and choose the
/path/to/your/extension/node_modules/stdout-mcp/extensionfolder, or drag that folder onto the page.
To see your extension's console output, click the service worker link in the stdout-mcp card on the Extensions page. To let an agent read it, see Reading logs from a coding agent below.
Usage
To send logs from your extension, import stdout() from the package and call it:
// service-worker.js
import stdout from "stdout-mcp";
stdout();
console.log("my important message", { hello: "world" });By default, the global console object will be wrapped with methods that forward to the stdout-mcp extension, so anything passed to console.log(), console.error(), etc. in your extension will also be displayed in the stdout-mcp extension's service worker console. Calls to console.error() appear there as warnings labeled error, so they aren't listed as errors for the stdout-mcp extension itself. The source link at the end of each line points to stdout-mcp's own code, not to the line in your extension that logged the message.
Call stdout() once on each "page" in your extension from which you want to send console output: the service worker, the popup, content scripts, etc. To turn console forwarding off, such as for a production build, you can pass the enabled flag with false, or just use an if statement to make the call only in development.
Reading logs from a coding agent
The package includes an MCP server, stdout-mcp, that lets a coding agent read your extension's console output. It needs no other changes to your extension.
The stdout-mcp extension stores the last 10,000 log messages it receives, whether or not an agent is connected. So when you notice something going wrong and start an agent session, the agent can see what was logged beforehand.
Setup
Add the server to your agent's MCP configuration. Node 20 or later needs to be installed.
For Claude Code, run this in your extension's project:
claude mcp add stdout -- npx stdout-mcpOr add it to the project's .mcp.json:
{
"mcpServers": {
"stdout": {
"command": "npx",
"args": ["stdout-mcp"]
}
}
}For Codex, run:
codex mcp add stdout -- npx -y stdout-mcpOr add it to ~/.codex/config.toml:
[mcp_servers.stdout]
command = "npx"
args = ["-y", "stdout-mcp"]When called by an agent, the MCP server starts a small background process on port 47321 that holds the logs, runs the tools, and is shared by all agent sessions. The background process exits after two hours without use. See docs/architecture.html for how these pieces fit together.
Enabling agent mode
To let the stdout-mcp extension send its logs to the MCP server, click its icon in Chrome's toolbar. (You may need to pin it from the Extensions menu first.) The icon shows an MCP badge while agent mode is on. The badge is gray until an agent session starts and has received the logs, when it turns green. It turns gray again two hours after an agent stops using it.
Click the icon again to turn agent mode off. The logs are still stored and shown in the stdout-mcp extension's console, but nothing is sent to the local MCP server.
More than one browser
The stdout-mcp extension can send logs from more than one browser at once, such as Chrome and Edge, or two Chrome profiles. Turn on agent mode in each one to use them simultaneously. When logs come from more than one browser, each message says which one it came from, and the agent can limit what it reads to one browser. reload_extension reloads an extension in the browser it has logged from, and asks which one when it has logged from several.
Each browser is named by its brand and version, like Edge 146. Chrome's channels all call themselves Chrome, so to tell Chrome and Canary apart, give one of them a name by right-clicking the stdout-mcp icon, choose Options, and enter a name like Canary in the Browser name field.
stdout-mcp Tools
Tool | Description |
| Returns the most recent log messages, the messages after a cursor from a previous call, or the messages around a given one. Can filter by level, extension, browser, filename, a regular expression, or how recent the messages are, like |
| Waits for a new log message that matches a regular expression, such as after the agent asks you to reproduce a problem. |
| Adds a line to the log, such as before the agent asks you to reproduce a problem, so the messages that follow are easy to find. |
| Reloads an unpacked extension so it runs your latest code, even if its service worker failed to start. It only works on extensions that have called |
| Lists the browsers the |
Times are shown in your local time zone, like in the stdout-mcp extension's console, and each message shows the time since the previous one, like +251ms. A loaded line marks the first message from each page load, so you can see when a service worker restarted or a popup was reopened.
stdout() Options
You can pass stdout() an object with any of these options:
enabled
Set enabled to false to make stdout() silently do nothing. It defaults to true. Use an environment variable or something similar to send logs in development but not in production:
stdout({ enabled: process.env.NODE_ENV !== "production" });wrapConsole
If you don't want to wrap the global console object, set wrapConsole to false. In that case, stdout() will return an object with the standard console methods that you can call when you want to send console output to the stdout-mcp extension:
const { log, error } = stdout({ wrapConsole: false });
console.log("this message will not be sent to stdout-mcp");
log("this message will be logged locally *and* sent to stdout-mcp", { hello: "world" });
error("so will this error", new Error("something went wrong"));filename
In the stdout-mcp extension's service worker console, the filename of your extension page is prefixed to each line of output, since different parts of your extension can all send messages to that console. By default, this filename is extracted from location.pathname. In a content script, where location is the web page's, it defaults to content: plus the page's host, like content:example.com. You can specify a custom name by passing a filename field in the options object:
// service-worker.js
stdout({ filename: "background" });
// popup.html
stdout({ filename: "toolbar" });Content scripts
A content script normally runs in an isolated world: it shares the page's DOM, but not its JavaScript globals. So stdout() wraps only your content script's console. The page's own console isn't changed, and its messages aren't sent to the stdout-mcp extension.
All of your extension's content scripts in a frame share one isolated world, so only the first stdout() call there wraps console, even if each script is bundled with its own copy of stdout-mcp. Later calls return the same methods and ignore their options, so messages from all of those scripts use the first call's filename.
A content script in the page's MAIN world can't use extension APIs, so stdout() does nothing there and returns the page's console.
Why not Chrome DevTools MCP?
Chrome DevTools MCP lets an agent drive a browser: open pages, click, take screenshots, read a page's console, and inspect extensions. It can launch its own browser or attach to the one you're using. That's powerful, but it has some important drawbacks when you're debugging an extension you're also actively using:
DevTools MCP keeps your service worker awake. Your extension's service worker won't go idle while the MCP is connected, whether it attached to your normal browser or launched its own. Like with an open devtools window, this means you won't see the normal worker restart cycles where bugs can hide.
stdout-mcpnever attaches directly to your extension.DevTools MCP only sees what happens while it's connected.
stdout-mcpstores messages whether or not an agent is running, so an agent can look into a problem you noticed before you started the session. Chrome DevTools MCP only sees what happens from the time it connects, so you'll still have to copy and paste logs (if you're lucky and the worker hasn't been closed yet...).DevTools MCP gets your whole browser. Attached to the browser you use every day, it can see and control every tab, including the sites you're signed in to.
stdout-mcponly knows about the extensions where you've added thestdout()call, and it can only reload those.
Keep Chrome DevTools MCP for automated tests, but use stdout-mcp as your daily driver.
License
Available Tools
5 toolsget_logsGet extension logsARead-only
Get console output from Chrome extensions that use the stdout-mcp library, including output from before this session started. Without after, returns the most recent matching entries. With after, returns the entries following that cursor, oldest first. With around, returns the entries before and after that one.
Inputs: after, limit, since, around, +5 more.
list_sourcesList log sourcesBRead-only
List the Chrome extensions and pages that have sent logs, and the browsers the stdout extension is sending them from.
Inputs: no named parameters.
markMark the logA
Add a line to the log, such as before asking the user to reproduce a problem, so the entries that follow are easy to find. Returns a cursor to pass as after to get the entries logged since the mark.
Inputs: label.
reload_extensionReload an extensionA
Reload an unpacked Chrome extension so it picks up changes to its code. Pass reloadManifest if manifest.json changed too, and the result will say whether that looks like it worked. Only extensions that have called stdout() can be reloaded. Returns a cursor to pass as after to get the entries logged since the reload.
Inputs: extension (required), browser, reloadManifest.
wait_for_logWait for an extension logARead-only
Wait until a Chrome extension logs a message matching a pattern, such as after asking the user to reproduce a problem or reload the extension. By default, only entries logged after this call starts are considered.
Inputs: pattern (required), after, levels, browser, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: get_logs reads history, wait_for_log blocks for a match, mark inserts a cursor anchor, reload_extension refreshes code, and list_sources enumerates log emitters. The only partial overlap (get_logs vs wait_for_log) is resolved cleanly by timing/blocking semantics, and the cursor concept ties them together rather than blurring them.
Four of five names follow a clean snake_case verb_noun pattern (get_logs, wait_for_log, reload_extension, list_sources). Only 'mark' deviates as a bare verb with no object, a minor but noticeable break from the pattern.
Five tools is tightly scoped to the domain of reading and driving logs from Chrome extensions, with each tool earning its place (read, wait, annotate, reload, enumerate sources). Nothing feels padded or missing at the count level.
The lifecycle is well covered: discover sources, read history, wait for new output, insert markers, and reload the extension to generate fresh logs. Minor gaps exist, such as no way to clear/purge logs or filter by log level/severity, but cursor-based reads work around most of it.
Related MCP Connectors
Chatwoot MCP server for ChatGPT, Claude and any AI agent: list conversations, reply to conversation, add private note, assign conversation, add labels and resolve or snooze conversation in your own Chatwoot account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Chatwoot yourself; Cotlet does not store your password and you need no Chatwoot API key. About the official Chatwoot API: Chatwoot has a full REST API, the Application API, and an official command-line client, but no official MCP server (checked 22 Oct 2026). The API covers conversations, messages, contacts, labels, teams and assignments with an access token from Profile Settings. Setup and FAQ: https://cotlet.dev/integrations/chatwoot-api-mcp-server
Buildertrend MCP server for ChatGPT, Claude and any AI agent: get schedule, create daily log, create change order and list selections in your own Buildertrend account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Buildertrend yourself; Cotlet does not store your password and you need no Buildertrend API key. About the official Buildertrend API: Buildertrend publishes no API docs or self-serve keys for customers; it connects through its Marketplace integrations (checked 11 Oct 2026). Setup and FAQ: https://cotlet.dev/integrations/buildertrend-api-mcp-server
Loxo MCP server for ChatGPT, Claude and any AI agent: list jobs, read a job pipeline, search people, log candidate activity, move candidate to a stage, email a pipeline stage, read the activity report and create person in your own Loxo account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Loxo yourself; Cotlet does not store your password and you need no Loxo API key. About the official Loxo API: Yes, Loxo has an Open API, but it is a paid feature: Loxo Support turns on the Settings > API Keys page for your account, and only account admins can use it (checked 22 Oct 2026). Loxo has no official MCP server, and its API reference has no endpoints for reports or for sending email. Setup and FAQ: https://cotlet.dev/integrations/loxo-api-mcp-server
Overleaf MCP server for ChatGPT, Claude and any AI agent: list projects, read file, edit file, compile project, add comment, reply to comment, accept tracked change and invite collaborator in your own Overleaf account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Overleaf yourself; Cotlet does not store your password and you need no Overleaf API key. About the official Overleaf API: Overleaf has no public API to read or change existing projects (checked 5 Nov 2026). Its only API, Open in Overleaf, sends LaTeX in one direction to create a new project. Setup and FAQ: https://cotlet.dev/integrations/overleaf-api-mcp-server
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables AI coding assistants to control and inspect a live Chrome browser for automated debugging, performance analysis, and web interaction. It leverages Puppeteer and Chrome DevTools to provide capabilities like network monitoring, console logging, and automated browser actions.-
- AlicenseBqualityBmaintenanceEnables AI coding agents to inspect and operate Chrome as a developer, including reading DevTools console/network data, evaluating JavaScript, and managing unpacked extensions during an edit-test-debug loop.24MIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to control and inspect a live Chrome browser for reliable automation, in-depth debugging, and performance analysis.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to control and inspect a live Chrome browser, providing reliable automation, debugging, performance insights, screenshots, network analysis, and console messages through MCP.Apache 2.0