mcp-use 1.2.5-dev.5 → 1.3.0-canary.0
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/dist/.tsbuildinfo +1 -1
- package/dist/{chunk-37MPZ3D6.js → chunk-TIUSJAAE.js} +12 -0
- package/dist/{chunk-X2HJQBDI.js → chunk-VNEGDXZO.js} +26 -1
- package/dist/index.cjs +37 -0
- package/dist/index.js +2 -2
- package/dist/src/browser.cjs +12 -0
- package/dist/src/browser.js +1 -1
- package/dist/src/connectors/base.d.ts +11 -0
- package/dist/src/connectors/base.d.ts.map +1 -1
- package/dist/src/react/index.cjs +37 -0
- package/dist/src/react/index.js +2 -2
- package/dist/src/react/types.d.ts +7 -0
- package/dist/src/react/types.d.ts.map +1 -1
- package/dist/src/react/useMcp.d.ts.map +1 -1
- package/dist/src/server/index.cjs +74 -45
- package/dist/src/server/index.js +74 -45
- package/dist/src/server/mcp-server.d.ts.map +1 -1
- package/package.json +41 -44
package/dist/src/server/index.js
CHANGED
|
@@ -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
|
-
)
|
|
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);
|
|
@@ -1016,9 +1011,9 @@ var McpServer = class {
|
|
|
1016
1011
|
async readBuildManifest() {
|
|
1017
1012
|
try {
|
|
1018
1013
|
const manifestPath = pathHelpers.join(
|
|
1019
|
-
getCwd(),
|
|
1014
|
+
isDeno ? "." : getCwd(),
|
|
1020
1015
|
"dist",
|
|
1021
|
-
"
|
|
1016
|
+
"mcp-use.json"
|
|
1022
1017
|
);
|
|
1023
1018
|
const content = await fsHelpers.readFileSync(manifestPath, "utf8");
|
|
1024
1019
|
return JSON.parse(content);
|
|
@@ -1250,7 +1245,6 @@ if (container && Component) {
|
|
|
1250
1245
|
error
|
|
1251
1246
|
);
|
|
1252
1247
|
}
|
|
1253
|
-
console.log("[WIDGET dev] Metadata:", metadata);
|
|
1254
1248
|
let html = "";
|
|
1255
1249
|
try {
|
|
1256
1250
|
html = await fsHelpers.readFileSync(
|
|
@@ -1358,23 +1352,35 @@ if (container && Component) {
|
|
|
1358
1352
|
async mountWidgetsProduction(options) {
|
|
1359
1353
|
const baseRoute = options?.baseRoute || "/mcp-use/widgets";
|
|
1360
1354
|
const widgetsDir = pathHelpers.join(
|
|
1361
|
-
getCwd(),
|
|
1355
|
+
isDeno ? "." : getCwd(),
|
|
1362
1356
|
"dist",
|
|
1363
1357
|
"resources",
|
|
1364
1358
|
"widgets"
|
|
1365
1359
|
);
|
|
1366
1360
|
console.log("widgetsDir", widgetsDir);
|
|
1367
1361
|
this.setupWidgetRoutes();
|
|
1368
|
-
const manifestPath =
|
|
1362
|
+
const manifestPath = "./dist/mcp-use.json";
|
|
1369
1363
|
let widgets = [];
|
|
1364
|
+
let widgetsMetadata = {};
|
|
1370
1365
|
try {
|
|
1371
|
-
const manifestContent = await fsHelpers.readFileSync(
|
|
1366
|
+
const manifestContent = await fsHelpers.readFileSync(
|
|
1367
|
+
manifestPath,
|
|
1368
|
+
"utf8"
|
|
1369
|
+
);
|
|
1372
1370
|
const manifest = JSON.parse(manifestContent);
|
|
1373
|
-
if (manifest.widgets && Array.isArray(manifest.widgets)) {
|
|
1371
|
+
if (manifest.widgets && typeof manifest.widgets === "object" && !Array.isArray(manifest.widgets)) {
|
|
1372
|
+
widgets = Object.keys(manifest.widgets);
|
|
1373
|
+
widgetsMetadata = manifest.widgets;
|
|
1374
|
+
console.log(
|
|
1375
|
+
`[WIDGETS] Loaded ${widgets.length} widget(s) from manifest`
|
|
1376
|
+
);
|
|
1377
|
+
} else if (manifest.widgets && Array.isArray(manifest.widgets)) {
|
|
1374
1378
|
widgets = manifest.widgets;
|
|
1375
|
-
console.log(
|
|
1379
|
+
console.log(
|
|
1380
|
+
`[WIDGETS] Loaded ${widgets.length} widget(s) from manifest (legacy format)`
|
|
1381
|
+
);
|
|
1376
1382
|
} else {
|
|
1377
|
-
console.log("[WIDGETS] No widgets
|
|
1383
|
+
console.log("[WIDGETS] No widgets found in manifest");
|
|
1378
1384
|
}
|
|
1379
1385
|
} catch (error) {
|
|
1380
1386
|
console.log(
|
|
@@ -1395,9 +1401,7 @@ if (container && Component) {
|
|
|
1395
1401
|
}
|
|
1396
1402
|
}
|
|
1397
1403
|
if (widgets.length === 0) {
|
|
1398
|
-
console.log(
|
|
1399
|
-
"[WIDGETS] No built widgets found"
|
|
1400
|
-
);
|
|
1404
|
+
console.log("[WIDGETS] No built widgets found");
|
|
1401
1405
|
return;
|
|
1402
1406
|
}
|
|
1403
1407
|
console.log(
|
|
@@ -1406,7 +1410,6 @@ if (container && Component) {
|
|
|
1406
1410
|
for (const widgetName of widgets) {
|
|
1407
1411
|
const widgetPath = pathHelpers.join(widgetsDir, widgetName);
|
|
1408
1412
|
const indexPath = pathHelpers.join(widgetPath, "index.html");
|
|
1409
|
-
const metadataPath = pathHelpers.join(widgetPath, "metadata.json");
|
|
1410
1413
|
let html = "";
|
|
1411
1414
|
try {
|
|
1412
1415
|
html = await fsHelpers.readFileSync(indexPath, "utf8");
|
|
@@ -1453,25 +1456,14 @@ if (container && Component) {
|
|
|
1453
1456
|
);
|
|
1454
1457
|
continue;
|
|
1455
1458
|
}
|
|
1456
|
-
|
|
1459
|
+
const metadata = widgetsMetadata[widgetName] || {};
|
|
1457
1460
|
let props = {};
|
|
1458
1461
|
let description = `Widget: ${widgetName}`;
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
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
|
-
);
|
|
1462
|
+
if (metadata.description) {
|
|
1463
|
+
description = metadata.description;
|
|
1464
|
+
}
|
|
1465
|
+
if (metadata.inputs) {
|
|
1466
|
+
props = metadata.inputs;
|
|
1475
1467
|
}
|
|
1476
1468
|
this.uiResource({
|
|
1477
1469
|
name: widgetName,
|
|
@@ -1749,16 +1741,53 @@ if (container && Component) {
|
|
|
1749
1741
|
await this.mountMcp();
|
|
1750
1742
|
await this.mountInspector();
|
|
1751
1743
|
if (isDeno) {
|
|
1744
|
+
const corsHeaders = {
|
|
1745
|
+
"Access-Control-Allow-Origin": "*",
|
|
1746
|
+
"Access-Control-Allow-Headers": "authorization, x-client-info, apikey, content-type"
|
|
1747
|
+
};
|
|
1752
1748
|
globalThis.Deno.serve(
|
|
1753
1749
|
{ port: this.serverPort, hostname: this.serverHost },
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1750
|
+
async (req) => {
|
|
1751
|
+
if (req.method === "OPTIONS") {
|
|
1752
|
+
return new Response("ok", { headers: corsHeaders });
|
|
1753
|
+
}
|
|
1754
|
+
const url = new URL(req.url);
|
|
1755
|
+
const pathname = url.pathname;
|
|
1756
|
+
let newPathname = pathname;
|
|
1757
|
+
const functionsMatch = pathname.match(
|
|
1758
|
+
/^\/functions\/v1\/[^/]+(\/.*)?$/
|
|
1759
|
+
);
|
|
1760
|
+
if (functionsMatch) {
|
|
1761
|
+
newPathname = functionsMatch[1] || "/";
|
|
1762
|
+
} else {
|
|
1763
|
+
const functionNameMatch = pathname.match(/^\/([^/]+)(\/.*)?$/);
|
|
1764
|
+
if (functionNameMatch && functionNameMatch[2]) {
|
|
1765
|
+
newPathname = functionNameMatch[2] || "/";
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
let finalReq = req;
|
|
1769
|
+
if (newPathname !== pathname) {
|
|
1770
|
+
const newUrl = new URL(newPathname + url.search, url.origin);
|
|
1771
|
+
finalReq = new Request(newUrl, {
|
|
1772
|
+
method: req.method,
|
|
1773
|
+
headers: req.headers,
|
|
1774
|
+
body: req.body,
|
|
1775
|
+
redirect: req.redirect
|
|
1776
|
+
});
|
|
1777
|
+
}
|
|
1778
|
+
const response = await this.app.fetch(finalReq);
|
|
1779
|
+
const newHeaders = new Headers(response.headers);
|
|
1780
|
+
Object.entries(corsHeaders).forEach(([key, value]) => {
|
|
1781
|
+
newHeaders.set(key, value);
|
|
1782
|
+
});
|
|
1783
|
+
return new Response(response.body, {
|
|
1784
|
+
status: response.status,
|
|
1785
|
+
statusText: response.statusText,
|
|
1786
|
+
headers: newHeaders
|
|
1787
|
+
});
|
|
1788
|
+
}
|
|
1761
1789
|
);
|
|
1790
|
+
console.log(`[SERVER] Listening`);
|
|
1762
1791
|
} else {
|
|
1763
1792
|
const { serve } = await import("@hono/node-server");
|
|
1764
1793
|
serve(
|
|
@@ -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;
|
|
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;gBAC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3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"packageManager": "pnpm@10.6.1",
|
|
4
|
+
"version": "1.3.0-canary.0",
|
|
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.0",
|
|
111
|
+
"@mcp-use/inspector": "0.5.0-canary.0"
|
|
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
|
+
}
|