neuron-inspector 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +208 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,208 @@
1
+ # neuron-inspector
2
+
3
+ **51 browser tools for AI agents.** Turn Chrome into an MCP-powered DevOps platform — inspect DOM, automate clicks, audit security, mock APIs, extract data, record demos — all from Claude Code, Cursor, Windsurf, or any MCP client.
4
+
5
+ ```bash
6
+ npx neuron-inspector
7
+ ```
8
+
9
+ ## What this does
10
+
11
+ Your AI agent can't see your browser. neuron-inspector fixes that.
12
+
13
+ It bridges a Chrome extension to your AI coding tool via MCP (Model Context Protocol). Once connected, your agent gets 51 tools that let it read the DOM, click buttons, run JS, search network traffic, audit accessibility, scan for security leaks, mock API responses, extract structured data from any page, and more.
14
+
15
+ No API keys. No cloud. Runs entirely on localhost.
16
+
17
+ ## Setup (2 minutes)
18
+
19
+ ### 1. Install the Chrome extension
20
+
21
+ Download from [neuron.ng/extension](https://neuron.ng/extension) and sideload it:
22
+
23
+ 1. Extract the zip
24
+ 2. Open `chrome://extensions`, enable Developer Mode
25
+ 3. Click "Load unpacked" and select the folder
26
+
27
+ ### 2. Register the MCP server
28
+
29
+ **Claude Code:**
30
+ ```bash
31
+ claude mcp add neuron-inspector -- npx neuron-inspector
32
+ ```
33
+
34
+ **Cursor** — add to `.cursor/mcp.json`:
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "neuron-inspector": {
39
+ "command": "npx",
40
+ "args": ["neuron-inspector"]
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ **Windsurf** — add to `~/.codeium/windsurf/mcp_config.json`:
47
+ ```json
48
+ {
49
+ "mcpServers": {
50
+ "neuron-inspector": {
51
+ "command": "npx",
52
+ "args": ["neuron-inspector"]
53
+ }
54
+ }
55
+ }
56
+ ```
57
+
58
+ That's it. The extension auto-connects to the bridge on `ws://localhost:7377`.
59
+
60
+ ## The 51 tools
61
+
62
+ ### Inspect & Debug
63
+ | Tool | What it does |
64
+ |------|-------------|
65
+ | `neuron_query_dom` | DOM snapshot of the page or a subtree |
66
+ | `neuron_find_elements` | Find elements by CSS selector or visible text |
67
+ | `neuron_evaluate_js` | Run JavaScript in page context |
68
+ | `neuron_get_logs` | Console logs filtered by level, tab, search |
69
+ | `neuron_screenshot` | PNG screenshot of the visible area |
70
+ | `neuron_diagnose` | Connection health — extension connected? Tabs open? |
71
+ | `neuron_list_tabs` | Open tabs with platform detection |
72
+
73
+ ### Browse & Automate
74
+ | Tool | What it does |
75
+ |------|-------------|
76
+ | `neuron_click` | Click an element by selector or text |
77
+ | `neuron_type` | Type into inputs and contenteditable |
78
+ | `neuron_scroll` | Scroll by pixels or scroll an element into view |
79
+ | `neuron_navigate` | Navigate a tab to a URL |
80
+ | `neuron_open_tab` | Open a new tab |
81
+ | `neuron_reload` | Reload a tab |
82
+ | `neuron_run_sequence` | Execute a multi-step sequence (click, type, wait, eval) |
83
+
84
+ ### Network Intelligence
85
+ | Tool | What it does |
86
+ |------|-------------|
87
+ | `neuron_get_requests` | Query captured HTTP requests by tab, method, status, URL |
88
+ | `neuron_get_errors` | Recent 4xx/5xx responses and console errors |
89
+ | `neuron_get_ws_frames` | WebSocket and SSE frame history |
90
+ | `neuron_export_har` | Export traffic as HAR 1.2 |
91
+ | `neuron_search_traffic` | Full-text search across all captured response bodies |
92
+ | `neuron_discover_apis` | Auto-map API endpoints from observed traffic |
93
+ | `neuron_replay_request` | Re-fire an HTTP request with the browser's live session |
94
+ | `neuron_waterfall` | Network timing breakdown — DNS, TLS, TTFB per resource |
95
+
96
+ ### Security Scan
97
+ | Tool | What it does |
98
+ |------|-------------|
99
+ | `neuron_security_scan` | Scan for leaked secrets, missing headers, CORS issues, mixed content |
100
+ | `neuron_check_auth` | Verify platform credentials are still valid |
101
+ | `neuron_detect_blocker` | Detect rate limits, captchas, login walls |
102
+
103
+ ### Quality Audits
104
+ | Tool | What it does |
105
+ |------|-------------|
106
+ | `neuron_a11y_audit` | WCAG accessibility audit — contrast, labels, headings, tabindex |
107
+ | `neuron_perf_snapshot` | Core Web Vitals, resource breakdown, memory, long tasks |
108
+ | `neuron_seo_audit` | Title, meta, OG, headings, structured data, link ratio |
109
+
110
+ ### Network Mocking
111
+ | Tool | What it does |
112
+ |------|-------------|
113
+ | `neuron_set_mock` | Intercept requests and return custom responses |
114
+ | `neuron_get_mocks` | List active mock rules |
115
+ | `neuron_clear_mocks` | Remove all mocks |
116
+
117
+ ### Cookies & Storage
118
+ | Tool | What it does |
119
+ |------|-------------|
120
+ | `neuron_get_cookies` | Read all cookies for a URL |
121
+ | `neuron_set_cookie` | Set a cookie |
122
+ | `neuron_delete_cookie` | Delete a cookie |
123
+ | `neuron_get_storage` | Read localStorage or sessionStorage |
124
+ | `neuron_clear_storage` | Clear storage |
125
+
126
+ ### Page Monitoring
127
+ | Tool | What it does |
128
+ |------|-------------|
129
+ | `neuron_snapshot_state` | Capture page state (DOM, visibility, text) for later diff |
130
+ | `neuron_diff_states` | Compare two snapshots — detect what changed |
131
+ | `neuron_watch_element` | Watch a selector for changes over time |
132
+ | `neuron_get_watches` | Check accumulated changes |
133
+ | `neuron_stop_watch` | Stop watching |
134
+ | `neuron_extract_data` | Extract structured data from repeating patterns (feeds, tables, listings) |
135
+
136
+ ### Demo Recording
137
+ | Tool | What it does |
138
+ |------|-------------|
139
+ | `neuron_start_recording` | Record user interactions as a replayable workflow |
140
+ | `neuron_stop_recording` | Save the recording |
141
+ | `neuron_list_workflows` | List saved workflows |
142
+ | `neuron_start_replay` | Replay a workflow |
143
+ | `neuron_stop_replay` | Stop replay |
144
+ | `neuron_start_demo` | Record a demo video with chapters, captions, cursor overlay |
145
+ | `neuron_workflow_status` | Current engine state |
146
+
147
+ ### Other
148
+ | Tool | What it does |
149
+ |------|-------------|
150
+ | `neuron_trigger_post` | Trigger the IG post runner |
151
+ | `neuron_session_diagnostics` | Agent session health — capture rate, stalls, auth, buffers |
152
+
153
+ ## Examples
154
+
155
+ **"Why is this page slow?"**
156
+ ```
157
+ → neuron_perf_snapshot { tabId: 123 }
158
+ ← LCP: 3.2s, CLS: 0.04, 14 render-blocking scripts, heaviest: analytics.js (890KB)
159
+ ```
160
+
161
+ **"Check this page for security issues"**
162
+ ```
163
+ → neuron_security_scan { tabId: 123 }
164
+ ← 3 findings: API key leaked in inline script, missing CSP header, autocomplete on password field
165
+ ```
166
+
167
+ **"What APIs is this SPA calling?"**
168
+ ```
169
+ → neuron_discover_apis {}
170
+ ← 12 endpoints: GET /api/users/{id} (called 8x), POST /api/auth/refresh (2x), ...
171
+ ```
172
+
173
+ **"Extract all product listings from this page"**
174
+ ```
175
+ → neuron_extract_data { tabId: 123 }
176
+ ← 47 items: [{ text: "Nike Air Max", link: "/product/123", image: "...", price: "$129" }, ...]
177
+ ```
178
+
179
+ **"Mock the payments API to return a 500"**
180
+ ```
181
+ → neuron_set_mock { urlPattern: "*/api/payments*", responseStatus: 500, responseBody: "{\"error\":\"service down\"}" }
182
+ ← Mock rule active. All matching requests will return 500.
183
+ ```
184
+
185
+ ## How it works
186
+
187
+ ```
188
+ ┌─────────────┐ WebSocket ┌──────────────────┐ stdio/MCP ┌──────────────┐
189
+ │ Chrome + │ ←──────────────→ │ neuron-inspector │ ←──────────────→ │ Claude Code │
190
+ │ Extension │ localhost:7377 │ (this pkg) │ │ / Cursor │
191
+ └─────────────┘ └──────────────────┘ └──────────────┘
192
+ ```
193
+
194
+ 1. The Chrome extension captures network traffic, DOM state, and console logs in real time
195
+ 2. `neuron-inspector` runs as a local bridge — WebSocket server on port 7377 (extension connects here) + MCP server on stdio (your AI tool connects here)
196
+ 3. Your AI agent calls tools via MCP → the bridge forwards them to the extension → the extension executes in Chrome → results flow back
197
+
198
+ Everything runs on localhost. No data leaves your machine.
199
+
200
+ ## Requirements
201
+
202
+ - Node.js 18+
203
+ - Chrome (or Chromium-based browser)
204
+ - [Neuron extension](https://neuron.ng/extension) installed
205
+
206
+ ## License
207
+
208
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neuron-inspector",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "MCP server exposing Neuron extension browser state as queryable tools",
5
5
  "type": "module",
6
6
  "main": "dist/server.js",