mcp-scraper 0.4.4 → 0.4.5

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.
@@ -7,7 +7,7 @@ import {
7
7
  registerMemoryMcpTools,
8
8
  registerPaaExtractorMcpTools,
9
9
  registerSerpIntelligenceCaptureTools
10
- } from "../chunk-Z34NGK64.js";
10
+ } from "../chunk-WI4A3KFQ.js";
11
11
  import "../chunk-GWRIO6JT.js";
12
12
  import "../chunk-HPV4VOQX.js";
13
13
  import {
@@ -16,7 +16,7 @@ import {
16
16
  import "../chunk-XGIPATLV.js";
17
17
  import {
18
18
  PACKAGE_VERSION
19
- } from "../chunk-TZRPP45I.js";
19
+ } from "../chunk-UGQC2FOX.js";
20
20
  import "../chunk-M2S27J6Z.js";
21
21
 
22
22
  // bin/mcp-stdio-server.ts
@@ -0,0 +1,7 @@
1
+ // src/version.ts
2
+ var PACKAGE_VERSION = "0.4.5";
3
+
4
+ export {
5
+ PACKAGE_VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-UGQC2FOX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = '0.4.5'\n"],"mappings":";AAAO,IAAM,kBAAkB;","names":[]}
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-XGIPATLV.js";
18
18
  import {
19
19
  PACKAGE_VERSION
20
- } from "./chunk-TZRPP45I.js";
20
+ } from "./chunk-UGQC2FOX.js";
21
21
  import {
22
22
  sanitizeVendorName
23
23
  } from "./chunk-M2S27J6Z.js";
@@ -4852,7 +4852,10 @@ var BrowserOpenInputSchema = {
4852
4852
  url: z2.string().url().optional().describe("Optional URL to navigate to immediately after opening."),
4853
4853
  profile: z2.string().optional().describe("Optional saved hosted profile name to load a logged-in session for a site."),
4854
4854
  save_profile_changes: z2.boolean().optional().describe("Persist cookies/storage back to the named profile on close. Avoid parallel sessions writing to the same profile."),
4855
- timeout_seconds: z2.number().int().min(60).max(259200).optional().describe("Session lifetime before auto-termination. Defaults to 600.")
4855
+ timeout_seconds: z2.number().int().min(60).max(259200).optional().describe("Session lifetime before auto-termination. Defaults to 600."),
4856
+ extension_names: z2.array(z2.string()).optional().describe(
4857
+ "Names of extensions previously added with browser_extension_import (see browser_extension_list for what's available) to load into this session. Loading extensions restarts the browser, adding a few seconds to startup."
4858
+ )
4856
4859
  };
4857
4860
  var BrowserProfileConnectInputSchema = {
4858
4861
  email: z2.string().optional().describe("Account email for the login. Derives a stable profile name and is recorded as a note. Does NOT import existing cookies \u2014 the user signs in fresh."),
@@ -5079,6 +5082,43 @@ var BrowserProfileListOutputSchema = {
5079
5082
  connections: z2.array(BrowserProfileLogin).describe("All site logins saved in this profile, each with its current auth status and note."),
5080
5083
  count: z2.number().int().min(0)
5081
5084
  };
5085
+ var BrowserExtensionImportInputSchema = {
5086
+ store_url: z2.string().url().describe("Chrome Web Store URL of the extension to add, e.g. https://chromewebstore.google.com/detail/<slug>/<id>."),
5087
+ name: z2.string().min(1).max(64).describe('Short name to save this extension under, e.g. "ani-ai". Reuse it later in extension_names on browser_open.')
5088
+ };
5089
+ var BrowserExtensionImportOutputSchema = {
5090
+ ok: z2.boolean(),
5091
+ tool: z2.literal("browser_extension_import"),
5092
+ session_id: z2.null(),
5093
+ name: z2.string().describe("The name this extension was saved under."),
5094
+ source_url: z2.string().describe("The store URL this extension was imported from."),
5095
+ size_bytes: z2.number().nullable().describe("Size of the extension package in bytes.")
5096
+ };
5097
+ var BrowserExtensionSummary = z2.object({
5098
+ name: z2.string(),
5099
+ source: z2.string().describe('Always "store" for extensions added via browser_extension_import.'),
5100
+ source_url: NullableString2,
5101
+ size_bytes: z2.number().nullable(),
5102
+ created_at: z2.string()
5103
+ });
5104
+ var BrowserExtensionListInputSchema = {};
5105
+ var BrowserExtensionListOutputSchema = {
5106
+ ok: z2.boolean(),
5107
+ tool: z2.literal("browser_extension_list"),
5108
+ session_id: z2.null(),
5109
+ extensions: z2.array(BrowserExtensionSummary).describe("Every extension available to load via extension_names on browser_open."),
5110
+ count: z2.number().int().min(0)
5111
+ };
5112
+ var BrowserExtensionDeleteInputSchema = {
5113
+ name: z2.string().min(1).describe("Name of the extension to remove, as returned by browser_extension_list.")
5114
+ };
5115
+ var BrowserExtensionDeleteOutputSchema = {
5116
+ ok: z2.boolean(),
5117
+ tool: z2.literal("browser_extension_delete"),
5118
+ session_id: z2.null(),
5119
+ name: z2.string(),
5120
+ deleted: z2.boolean()
5121
+ };
5082
5122
  var BrowserScreenshotOutputSchema = {
5083
5123
  ...BrowserBaseOutput,
5084
5124
  tool: z2.literal("browser_screenshot"),
@@ -5694,6 +5734,71 @@ function registerBrowserAgentMcpTools(server, opts) {
5694
5734
  });
5695
5735
  }
5696
5736
  );
5737
+ server.registerTool(
5738
+ "browser_extension_import",
5739
+ {
5740
+ title: "Add Browser Extension",
5741
+ description: "Add a Chrome extension from its Chrome Web Store page so it can be loaded into browser_open sessions via extension_names. One-time setup per extension \u2014 check what's already added with browser_extension_list first. The extension starts logged out in any session; sign into it once inside a session, pairing with a saved profile (browser_open's profile + save_profile_changes) to keep it signed in on future opens.",
5742
+ inputSchema: BrowserExtensionImportInputSchema,
5743
+ outputSchema: recordOutputSchema("browser_extension_import", BrowserExtensionImportOutputSchema),
5744
+ annotations: annotations("Add Browser Extension")
5745
+ },
5746
+ async (input) => {
5747
+ const res = await req("POST", "/agent/extensions/import", { store_url: input.store_url, name: input.name });
5748
+ if (!res.ok) return errorResult("browser_extension_import", res.data);
5749
+ return structuredResult({
5750
+ ok: true,
5751
+ tool: "browser_extension_import",
5752
+ session_id: null,
5753
+ name: res.data.name,
5754
+ source_url: res.data.source_url,
5755
+ size_bytes: res.data.size_bytes ?? null
5756
+ });
5757
+ }
5758
+ );
5759
+ server.registerTool(
5760
+ "browser_extension_list",
5761
+ {
5762
+ title: "List Browser Extensions",
5763
+ description: "List extensions added via browser_extension_import, for use as extension_names on browser_open. Read-only, no cost.",
5764
+ inputSchema: BrowserExtensionListInputSchema,
5765
+ outputSchema: recordOutputSchema("browser_extension_list", BrowserExtensionListOutputSchema),
5766
+ annotations: annotations("List Browser Extensions", true)
5767
+ },
5768
+ async () => {
5769
+ const res = await req("GET", "/agent/extensions");
5770
+ if (!res.ok) return errorResult("browser_extension_list", res.data);
5771
+ const extensions = Array.isArray(res.data?.extensions) ? res.data.extensions : [];
5772
+ return structuredResult({
5773
+ ok: true,
5774
+ tool: "browser_extension_list",
5775
+ session_id: null,
5776
+ extensions,
5777
+ count: extensions.length
5778
+ });
5779
+ }
5780
+ );
5781
+ server.registerTool(
5782
+ "browser_extension_delete",
5783
+ {
5784
+ title: "Remove Browser Extension",
5785
+ description: "Remove a previously added extension by name so it can no longer be loaded via extension_names.",
5786
+ inputSchema: BrowserExtensionDeleteInputSchema,
5787
+ outputSchema: recordOutputSchema("browser_extension_delete", BrowserExtensionDeleteOutputSchema),
5788
+ annotations: { title: "Remove Browser Extension", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false }
5789
+ },
5790
+ async (input) => {
5791
+ const res = await req("DELETE", `/agent/extensions/${encodeURIComponent(input.name)}`);
5792
+ if (!res.ok) return errorResult("browser_extension_delete", res.data);
5793
+ return structuredResult({
5794
+ ok: true,
5795
+ tool: "browser_extension_delete",
5796
+ session_id: null,
5797
+ name: input.name,
5798
+ deleted: true
5799
+ });
5800
+ }
5801
+ );
5697
5802
  server.registerTool(
5698
5803
  "browser_open",
5699
5804
  {
@@ -5712,7 +5817,8 @@ function registerBrowserAgentMcpTools(server, opts) {
5712
5817
  ...profile && typeof saveProfileChanges === "boolean" ? { save_profile_changes: saveProfileChanges } : {},
5713
5818
  disable_default_proxy: true,
5714
5819
  timeout_seconds: input.timeout_seconds,
5715
- ...input.url ? { url: input.url } : {}
5820
+ ...input.url ? { url: input.url } : {},
5821
+ ...input.extension_names?.length ? { extension_names: input.extension_names } : {}
5716
5822
  });
5717
5823
  if (!open.ok) return errorResult("browser_open", open.data);
5718
5824
  const session = open.data;
@@ -8259,4 +8365,4 @@ export {
8259
8365
  registerMemoryMcpTools,
8260
8366
  MemoryMcpToolExecutor
8261
8367
  };
8262
- //# sourceMappingURL=chunk-Z34NGK64.js.map
8368
+ //# sourceMappingURL=chunk-WI4A3KFQ.js.map