screenpipe-mcp 0.18.14 → 0.18.16

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.
package/README.md CHANGED
@@ -10,9 +10,24 @@ MCP server for screenpipe - search your screen recordings, audio transcriptions,
10
10
 
11
11
  ## Installation
12
12
 
13
- ### Option 1: NPX (Recommended)
13
+ ### Option 1: The screenpipe desktop app (Recommended)
14
14
 
15
- The easiest way to use screenpipe-mcp is with npx. Edit your Claude Desktop config:
15
+ The most reliable setup is to install the [screenpipe desktop app](https://screenpi.pe)
16
+ and connect Claude Desktop from **Settings → Connections** (or during onboarding).
17
+ This writes a config that:
18
+
19
+ - uses the **bundled `bun`** shipped with the app (an absolute path — no Node/`npx`
20
+ or `PATH` dependency, and ~3× faster cold start), and
21
+ - injects your **`SCREENPIPE_LOCAL_API_KEY`** into the server's `env`, so the MCP
22
+ authenticates instantly instead of running slow key discovery at startup.
23
+
24
+ Both matter: a config without the key forces the server to discover it via
25
+ subprocess fallbacks, which on a cold package cache can stall Claude Desktop's MCP
26
+ startup and produce `Could not attach to MCP server screenpipe`.
27
+
28
+ ### Option 2: Manual NPX (no desktop app)
29
+
30
+ If you're not using the desktop app, edit your Claude Desktop config:
16
31
 
17
32
  - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
18
33
  - **Windows**: `%AppData%\Claude\claude_desktop_config.json`
@@ -22,13 +37,21 @@ The easiest way to use screenpipe-mcp is with npx. Edit your Claude Desktop conf
22
37
  "mcpServers": {
23
38
  "screenpipe": {
24
39
  "command": "npx",
25
- "args": ["-y", "screenpipe-mcp"]
40
+ "args": ["-y", "screenpipe-mcp@latest"],
41
+ "env": {
42
+ "SCREENPIPE_LOCAL_API_KEY": "sp-…"
43
+ }
26
44
  }
27
45
  }
28
46
  }
29
47
  ```
30
48
 
31
- ### Option 2: HTTP Server (Remote / Network Access)
49
+ Requires Node/`npx` on `PATH`. Pin `@latest` so the first install doesn't cache a
50
+ stale version forever. Get your key with `screenpipe auth token`. If you omit the
51
+ key, the server will try to discover it (bundled bun → npx → local DB) — this works
52
+ but is slower and can time out on first run.
53
+
54
+ ### Option 3: HTTP Server (Remote / Network Access)
32
55
 
33
56
  The MCP server can run over HTTP using the [Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http), allowing remote MCP clients to connect over the network instead of stdio. This is ideal when your AI assistant (e.g., OpenClaw) runs on a different machine than screenpipe.
34
57
 
@@ -83,7 +106,7 @@ If your machines are on different networks, expose port 3031 via Tailscale, SSH
83
106
 
84
107
  > **Note:** The HTTP server currently exposes `search_content` only. The stdio server has the full tool set (export-video, list-meetings, activity-summary, search-elements, frame-context). We're working on bringing HTTP to full parity.
85
108
 
86
- ### Option 3: From Source
109
+ ### Option 4: From Source
87
110
 
88
111
  Clone and build from source:
89
112
 
@@ -148,7 +171,7 @@ Get a lightweight compressed activity overview for a time range:
148
171
  - Audio speaker summary
149
172
 
150
173
  ### list-meetings
151
- List detected meetings with duration, app, and attendees. Pass `q` to filter by substring (title, attendees, notes).
174
+ List detected meetings with id, duration, app, attendees, and note snippet. Pass `q` to filter by substring (title, attendees, notes) — `q` searches all meeting history, so omit the time range when looking for a person or topic. Follow up with `get-meeting` (optionally `include_transcript: true`) for the full note and speaker-attributed transcript.
152
175
 
153
176
  ### search-elements
154
177
  Search structured UI elements (accessibility tree nodes and OCR text blocks):
@@ -164,6 +187,42 @@ The whole element tree for one frame, as the same compact outline.
164
187
  ### frame-context
165
188
  Get accessibility text, parsed tree nodes, and extracted URLs for a specific frame.
166
189
 
190
+ ### keyword-search
191
+ Fast FTS5 keyword search across OCR + audio combined. Returns matches with `frame_id`, app, timestamp, and text positions.
192
+
193
+ ### list-meetings / get-meeting / update-meeting / start-meeting / stop-meeting
194
+ Manage the meeting store. `list-meetings` filters by substring; `get-meeting` returns title/attendees/times/full note (add `include_transcript: true` for the speaker-attributed transcript). `update-meeting` writes only the fields you pass. `start-meeting` and `stop-meeting` drive manual meeting recording sessions.
195
+
196
+ ### search-speakers / list-unnamed-speakers / update-speaker / merge-speakers
197
+ Speaker identification workflow. Search by name prefix, list speakers that haven't been named yet, rename a speaker, or merge two speakers when the same person was detected as different ones.
198
+
199
+ ### add-tags
200
+ Tag a screen frame (vision) or audio chunk (audio) so it can be retrieved later.
201
+
202
+ ### update-memory
203
+ Create, update, or delete a persistent memory (facts, preferences, decisions the user wants to remember).
204
+
205
+ ### send-notification
206
+ Send a notification to the screenpipe desktop UI.
207
+
208
+ ### control-recording
209
+ Start or stop audio recording. This does not pause or resume screen capture.
210
+
211
+ ### health-check
212
+ Check if screenpipe is running and healthy. Returns recording status, frame/audio stats, and timestamps.
213
+
214
+ ### list-audio-devices
215
+ List available audio input/output devices for recording.
216
+
217
+ ### list-monitors
218
+ List available monitors/screens for capture.
219
+
220
+ ### list-pipes / create-pipe / run-pipe / pipe-logs
221
+ Manage pipes — scheduled AI automations that run a markdown prompt on a schedule (e.g. "every day at 9am"). `list-pipes` shows enabled state + schedule; `create-pipe` creates one; `run-pipe` triggers a one-off test run; `pipe-logs` fetches recent execution output.
222
+
223
+ ### team-search / team-devices / team-records
224
+ Team-tier tools, registered only when an enterprise admin token is configured. `team-search` runs substring search across the entire org's telemetry, `team-devices` lists enrolled devices (hostname, OS), and `team-records` dumps chronological org data for a time window.
225
+
167
226
  ## Example Queries in Claude
168
227
 
169
228
  - "Search for any mentions of 'rust' in my screen recordings"
@@ -190,8 +249,9 @@ Get accessibility text, parsed tree nodes, and extracted URLs for a specific fra
190
249
  ## Privacy Policy
191
250
 
192
251
  The Screenpipe MCP server is a local-only bridge between Claude and your
193
- local Screenpipe instance. It does not collect, transmit, or store any
194
- data on its own.
252
+ local Screenpipe instance. It does not collect, transmit, or store tool
253
+ results, recordings, OCR text, audio transcripts, screenshots, or UI events
254
+ on its own.
195
255
 
196
256
  ### What this MCP server does
197
257
  When Claude invokes a tool (`search-content`, `activity-summary`, etc.)
@@ -200,7 +260,16 @@ Screenpipe daemon running on your machine — and returns the response.
200
260
  That's the entire data path.
201
261
 
202
262
  ### Data collection
203
- **None by this MCP server.** No analytics, no telemetry, no usage tracking.
263
+ The MCP server sends privacy-preserving crash and error reports to Screenpipe's
264
+ Sentry project so we can diagnose startup failures like "server disconnected"
265
+ or "could not attach to MCP server". These reports include the MCP package
266
+ version, runtime, transport mode, and sanitized exception details. They do not
267
+ include tool arguments, tool results, screen content, audio, transcripts,
268
+ screenshots, API tokens, or your home-directory path.
269
+
270
+ To disable crash/error reporting, set any of:
271
+ `SCREENPIPE_MCP_SENTRY_DISABLED=1`, `SCREENPIPE_TELEMETRY_DISABLED=1`, or
272
+ `SCREENPIPE_DISABLE_TELEMETRY=1` in the MCP launch environment.
204
273
 
205
274
  ### Data usage
206
275
  Tool calls are passed straight through to your local Screenpipe daemon
@@ -215,8 +284,9 @@ whatever you configure inside the Screenpipe app — typically you
215
284
  control it via the storage settings panel.
216
285
 
217
286
  ### Third-party sharing
218
- None. The MCP server only talks to `localhost:3030`. It does not
219
- contact Anthropic, Screenpipe's servers, or any other external service.
287
+ The MCP server talks to `localhost:3030` for tool calls and to Screenpipe's
288
+ Sentry project for sanitized crash/error reports unless disabled as above.
289
+ It does not contact Anthropic or send recorded content to Screenpipe's servers.
220
290
  If you choose to enable optional cloud features inside the Screenpipe
221
291
  app itself (e.g. cloud sync, cloud AI), those are governed by the
222
292
  Screenpipe app's privacy policy, not this MCP server's data flow.
package/bun.lock CHANGED
@@ -6,6 +6,7 @@
6
6
  "name": "screenpipe-mcp",
7
7
  "dependencies": {
8
8
  "@modelcontextprotocol/sdk": "^1.27.1",
9
+ "@sentry/node": "^10.64.0",
9
10
  },
10
11
  "devDependencies": {
11
12
  "@types/node": "^25.3.5",
@@ -16,6 +17,12 @@
16
17
  },
17
18
  },
18
19
  "packages": {
20
+ "@apm-js-collab/code-transformer": ["@apm-js-collab/code-transformer@0.15.0", "", { "dependencies": { "@types/estree": "^1.0.8", "astring": "^1.9.0", "esquery": "^1.7.0", "meriyah": "^6.1.4", "semifies": "^1.0.0", "source-map": "^0.6.0" }, "bin": { "code-transformer": "cli.js" } }, "sha512-XmXYVs8CzJ1Aj79noVbn2weUO/XWtRyURpGqx7aU7DOXlUQhR0WKOQNF0okh7PCeY37vxf7kU3v57OAkEPm3ww=="],
21
+
22
+ "@apm-js-collab/code-transformer-bundler-plugins": ["@apm-js-collab/code-transformer-bundler-plugins@0.5.0", "", { "dependencies": { "@apm-js-collab/code-transformer": "^0.15.0", "es-module-lexer": "^2.1.0", "magic-string": "^0.30.21", "module-details-from-path": "^1.0.4" } }, "sha512-YxLBY5nGlurL7QeJLq6e5g0ouBpAp0pwgyA/5rHXEXwhiPLn9ZHbT+Y2LlP90GT872cSocfjWRYu/fnpuBudNQ=="],
23
+
24
+ "@apm-js-collab/tracing-hooks": ["@apm-js-collab/tracing-hooks@0.10.1", "", { "dependencies": { "@apm-js-collab/code-transformer": "^0.15.0", "debug": "^4.4.1", "module-details-from-path": "^1.0.4" } }, "sha512-w2OWXR7FWrKqSziuE9+QclaZrStxO/8+OwbXM635s/zs0Eez1Qo3ivSPdB2WsaPY/iznKTytONPx/PitD7IXcA=="],
25
+
19
26
  "@cspotcode/source-map-support": ["@cspotcode/source-map-support@0.8.1", "", { "dependencies": { "@jridgewell/trace-mapping": "0.3.9" } }, "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw=="],
20
27
 
21
28
  "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.27.3", "", { "os": "aix", "cpu": "ppc64" }, "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg=="],
@@ -80,6 +87,22 @@
80
87
 
81
88
  "@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.27.1", "", { "dependencies": { "@hono/node-server": "^1.19.9", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-sr6GbP+4edBwFndLbM60gf07z0FQ79gaExpnsjMGePXqFcSSb7t6iscpjk9DhFhwd+mTEQrzNafGP8/iGGFYaA=="],
82
89
 
90
+ "@opentelemetry/api": ["@opentelemetry/api@1.9.1", "", {}, "sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q=="],
91
+
92
+ "@opentelemetry/api-logs": ["@opentelemetry/api-logs@0.220.0", "", { "dependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-CmVa4ImJ+ynfrPMNaAXHET6Bhb44SwzmfyVJFq9ni2jgXJR/l7C6gfVFddNmHP+ZOkP9cf4f9DBe68qVLTHc9w=="],
93
+
94
+ "@opentelemetry/core": ["@opentelemetry/core@2.9.0", "", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-m2nckMT80NnmjTYSPjJQObBJ+8dgkoajEOUbznL8AHZ3T3yHRk2P7gI1PhEBc1+lOnrYE9UWrWHqJDsmqjmNbw=="],
95
+
96
+ "@opentelemetry/instrumentation": ["@opentelemetry/instrumentation@0.220.0", "", { "dependencies": { "@opentelemetry/api-logs": "0.220.0", "import-in-the-middle": "^3.0.0", "require-in-the-middle": "^8.0.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-xQx3E2WxP1mDvKzxLxX+CTCtNLa560YJZ3087qYHerl2YmiKpv7AH+dAy7vmx+eVrZ5BwhfWUAVoKOoxCNHcpw=="],
97
+
98
+ "@opentelemetry/resources": ["@opentelemetry/resources@2.9.0", "", { "dependencies": { "@opentelemetry/core": "2.9.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-jyA5MBLQ+Dkl3+JsZkUoUvL7yHvU64kLsvpXKarWm6347Sl1t1bXFTFykUePNpT5WH5pm9a2Qtt03iIYQhZ1Fg=="],
99
+
100
+ "@opentelemetry/sdk-trace": ["@opentelemetry/sdk-trace@2.9.0", "", { "dependencies": { "@opentelemetry/core": "2.9.0", "@opentelemetry/resources": "2.9.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-sGA19HvtrrSKYsseHphluH6j3p6Xa3fqc7c7y8f/7mYWejc1lyDFcpSdD1kYa50HCLUeEo4zA5bW0pniaPszuw=="],
101
+
102
+ "@opentelemetry/sdk-trace-base": ["@opentelemetry/sdk-trace-base@2.9.0", "", { "dependencies": { "@opentelemetry/core": "2.9.0", "@opentelemetry/resources": "2.9.0", "@opentelemetry/sdk-trace": "2.9.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-cp9zmTl62R8PJrpvFcmc8N2JQU/xfa0S+61q511Nji+QxCfZ8Ifvg7H27G8cANe4crg4RTrWsVvanHiXjSp6ag=="],
103
+
104
+ "@opentelemetry/semantic-conventions": ["@opentelemetry/semantic-conventions@1.42.0", "", {}, "sha512-icc5xCzndZfhuJMy5oqk5AvloWquR7jtae74qzpkKkhGp8BivK+oCcEXgGnjCdTfp8hA44l+w8gE8yYJbocJJw=="],
105
+
83
106
  "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.56.0", "", { "os": "android", "cpu": "arm" }, "sha512-LNKIPA5k8PF1+jAFomGe3qN3bbIgJe/IlpDBwuVjrDKrJhVWywgnJvflMt/zkbVNLFtF1+94SljYQS6e99klnw=="],
84
107
 
85
108
  "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.56.0", "", { "os": "android", "cpu": "arm64" }, "sha512-lfbVUbelYqXlYiU/HApNMJzT1E87UPGvzveGg2h0ktUNlOCxKlWuJ9jtfvs1sKHdwU4fzY7Pl8sAl49/XaEk6Q=="],
@@ -130,6 +153,18 @@
130
153
 
131
154
  "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.56.0", "", { "os": "win32", "cpu": "x64" }, "sha512-H8AE9Ur/t0+1VXujj90w0HrSOuv0Nq9r1vSZF2t5km20NTfosQsGGUXDaKdQZzwuLts7IyL1fYT4hM95TI9c4g=="],
132
155
 
156
+ "@sentry/conventions": ["@sentry/conventions@0.15.1", "", {}, "sha512-ZLP8bRdMON3prWE2tJyImuYscCxdcJeIPIhrOs/rgyFm3C1nCh1B6gdvPj3AZ5zW08oSFFCsq7T+tYEW3h8MNA=="],
157
+
158
+ "@sentry/core": ["@sentry/core@10.64.0", "", { "dependencies": { "@sentry/conventions": "^0.15.1" } }, "sha512-HjojJcXD1l2qZ1AXje2s0XY/nYsaUt00wsM1HMBImA8vAClyPisFE/CC0/UD6pEvsGFhVgi8Dcxo7EN41uyeFw=="],
159
+
160
+ "@sentry/node": ["@sentry/node@10.64.0", "", { "dependencies": { "@opentelemetry/api": "^1.9.1", "@opentelemetry/instrumentation": "^0.220.0", "@opentelemetry/sdk-trace-base": "^2.9.0", "@sentry/conventions": "^0.15.1", "@sentry/core": "10.64.0", "@sentry/node-core": "10.64.0", "@sentry/opentelemetry": "10.64.0", "@sentry/server-utils": "10.64.0", "import-in-the-middle": "^3.0.0" } }, "sha512-rhNZ3CTqwdTQHo9Zd+NsoLyW69VIzbMcGMRX9y8W1A6runT4YH/MDhmT0U9oWfNZKN8ngqR/gfVMTnlYVQliCA=="],
161
+
162
+ "@sentry/node-core": ["@sentry/node-core@10.64.0", "", { "dependencies": { "@sentry/conventions": "^0.15.1", "@sentry/core": "10.64.0", "@sentry/opentelemetry": "10.64.0", "import-in-the-middle": "^3.0.0" }, "peerDependencies": { "@opentelemetry/api": "^1.9.0", "@opentelemetry/core": "^1.30.1 || ^2.1.0", "@opentelemetry/exporter-trace-otlp-http": ">=0.57.0 <1", "@opentelemetry/instrumentation": ">=0.57.1 <1", "@opentelemetry/sdk-trace-base": "^1.30.1 || ^2.1.0" }, "optionalPeers": ["@opentelemetry/api", "@opentelemetry/core", "@opentelemetry/exporter-trace-otlp-http", "@opentelemetry/instrumentation", "@opentelemetry/sdk-trace-base"] }, "sha512-dcma5uEWl0SXywY4vzrlOwuz4NBPyPhrzqL1NjlU6Di/OVbyYAZJPCwsR8XYDz73PGc5sU3qKSRoXWX56Ip0wA=="],
163
+
164
+ "@sentry/opentelemetry": ["@sentry/opentelemetry@10.64.0", "", { "dependencies": { "@sentry/conventions": "^0.15.1", "@sentry/core": "10.64.0" }, "peerDependencies": { "@opentelemetry/api": "^1.9.0", "@opentelemetry/core": "^1.30.1 || ^2.1.0", "@opentelemetry/sdk-trace-base": "^1.30.1 || ^2.1.0" } }, "sha512-hXw8dwSSA9/9r3VGy0PO2SJp7g5/yH2+7Bak60EkOT21AT1BwFnVEsVQyZb+UHjG7UWne/jDbwdWPSUm/rtovw=="],
165
+
166
+ "@sentry/server-utils": ["@sentry/server-utils@10.64.0", "", { "dependencies": { "@apm-js-collab/code-transformer": "^0.15.0", "@apm-js-collab/code-transformer-bundler-plugins": "^0.5.0", "@apm-js-collab/tracing-hooks": "^0.10.1", "@sentry/conventions": "^0.15.1", "@sentry/core": "10.64.0", "magic-string": "~0.30.0" } }, "sha512-d568Jhn3WBfm07dsdPsLh0q+qRj71xZEDZFsA33kizD0UuSCR8axtc2YW6aKdPhtuqgm9tHjSX35Q9vK/XmujA=="],
167
+
133
168
  "@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="],
134
169
 
135
170
  "@tsconfig/node10": ["@tsconfig/node10@1.0.12", "", {}, "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ=="],
@@ -176,6 +211,8 @@
176
211
 
177
212
  "assertion-error": ["assertion-error@2.0.1", "", {}, "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA=="],
178
213
 
214
+ "astring": ["astring@1.9.0", "", { "bin": { "astring": "bin/astring" } }, "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg=="],
215
+
179
216
  "body-parser": ["body-parser@2.2.2", "", { "dependencies": { "bytes": "^3.1.2", "content-type": "^1.0.5", "debug": "^4.4.3", "http-errors": "^2.0.0", "iconv-lite": "^0.7.0", "on-finished": "^2.4.1", "qs": "^6.14.1", "raw-body": "^3.0.1", "type-is": "^2.0.1" } }, "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA=="],
180
217
 
181
218
  "bytes": ["bytes@3.1.2", "", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="],
@@ -186,6 +223,8 @@
186
223
 
187
224
  "chai": ["chai@6.2.2", "", {}, "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg=="],
188
225
 
226
+ "cjs-module-lexer": ["cjs-module-lexer@2.2.0", "", {}, "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ=="],
227
+
189
228
  "content-disposition": ["content-disposition@1.0.1", "", {}, "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q=="],
190
229
 
191
230
  "content-type": ["content-type@1.0.5", "", {}, "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="],
@@ -224,6 +263,10 @@
224
263
 
225
264
  "escape-html": ["escape-html@1.0.3", "", {}, "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="],
226
265
 
266
+ "esquery": ["esquery@1.7.0", "", { "dependencies": { "estraverse": "^5.1.0" } }, "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g=="],
267
+
268
+ "estraverse": ["estraverse@5.3.0", "", {}, "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="],
269
+
227
270
  "estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="],
228
271
 
229
272
  "etag": ["etag@1.8.1", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="],
@@ -270,6 +313,8 @@
270
313
 
271
314
  "iconv-lite": ["iconv-lite@0.7.2", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw=="],
272
315
 
316
+ "import-in-the-middle": ["import-in-the-middle@3.3.1", "", { "dependencies": { "cjs-module-lexer": "^2.2.0", "es-module-lexer": "^2.2.0", "module-details-from-path": "^1.0.4" } }, "sha512-0rymlHSFLwZ0ixx8DaQkoIyZojJPY2a0K2nEYslhKJ6jIYO/m0IcCb7iQsFPmS7WmKwISZiIrv5Icstrw/CmqA=="],
317
+
273
318
  "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],
274
319
 
275
320
  "ip-address": ["ip-address@10.1.0", "", {}, "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q=="],
@@ -296,10 +341,14 @@
296
341
 
297
342
  "merge-descriptors": ["merge-descriptors@2.0.0", "", {}, "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g=="],
298
343
 
344
+ "meriyah": ["meriyah@6.1.4", "", {}, "sha512-Sz8FzjzI0kN13GK/6MVEsVzMZEPvOhnmmI1lU5+/1cGOiK3QUahntrNNtdVeihrO7t9JpoH75iMNXg6R6uWflQ=="],
345
+
299
346
  "mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="],
300
347
 
301
348
  "mime-types": ["mime-types@3.0.2", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A=="],
302
349
 
350
+ "module-details-from-path": ["module-details-from-path@1.0.4", "", {}, "sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w=="],
351
+
303
352
  "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
304
353
 
305
354
  "nanoid": ["nanoid@3.3.11", "", { "bin": "bin/nanoid.cjs" }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="],
@@ -342,12 +391,16 @@
342
391
 
343
392
  "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="],
344
393
 
394
+ "require-in-the-middle": ["require-in-the-middle@8.0.1", "", { "dependencies": { "debug": "^4.3.5", "module-details-from-path": "^1.0.3" } }, "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ=="],
395
+
345
396
  "rollup": ["rollup@4.56.0", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.56.0", "@rollup/rollup-android-arm64": "4.56.0", "@rollup/rollup-darwin-arm64": "4.56.0", "@rollup/rollup-darwin-x64": "4.56.0", "@rollup/rollup-freebsd-arm64": "4.56.0", "@rollup/rollup-freebsd-x64": "4.56.0", "@rollup/rollup-linux-arm-gnueabihf": "4.56.0", "@rollup/rollup-linux-arm-musleabihf": "4.56.0", "@rollup/rollup-linux-arm64-gnu": "4.56.0", "@rollup/rollup-linux-arm64-musl": "4.56.0", "@rollup/rollup-linux-loong64-gnu": "4.56.0", "@rollup/rollup-linux-loong64-musl": "4.56.0", "@rollup/rollup-linux-ppc64-gnu": "4.56.0", "@rollup/rollup-linux-ppc64-musl": "4.56.0", "@rollup/rollup-linux-riscv64-gnu": "4.56.0", "@rollup/rollup-linux-riscv64-musl": "4.56.0", "@rollup/rollup-linux-s390x-gnu": "4.56.0", "@rollup/rollup-linux-x64-gnu": "4.56.0", "@rollup/rollup-linux-x64-musl": "4.56.0", "@rollup/rollup-openbsd-x64": "4.56.0", "@rollup/rollup-openharmony-arm64": "4.56.0", "@rollup/rollup-win32-arm64-msvc": "4.56.0", "@rollup/rollup-win32-ia32-msvc": "4.56.0", "@rollup/rollup-win32-x64-gnu": "4.56.0", "@rollup/rollup-win32-x64-msvc": "4.56.0", "fsevents": "~2.3.2" }, "bin": "dist/bin/rollup" }, "sha512-9FwVqlgUHzbXtDg9RCMgodF3Ua4Na6Gau+Sdt9vyCN4RhHfVKX2DCHy3BjMLTDd47ITDhYAnTwGulWTblJSDLg=="],
346
397
 
347
398
  "router": ["router@2.2.0", "", { "dependencies": { "debug": "^4.4.0", "depd": "^2.0.0", "is-promise": "^4.0.0", "parseurl": "^1.3.3", "path-to-regexp": "^8.0.0" } }, "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ=="],
348
399
 
349
400
  "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
350
401
 
402
+ "semifies": ["semifies@1.0.0", "", {}, "sha512-xXR3KGeoxTNWPD4aBvL5NUpMTT7WMANr3EWnaS190QVkY52lqqcVRD7Q05UVbBhiWDGWMlJEUam9m7uFFGVScw=="],
403
+
351
404
  "send": ["send@1.2.1", "", { "dependencies": { "debug": "^4.4.3", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "fresh": "^2.0.0", "http-errors": "^2.0.1", "mime-types": "^3.0.2", "ms": "^2.1.3", "on-finished": "^2.4.1", "range-parser": "^1.2.1", "statuses": "^2.0.2" } }, "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ=="],
352
405
 
353
406
  "serve-static": ["serve-static@2.2.1", "", { "dependencies": { "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "parseurl": "^1.3.3", "send": "^1.2.0" } }, "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw=="],
@@ -368,6 +421,8 @@
368
421
 
369
422
  "siginfo": ["siginfo@2.0.0", "", {}, "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g=="],
370
423
 
424
+ "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
425
+
371
426
  "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="],
372
427
 
373
428
  "stackback": ["stackback@0.0.2", "", {}, "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw=="],
@@ -415,5 +470,9 @@
415
470
  "zod": ["zod@4.3.5", "", {}, "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g=="],
416
471
 
417
472
  "zod-to-json-schema": ["zod-to-json-schema@3.25.1", "", { "peerDependencies": { "zod": "^3.25 || ^4" } }, "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA=="],
473
+
474
+ "@apm-js-collab/code-transformer-bundler-plugins/es-module-lexer": ["es-module-lexer@2.3.0", "", {}, "sha512-KLdwQm2NvGLDkQDCGvmiQrhkd0JbMzXthwQAUgWjQuQdBLFa3eiBP5arXZyA+f8x+x7OXgud6bq2rxjGtHV2tw=="],
475
+
476
+ "import-in-the-middle/es-module-lexer": ["es-module-lexer@2.3.0", "", {}, "sha512-KLdwQm2NvGLDkQDCGvmiQrhkd0JbMzXthwQAUgWjQuQdBLFa3eiBP5arXZyA+f8x+x7OXgud6bq2rxjGtHV2tw=="],
418
477
  }
419
478
  }
package/dist/cli.js CHANGED
@@ -12,10 +12,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  * npx screenpipe-mcp → stdio MCP server (Claude Desktop)
13
13
  * npx screenpipe-mcp --http [...] → Streamable HTTP MCP server
14
14
  *
15
- * We dispatch here — before evaluating `./index.js` — because index.ts
16
- * does heavy work at module-load time (API-key discovery shells out to
17
- * the screenpipe CLI). That work is irrelevant in HTTP mode and would
18
- * add multi-second startup latency for nothing.
15
+ * We dispatch here — before evaluating `./index.js` — so HTTP mode never
16
+ * imports the stdio server module (which registers stdio-specific handlers
17
+ * and warms local API-key discovery). Key discovery in index.ts is now lazy
18
+ * and off the connect path, but keeping the transports' module graphs
19
+ * separate avoids importing stdio-only setup into the HTTP process.
19
20
  *
20
21
  * Background: the previous README told users to run
21
22
  * `npx screenpipe-mcp-http`, but no `screenpipe-mcp-http` *package*
@@ -24,8 +25,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
24
25
  * or `dist/http-server.js`); this dispatcher just gives users the
25
26
  * working one-liner they expected.
26
27
  */
28
+ const telemetry_js_1 = require("./telemetry.js");
27
29
  async function main() {
28
30
  const argv = process.argv.slice(2);
31
+ (0, telemetry_js_1.initMcpTelemetry)({ transport: argv.includes("--http") ? "http" : "stdio" });
29
32
  if (argv.includes("--http")) {
30
33
  const { runFromArgv } = await import("./http-server.js");
31
34
  // Pass through every flag — http-server's parser ignores unknowns
@@ -37,7 +40,9 @@ async function main() {
37
40
  // connects the stdio transport.
38
41
  await import("./index.js");
39
42
  }
40
- main().catch((error) => {
43
+ main().catch(async (error) => {
44
+ (0, telemetry_js_1.captureMcpException)(error, { phase: "cli_startup" });
45
+ await (0, telemetry_js_1.flushMcpTelemetry)();
41
46
  console.error("Fatal error:", error);
42
47
  process.exit(1);
43
48
  });
@@ -28,6 +28,7 @@ const http_1 = require("http");
28
28
  const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
29
29
  const streamableHttp_js_1 = require("@modelcontextprotocol/sdk/server/streamableHttp.js");
30
30
  const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
31
+ const telemetry_1 = require("./telemetry");
31
32
  class CliError extends Error {
32
33
  }
33
34
  exports.CliError = CliError;
@@ -311,6 +312,7 @@ function buildHttpServer(config) {
311
312
  * below.
312
313
  */
313
314
  function runFromArgv(argv) {
315
+ (0, telemetry_1.initMcpTelemetry)({ transport: "http" });
314
316
  let config;
315
317
  try {
316
318
  config = parseArgs(argv);
@@ -323,6 +325,10 @@ function runFromArgv(argv) {
323
325
  throw e;
324
326
  }
325
327
  const server = buildHttpServer(config);
328
+ server.on("error", async (error) => {
329
+ (0, telemetry_1.captureMcpException)(error, { phase: "http_server" });
330
+ await (0, telemetry_1.flushMcpTelemetry)();
331
+ });
326
332
  server.listen(config.mcpPort, config.host, () => {
327
333
  const printable = config.host === "0.0.0.0" ? "0.0.0.0 (LAN)" : config.host;
328
334
  console.log(`Screenpipe MCP HTTP server listening on ${printable}:${config.mcpPort}`);