KY.AI.Browser 1.1.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global KY.AI.Browser --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local KY.AI.Browser --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=KY.AI.Browser&version=1.1.0
                    
nuke :add-package KY.AI.Browser --version 1.1.0
                    

ky-ai-browser

Read a served front-end's browser/runtime console from an AI agent over MCP — the runtime counterpart to ky-ai-ng's build tools. It captures console.log/info/warn/error, uncaught exceptions and unhandled promise rejections (with source location + stack) so the agent can read them via console_tail instead of you copy-pasting from devtools.

How it works

ky-ai-browser is a process you run next to a running ky-ai-ng serve — its lifetime is the on/off switch, so you control the (reversible) manipulation:

  1. On start it finds the running ky-ai-ng frontend (via the hub's registry) and — after a confirmation (default yes) — asks ky-ai-ng to inject a tiny capture <script> into the app's index.html (wrapped in ky-ai-ng-inject markers, at /html/head).
  2. The dev server reloads the page; the snippet patches console.* + the error events and POSTs them back to ky-ai-browser (loopback, cross-origin). No proxy, HMR stays native.
  3. The agent reads them with the console_tail MCP tool (and console_clear to reset).
  4. On Ctrl+C the script is removed and index.html is restored. If ky-ai-browser ever dies without cleaning up, ky-ai-ng strips the leftover marker automatically on its next start (self-heal), and reverts on its own shutdown — so the file is never left modified.

Injection only ever captures from page-load forward (it can't read console history that printed before the script loaded), and a strict script-src 'self' CSP would block the cross-origin snippet — both inherent to in-page capture.

Usage

ky-ai-browser [options]            # run alongside `ky-ai-ng serve`
  --project <id>      Which ky-ai-ng frontend to attach to (default: the only one registered)
  --port <N>          ky-ai-browser's own MCP + ingest port (default: 5104)
  --ng-hub-port <N>   ky-ai-ng hub port to discover the frontend (default: 5101)
  -y, --yes           Skip the inject confirmation (default answer is yes anyway)

Usually you launch it together with the dev server — let ky-ai-ng serve start ky-ai-browser once the first build settles (it shares the console and is killed when serve stops):

ky-ai-ng serve --after-start ky-ai-browser -y

MCP tools (for agents)

Tool Args Purpose
console_tail lines?, level?, sinceSeq?, grep?, pageLoad? recent browser console events: {seq, level, args, text, source, line, col, stack, timestamp, pageLoadId} + dropped + enabled
console_clear — clear the buffer (e.g. before reproducing an issue)

Add the server to .mcp.json and allow the tools:

{ "mcpServers": { "ky-ai-browser": { "type": "http", "url": "http://127.0.0.1:5104/mcp" } } }
{ "permissions": { "allow": [
  "mcp__ky-ai-browser__console_tail", "mcp__ky-ai-browser__console_clear"
] } }

All HTTP is loopback-only; nothing leaves the machine. The capture buffer, event types and the snippet live in this project; the reversible inject mechanism it drives is a generic POST /inject { file?, path, content } (+ /uninject) on the ky-ai-ng supervisor's control API.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.10.0 134 10/24/2026
1.9.1 117 10/6/2026
1.9.0 124 10/1/2026
1.8.0 119 9/26/2026
1.7.0 146 8/15/2026
1.6.0 148 7/17/2026
1.5.0 146 7/7/2026
1.4.0 146 7/3/2026
1.3.0 154 6/27/2026
1.2.0 150 6/27/2026
1.1.0 152 6/25/2026
1.0.1 150 6/25/2026
1.0.0 162 6/25/2026