mcp-use 1.2.5-dev.5 → 1.3.0-canary.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.
@@ -427,7 +427,7 @@ var McpServer = class {
427
427
  return new Proxy(this, {
428
428
  get(target, prop) {
429
429
  if (prop === "use") {
430
- return (...args) => {
430
+ return async (...args) => {
431
431
  const hasPath = typeof args[0] === "string";
432
432
  const path = hasPath ? args[0] : "*";
433
433
  const handlers = hasPath ? args.slice(1) : args;
@@ -441,7 +441,7 @@ var McpServer = class {
441
441
  (h) => h.__isExpressMiddleware
442
442
  );
443
443
  if (hasExpressMiddleware) {
444
- Promise.all(
444
+ await Promise.all(
445
445
  adaptedHandlers.map(async (h) => {
446
446
  if (h.__isExpressMiddleware) {
447
447
  const adapted = await adaptConnectMiddleware(
@@ -461,12 +461,7 @@ var McpServer = class {
461
461
  }
462
462
  }
463
463
  })
464
- ).catch((err) => {
465
- console.error(
466
- "[MIDDLEWARE] Failed to adapt Express middleware:",
467
- err
468
- );
469
- });
464
+ );
470
465
  return target;
471
466
  }
472
467
  return target.app.use(...args);
@@ -480,6 +475,13 @@ var McpServer = class {
480
475
  }
481
476
  });
482
477
  }
478
+ /**
479
+ * Gets the server base URL with fallback to host:port if not configured
480
+ * @returns The complete base URL for the server
481
+ */
482
+ getServerBaseUrl() {
483
+ return this.serverBaseUrl || `http://${this.serverHost}:${this.serverPort}`;
484
+ }
483
485
  /**
484
486
  * Define a static resource that can be accessed by clients
485
487
  *
@@ -927,7 +929,18 @@ var McpServer = class {
927
929
  baseUrl: configBaseUrl,
928
930
  port: configPort
929
931
  };
930
- return createUIResourceFromDefinition(definition, params, urlConfig);
932
+ const uiResource = createUIResourceFromDefinition(
933
+ definition,
934
+ params,
935
+ urlConfig
936
+ );
937
+ if (definition._meta && Object.keys(definition._meta).length > 0) {
938
+ uiResource.resource._meta = {
939
+ ...uiResource.resource._meta,
940
+ ...definition._meta
941
+ };
942
+ }
943
+ return uiResource;
931
944
  }
932
945
  /**
933
946
  * Build a complete URL for a widget including query parameters
@@ -1016,9 +1029,9 @@ var McpServer = class {
1016
1029
  async readBuildManifest() {
1017
1030
  try {
1018
1031
  const manifestPath = pathHelpers.join(
1019
- getCwd(),
1032
+ isDeno ? "." : getCwd(),
1020
1033
  "dist",
1021
- ".mcp-use-manifest.json"
1034
+ "mcp-use.json"
1022
1035
  );
1023
1036
  const content = await fsHelpers.readFileSync(manifestPath, "utf8");
1024
1037
  return JSON.parse(content);
@@ -1168,7 +1181,7 @@ if (container && Component) {
1168
1181
  "utf8"
1169
1182
  );
1170
1183
  }
1171
- const serverOrigin = this.serverBaseUrl || `http://${this.serverHost}:${this.serverPort}`;
1184
+ const serverOrigin = this.getServerBaseUrl();
1172
1185
  console.log(
1173
1186
  `[WIDGETS] Serving ${entries.length} widget(s) with shared Vite dev server and HMR`
1174
1187
  );
@@ -1250,14 +1263,13 @@ if (container && Component) {
1250
1263
  error
1251
1264
  );
1252
1265
  }
1253
- console.log("[WIDGET dev] Metadata:", metadata);
1254
1266
  let html = "";
1255
1267
  try {
1256
1268
  html = await fsHelpers.readFileSync(
1257
1269
  pathHelpers.join(tempDir, widget.name, "index.html"),
1258
1270
  "utf8"
1259
1271
  );
1260
- const mcpUrl = getEnv("MCP_URL") || "/";
1272
+ const mcpUrl = this.getServerBaseUrl();
1261
1273
  if (mcpUrl && html) {
1262
1274
  const htmlWithoutComments = html.replace(/<!--[\s\S]*?-->/g, "");
1263
1275
  const baseTagRegex = /<base\s+[^>]*\/?>/i;
@@ -1280,18 +1292,19 @@ if (container && Component) {
1280
1292
  }
1281
1293
  }
1282
1294
  }
1295
+ const baseUrl = this.getServerBaseUrl();
1283
1296
  html = html.replace(
1284
1297
  /src="\/mcp-use\/widgets\/([^"]+)"/g,
1285
- `src="${this.serverBaseUrl}/mcp-use/widgets/$1"`
1298
+ `src="${baseUrl}/mcp-use/widgets/$1"`
1286
1299
  );
1287
1300
  html = html.replace(
1288
1301
  /href="\/mcp-use\/widgets\/([^"]+)"/g,
1289
- `href="${this.serverBaseUrl}/mcp-use/widgets/$1"`
1302
+ `href="${baseUrl}/mcp-use/widgets/$1"`
1290
1303
  );
1291
1304
  html = html.replace(
1292
1305
  /<head[^>]*>/i,
1293
1306
  `<head>
1294
- <script>window.__getFile = (filename) => { return "${this.serverBaseUrl}/mcp-use/widgets/${widget.name}/"+filename }</script>`
1307
+ <script>window.__getFile = (filename) => { return "${baseUrl}/mcp-use/widgets/${widget.name}/"+filename }</script>`
1295
1308
  );
1296
1309
  } catch (error) {
1297
1310
  console.error(
@@ -1358,23 +1371,35 @@ if (container && Component) {
1358
1371
  async mountWidgetsProduction(options) {
1359
1372
  const baseRoute = options?.baseRoute || "/mcp-use/widgets";
1360
1373
  const widgetsDir = pathHelpers.join(
1361
- getCwd(),
1374
+ isDeno ? "." : getCwd(),
1362
1375
  "dist",
1363
1376
  "resources",
1364
1377
  "widgets"
1365
1378
  );
1366
1379
  console.log("widgetsDir", widgetsDir);
1367
1380
  this.setupWidgetRoutes();
1368
- const manifestPath = pathHelpers.join(getCwd(), "dist", ".mcp-use-manifest.json");
1381
+ const manifestPath = "./dist/mcp-use.json";
1369
1382
  let widgets = [];
1383
+ let widgetsMetadata = {};
1370
1384
  try {
1371
- const manifestContent = await fsHelpers.readFileSync(manifestPath, "utf8");
1385
+ const manifestContent = await fsHelpers.readFileSync(
1386
+ manifestPath,
1387
+ "utf8"
1388
+ );
1372
1389
  const manifest = JSON.parse(manifestContent);
1373
- if (manifest.widgets && Array.isArray(manifest.widgets)) {
1390
+ if (manifest.widgets && typeof manifest.widgets === "object" && !Array.isArray(manifest.widgets)) {
1391
+ widgets = Object.keys(manifest.widgets);
1392
+ widgetsMetadata = manifest.widgets;
1393
+ console.log(
1394
+ `[WIDGETS] Loaded ${widgets.length} widget(s) from manifest`
1395
+ );
1396
+ } else if (manifest.widgets && Array.isArray(manifest.widgets)) {
1374
1397
  widgets = manifest.widgets;
1375
- console.log(`[WIDGETS] Loaded ${widgets.length} widget(s) from manifest`);
1398
+ console.log(
1399
+ `[WIDGETS] Loaded ${widgets.length} widget(s) from manifest (legacy format)`
1400
+ );
1376
1401
  } else {
1377
- console.log("[WIDGETS] No widgets array found in manifest");
1402
+ console.log("[WIDGETS] No widgets found in manifest");
1378
1403
  }
1379
1404
  } catch (error) {
1380
1405
  console.log(
@@ -1395,9 +1420,7 @@ if (container && Component) {
1395
1420
  }
1396
1421
  }
1397
1422
  if (widgets.length === 0) {
1398
- console.log(
1399
- "[WIDGETS] No built widgets found"
1400
- );
1423
+ console.log("[WIDGETS] No built widgets found");
1401
1424
  return;
1402
1425
  }
1403
1426
  console.log(
@@ -1406,11 +1429,10 @@ if (container && Component) {
1406
1429
  for (const widgetName of widgets) {
1407
1430
  const widgetPath = pathHelpers.join(widgetsDir, widgetName);
1408
1431
  const indexPath = pathHelpers.join(widgetPath, "index.html");
1409
- const metadataPath = pathHelpers.join(widgetPath, "metadata.json");
1410
1432
  let html = "";
1411
1433
  try {
1412
1434
  html = await fsHelpers.readFileSync(indexPath, "utf8");
1413
- const mcpUrl = getEnv("MCP_URL") || "/";
1435
+ const mcpUrl = this.getServerBaseUrl();
1414
1436
  if (mcpUrl && html) {
1415
1437
  const htmlWithoutComments = html.replace(/<!--[\s\S]*?-->/g, "");
1416
1438
  const baseTagRegex = /<base\s+[^>]*\/?>/i;
@@ -1432,18 +1454,19 @@ if (container && Component) {
1432
1454
  );
1433
1455
  }
1434
1456
  }
1457
+ const baseUrl = this.getServerBaseUrl();
1435
1458
  html = html.replace(
1436
1459
  /src="\/mcp-use\/widgets\/([^"]+)"/g,
1437
- `src="${this.serverBaseUrl}/mcp-use/widgets/$1"`
1460
+ `src="${baseUrl}/mcp-use/widgets/$1"`
1438
1461
  );
1439
1462
  html = html.replace(
1440
1463
  /href="\/mcp-use\/widgets\/([^"]+)"/g,
1441
- `href="${this.serverBaseUrl}/mcp-use/widgets/$1"`
1464
+ `href="${baseUrl}/mcp-use/widgets/$1"`
1442
1465
  );
1443
1466
  html = html.replace(
1444
1467
  /<head[^>]*>/i,
1445
1468
  `<head>
1446
- <script>window.__getFile = (filename) => { return "${this.serverBaseUrl}/mcp-use/widgets/${widgetName}/"+filename }</script>`
1469
+ <script>window.__getFile = (filename) => { return "${baseUrl}/mcp-use/widgets/${widgetName}/"+filename }</script>`
1447
1470
  );
1448
1471
  }
1449
1472
  } catch (error) {
@@ -1453,25 +1476,14 @@ if (container && Component) {
1453
1476
  );
1454
1477
  continue;
1455
1478
  }
1456
- let metadata = {};
1479
+ const metadata = widgetsMetadata[widgetName] || {};
1457
1480
  let props = {};
1458
1481
  let description = `Widget: ${widgetName}`;
1459
- try {
1460
- const metadataContent = await fsHelpers.readFileSync(
1461
- metadataPath,
1462
- "utf8"
1463
- );
1464
- metadata = JSON.parse(metadataContent);
1465
- if (metadata.description) {
1466
- description = metadata.description;
1467
- }
1468
- if (metadata.inputs) {
1469
- props = metadata.inputs;
1470
- }
1471
- } catch (error) {
1472
- console.log(
1473
- `[WIDGET] No metadata found for ${widgetName}, using defaults`
1474
- );
1482
+ if (metadata.description) {
1483
+ description = metadata.description;
1484
+ }
1485
+ if (metadata.inputs) {
1486
+ props = metadata.inputs;
1475
1487
  }
1476
1488
  this.uiResource({
1477
1489
  name: widgetName,
@@ -1749,16 +1761,53 @@ if (container && Component) {
1749
1761
  await this.mountMcp();
1750
1762
  await this.mountInspector();
1751
1763
  if (isDeno) {
1764
+ const corsHeaders = {
1765
+ "Access-Control-Allow-Origin": "*",
1766
+ "Access-Control-Allow-Headers": "authorization, x-client-info, apikey, content-type"
1767
+ };
1752
1768
  globalThis.Deno.serve(
1753
1769
  { port: this.serverPort, hostname: this.serverHost },
1754
- this.app.fetch
1755
- );
1756
- console.log(
1757
- `[SERVER] Listening on http://${this.serverHost}:${this.serverPort}`
1758
- );
1759
- console.log(
1760
- `[MCP] Endpoints: http://${this.serverHost}:${this.serverPort}/mcp`
1770
+ async (req) => {
1771
+ if (req.method === "OPTIONS") {
1772
+ return new Response("ok", { headers: corsHeaders });
1773
+ }
1774
+ const url = new URL(req.url);
1775
+ const pathname = url.pathname;
1776
+ let newPathname = pathname;
1777
+ const functionsMatch = pathname.match(
1778
+ /^\/functions\/v1\/[^/]+(\/.*)?$/
1779
+ );
1780
+ if (functionsMatch) {
1781
+ newPathname = functionsMatch[1] || "/";
1782
+ } else {
1783
+ const functionNameMatch = pathname.match(/^\/([^/]+)(\/.*)?$/);
1784
+ if (functionNameMatch && functionNameMatch[2]) {
1785
+ newPathname = functionNameMatch[2] || "/";
1786
+ }
1787
+ }
1788
+ let finalReq = req;
1789
+ if (newPathname !== pathname) {
1790
+ const newUrl = new URL(newPathname + url.search, url.origin);
1791
+ finalReq = new Request(newUrl, {
1792
+ method: req.method,
1793
+ headers: req.headers,
1794
+ body: req.body,
1795
+ redirect: req.redirect
1796
+ });
1797
+ }
1798
+ const response = await this.app.fetch(finalReq);
1799
+ const newHeaders = new Headers(response.headers);
1800
+ Object.entries(corsHeaders).forEach(([key, value]) => {
1801
+ newHeaders.set(key, value);
1802
+ });
1803
+ return new Response(response.body, {
1804
+ status: response.status,
1805
+ statusText: response.statusText,
1806
+ headers: newHeaders
1807
+ });
1808
+ }
1761
1809
  );
1810
+ console.log(`[SERVER] Listening`);
1762
1811
  } else {
1763
1812
  const { serve } = await import("@hono/node-server");
1764
1813
  serve(
@@ -1992,18 +2041,19 @@ if (container && Component) {
1992
2041
  );
1993
2042
  try {
1994
2043
  let html = await fsHelpers.readFileSync(filePath, "utf8");
2044
+ const baseUrl = this.getServerBaseUrl();
1995
2045
  html = html.replace(
1996
2046
  /src="\/mcp-use\/widgets\/([^"]+)"/g,
1997
- `src="${this.serverBaseUrl}/mcp-use/widgets/$1"`
2047
+ `src="${baseUrl}/mcp-use/widgets/$1"`
1998
2048
  );
1999
2049
  html = html.replace(
2000
2050
  /href="\/mcp-use\/widgets\/([^"]+)"/g,
2001
- `href="${this.serverBaseUrl}/mcp-use/widgets/$1"`
2051
+ `href="${baseUrl}/mcp-use/widgets/$1"`
2002
2052
  );
2003
2053
  html = html.replace(
2004
2054
  /<head[^>]*>/i,
2005
2055
  `<head>
2006
- <script>window.__getFile = (filename) => { return "${this.serverBaseUrl}/mcp-use/widgets/${widget}/"+filename }</script>`
2056
+ <script>window.__getFile = (filename) => { return "${baseUrl}/mcp-use/widgets/${widget}/"+filename }</script>`
2007
2057
  );
2008
2058
  return c.html(html);
2009
2059
  } catch {
@@ -20,6 +20,11 @@ export declare class McpServer {
20
20
  * @returns A proxied McpServer instance that supports both MCP and Hono methods
21
21
  */
22
22
  constructor(config: ServerConfig);
23
+ /**
24
+ * Gets the server base URL with fallback to host:port if not configured
25
+ * @returns The complete base URL for the server
26
+ */
27
+ private getServerBaseUrl;
23
28
  /**
24
29
  * Define a static resource that can be accessed by clients
25
30
  *
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../../src/server/mcp-server.ts"],"names":[],"mappings":"AAKA,OAAO,EAAsB,KAAK,IAAI,IAAI,QAAQ,EAAa,MAAM,MAAM,CAAC;AAY5E,OAAO,KAAK,EAEV,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,EAC1B,YAAY,EACZ,cAAc,EAEd,oBAAoB,EAErB,MAAM,kBAAkB,CAAC;AA4G1B,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,GAAG,CAAW;IACtB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,UAAU,CAAC,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,aAAa,CAAC,CAAS;IAE/B;;;;;;;;;OASG;gBACS,MAAM,EAAE,YAAY;IA2GhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,QAAQ,CAAC,kBAAkB,EA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AO,CAAC,EAAE;QACrB,QAAQ,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,aAAa,CAAC;KACtD,KAAK,OAAO,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;CACpD,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,OAAO,CAAC,YAAY,CAAM,GACjC,iBAAiB,CASnB"}
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "mcp-use",
3
3
  "type": "module",
4
- "version": "1.2.5-dev.5",
5
- "packageManager": "pnpm@10.6.1",
4
+ "version": "1.3.0-canary.1",
6
5
  "description": "Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents and Clients + MCP Servers with support for MCP-UI.",
7
6
  "author": "mcp-use, Inc.",
8
7
  "license": "MIT",
@@ -63,44 +62,6 @@
63
62
  "registry": "https://registry.npmjs.org",
64
63
  "access": "public"
65
64
  },
66
- "scripts": {
67
- "build": "rm -rf dist && tsup && tsc --emitDeclarationOnly --declaration",
68
- "test": "vitest",
69
- "test:run": "vitest run",
70
- "test:unit": "vitest run --exclude tests/integration/**",
71
- "test:simple": "vitest run tests/stream_events_simple.test.ts",
72
- "test:integration": "vitest run tests/integration",
73
- "test:integration:agent": "vitest run tests/integration/agent",
74
- "test:integration:run": "vitest run tests/integration/agent/test_agent_run.test.ts",
75
- "test:integration:stream": "vitest run tests/integration/agent/test_agent_stream.test.ts",
76
- "test:integration:structured": "vitest run tests/integration/agent/test_agent_structured_output.test.ts",
77
- "test:integration:manager": "vitest run tests/integration/agent/test_server_manager.test.ts",
78
- "test:integration:observability": "vitest run tests/integration/agent/test_agent_observability.test.ts",
79
- "watch": "tsc --watch",
80
- "start": "node dist/index.js",
81
- "prepublishOnly": "npm run build",
82
- "fmt": "eslint --fix",
83
- "release": "npm version patch --tag-version-prefix=v && git push --follow-tags",
84
- "release:minor": "npm version minor --tag-version-prefix=v && git push --follow-tags",
85
- "release:major": "npm version major --tag-version-prefix=v && git push --follow-tags",
86
- "prepare": "husky",
87
- "example:airbnb": "tsx examples/client/airbnb_use.ts",
88
- "example:browser": "tsx examples/client/browser_use.ts",
89
- "example:chat": "tsx examples/client/chat_example.ts",
90
- "example:stream": "tsx examples/client/stream_example.ts",
91
- "example:stream_events": "tsx examples/client/stream_events_example.ts",
92
- "example:ai_sdk": "tsx examples/client/ai_sdk_example.ts",
93
- "example:filesystem": "tsx examples/client/filesystem_use.ts",
94
- "example:http": "tsx examples/client/http_example.ts",
95
- "example:everything": "tsx examples/client/mcp_everything.ts",
96
- "example:multi": "tsx examples/client/multi_server_example.ts",
97
- "example:sandbox": "tsx examples/client/sandbox_everything.ts",
98
- "example:oauth": "tsx examples/client/simple_oauth_example.ts",
99
- "example:blender": "tsx examples/client/blender_use.ts",
100
- "example:add_server": "tsx examples/client/add_server_tool.ts",
101
- "example:structured": "tsx examples/client/structured_output.ts",
102
- "example:observability": "tsx examples/client/observability.ts"
103
- },
104
65
  "peerDependencies": {
105
66
  "@langchain/anthropic": "^1.0.0",
106
67
  "@langchain/openai": "^1.0.0",
@@ -127,8 +88,6 @@
127
88
  "@hono/node-server": "^1.13.0",
128
89
  "@langchain/core": "^1.0.1",
129
90
  "@mcp-ui/server": "^5.12.0",
130
- "@mcp-use/cli": "workspace:*",
131
- "@mcp-use/inspector": "workspace:*",
132
91
  "@modelcontextprotocol/sdk": "1.20.0",
133
92
  "@scarf/scarf": "^1.4.0",
134
93
  "ai": "^4.3.19",
@@ -147,7 +106,9 @@
147
106
  "winston-transport-browserconsole": "^1.0.5",
148
107
  "ws": "^8.18.2",
149
108
  "zod": "^3.25.48",
150
- "zod-to-json-schema": "^3.24.6"
109
+ "zod-to-json-schema": "^3.24.6",
110
+ "@mcp-use/cli": "2.2.0-canary.1",
111
+ "@mcp-use/inspector": "0.5.0-canary.1"
151
112
  },
152
113
  "optionalDependencies": {
153
114
  "@tailwindcss/vite": "^4.1.15",
@@ -185,5 +146,41 @@
185
146
  "eslint --fix",
186
147
  "eslint"
187
148
  ]
149
+ },
150
+ "scripts": {
151
+ "build": "rm -rf dist && tsup && tsc --emitDeclarationOnly --declaration",
152
+ "test": "vitest",
153
+ "test:run": "vitest run",
154
+ "test:unit": "vitest run --exclude tests/integration/**",
155
+ "test:simple": "vitest run tests/stream_events_simple.test.ts",
156
+ "test:integration": "vitest run tests/integration",
157
+ "test:integration:agent": "vitest run tests/integration/agent",
158
+ "test:integration:run": "vitest run tests/integration/agent/test_agent_run.test.ts",
159
+ "test:integration:stream": "vitest run tests/integration/agent/test_agent_stream.test.ts",
160
+ "test:integration:structured": "vitest run tests/integration/agent/test_agent_structured_output.test.ts",
161
+ "test:integration:manager": "vitest run tests/integration/agent/test_server_manager.test.ts",
162
+ "test:integration:observability": "vitest run tests/integration/agent/test_agent_observability.test.ts",
163
+ "watch": "tsc --watch",
164
+ "start": "node dist/index.js",
165
+ "fmt": "eslint --fix",
166
+ "release": "npm version patch --tag-version-prefix=v && git push --follow-tags",
167
+ "release:minor": "npm version minor --tag-version-prefix=v && git push --follow-tags",
168
+ "release:major": "npm version major --tag-version-prefix=v && git push --follow-tags",
169
+ "example:airbnb": "tsx examples/client/airbnb_use.ts",
170
+ "example:browser": "tsx examples/client/browser_use.ts",
171
+ "example:chat": "tsx examples/client/chat_example.ts",
172
+ "example:stream": "tsx examples/client/stream_example.ts",
173
+ "example:stream_events": "tsx examples/client/stream_events_example.ts",
174
+ "example:ai_sdk": "tsx examples/client/ai_sdk_example.ts",
175
+ "example:filesystem": "tsx examples/client/filesystem_use.ts",
176
+ "example:http": "tsx examples/client/http_example.ts",
177
+ "example:everything": "tsx examples/client/mcp_everything.ts",
178
+ "example:multi": "tsx examples/client/multi_server_example.ts",
179
+ "example:sandbox": "tsx examples/client/sandbox_everything.ts",
180
+ "example:oauth": "tsx examples/client/simple_oauth_example.ts",
181
+ "example:blender": "tsx examples/client/blender_use.ts",
182
+ "example:add_server": "tsx examples/client/add_server_tool.ts",
183
+ "example:structured": "tsx examples/client/structured_output.ts",
184
+ "example:observability": "tsx examples/client/observability.ts"
188
185
  }
189
- }
186
+ }