mcp-use 1.11.0-canary.9 → 1.11.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-N3DO4P2L.js → chunk-A4QJRN7Z.js} +2 -2
- package/dist/{chunk-UCPSHMNO.js → chunk-B7AGEK7F.js} +1 -1
- package/dist/{chunk-HU2DGJ5J.js → chunk-GN5HOAV3.js} +491 -5
- package/dist/{chunk-D3CNYAYE.js → chunk-QPIDKGV4.js} +199 -8
- package/dist/{chunk-ZFZPZ4GE.js → chunk-V77WS6CS.js} +9 -0
- package/dist/{chunk-5QFJZ7H3.js → chunk-VRHAF2WT.js} +10 -4
- package/dist/{chunk-F3BZFJCD.js → chunk-Y2HHHJQB.js} +10 -5
- package/dist/{chunk-Q5LZL6BH.js → chunk-ZLZOOXMJ.js} +96 -43
- package/dist/index.cjs +122 -47
- package/dist/index.js +15 -19
- package/dist/src/agents/index.cjs +108 -44
- package/dist/src/agents/index.d.ts +1 -1
- package/dist/src/agents/index.d.ts.map +1 -1
- package/dist/src/agents/index.js +7 -11
- package/dist/src/agents/mcp_agent.d.ts.map +1 -1
- package/dist/src/{client/prompts.d.ts → agents/prompts/index.d.ts} +3 -3
- package/dist/src/agents/prompts/index.d.ts.map +1 -0
- package/dist/src/browser.cjs +115 -45
- package/dist/src/browser.js +10 -13
- package/dist/src/client/browser.d.ts.map +1 -1
- package/dist/src/client.cjs +108 -43
- package/dist/src/client.d.ts +2 -0
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/client.js +6 -5
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/connectors/http.d.ts +2 -0
- package/dist/src/connectors/http.d.ts.map +1 -1
- package/dist/src/react/index.cjs +119 -46
- package/dist/src/react/index.js +7 -8
- package/dist/src/react/useMcp.d.ts.map +1 -1
- package/dist/src/server/index.cjs +178 -113
- package/dist/src/server/index.js +92 -80
- package/dist/src/server/types/widget.d.ts +2 -2
- package/dist/src/server/types/widget.d.ts.map +1 -1
- package/dist/src/server/widgets/mount-widgets-dev.d.ts.map +1 -1
- package/dist/src/server/widgets/ui-resource-registration.d.ts.map +1 -1
- package/dist/src/telemetry/telemetry.d.ts +1 -0
- package/dist/src/telemetry/telemetry.d.ts.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.d.ts.map +1 -1
- package/dist/{tool-execution-helpers-MXVN6YNU.js → tool-execution-helpers-ZUA5D5IO.js} +2 -2
- package/package.json +49 -52
- package/dist/chunk-ESMOFYJ6.js +0 -2638
- package/dist/chunk-M7WATKYM.js +0 -204
- package/dist/chunk-OWPXM4QQ.js +0 -12
- package/dist/chunk-WW3A2EKQ.js +0 -1055
- package/dist/chunk-XEFWIBQF.js +0 -491
- package/dist/src/client/prompts.cjs +0 -407
- package/dist/src/client/prompts.d.ts.map +0 -1
- package/dist/src/client/prompts.js +0 -11
package/dist/src/server/index.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createRequest,
|
|
3
|
-
sendNotificationToAll,
|
|
4
|
-
sendNotificationToSession
|
|
5
|
-
} from "../../chunk-UWWLWLS2.js";
|
|
6
1
|
import {
|
|
7
2
|
getRequestContext,
|
|
8
3
|
hasRequestContext,
|
|
@@ -12,13 +7,18 @@ import {
|
|
|
12
7
|
createEnhancedContext,
|
|
13
8
|
findSessionContext,
|
|
14
9
|
isValidLogLevel
|
|
15
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-B7AGEK7F.js";
|
|
16
11
|
import {
|
|
17
12
|
convertToolResultToResourceResult
|
|
18
13
|
} from "../../chunk-362PI25Z.js";
|
|
19
14
|
import {
|
|
20
15
|
convertToolResultToPromptResult
|
|
21
16
|
} from "../../chunk-2EYAMIT3.js";
|
|
17
|
+
import {
|
|
18
|
+
createRequest,
|
|
19
|
+
sendNotificationToAll,
|
|
20
|
+
sendNotificationToSession
|
|
21
|
+
} from "../../chunk-UWWLWLS2.js";
|
|
22
22
|
import "../../chunk-KUEVOU4M.js";
|
|
23
23
|
import {
|
|
24
24
|
Telemetry,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
getPackageVersion,
|
|
31
31
|
isDeno,
|
|
32
32
|
pathHelpers
|
|
33
|
-
} from "../../chunk-
|
|
33
|
+
} from "../../chunk-ZLZOOXMJ.js";
|
|
34
34
|
import "../../chunk-FRUZDWXH.js";
|
|
35
35
|
import {
|
|
36
36
|
__name
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
McpError,
|
|
46
46
|
ErrorCode
|
|
47
47
|
} from "@mcp-use/modelcontextprotocol-sdk/types.js";
|
|
48
|
-
import { z as
|
|
48
|
+
import { z as z3 } from "zod";
|
|
49
49
|
|
|
50
50
|
// src/server/utils/response-helpers.ts
|
|
51
51
|
function text(content) {
|
|
@@ -1514,12 +1514,16 @@ export default PostHog;
|
|
|
1514
1514
|
const mod = await viteServer.ssrLoadModule(widget2.entry);
|
|
1515
1515
|
if (mod.widgetMetadata) {
|
|
1516
1516
|
metadata = mod.widgetMetadata;
|
|
1517
|
-
|
|
1517
|
+
const schemaField = metadata.props || metadata.inputs;
|
|
1518
|
+
if (schemaField) {
|
|
1518
1519
|
try {
|
|
1519
|
-
metadata.
|
|
1520
|
+
metadata.props = schemaField;
|
|
1521
|
+
if (!metadata.inputs) {
|
|
1522
|
+
metadata.inputs = schemaField;
|
|
1523
|
+
}
|
|
1520
1524
|
} catch (error2) {
|
|
1521
1525
|
console.warn(
|
|
1522
|
-
`[WIDGET] Failed to extract
|
|
1526
|
+
`[WIDGET] Failed to extract schema for ${widget2.name}:`,
|
|
1523
1527
|
error2
|
|
1524
1528
|
);
|
|
1525
1529
|
}
|
|
@@ -1707,6 +1711,7 @@ function setupWidgetRoutes(app, serverConfig) {
|
|
|
1707
1711
|
__name(setupWidgetRoutes, "setupWidgetRoutes");
|
|
1708
1712
|
|
|
1709
1713
|
// src/server/widgets/ui-resource-registration.ts
|
|
1714
|
+
import z from "zod";
|
|
1710
1715
|
function uiResourceRegistration(server, definition) {
|
|
1711
1716
|
const displayName = definition.title || definition.name;
|
|
1712
1717
|
if (definition.type === "appsSdk" && definition._meta) {
|
|
@@ -1812,69 +1817,76 @@ function uiResourceRegistration(server, definition) {
|
|
|
1812
1817
|
}
|
|
1813
1818
|
}
|
|
1814
1819
|
}
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1820
|
+
const widgetMetadata2 = definition._meta?.["mcp-use/widget"];
|
|
1821
|
+
const propsOrSchema = definition.props || widgetMetadata2?.props || widgetMetadata2?.inputs || widgetMetadata2?.schema;
|
|
1822
|
+
const isZodSchema = propsOrSchema && typeof propsOrSchema === "object" && propsOrSchema instanceof z.ZodObject;
|
|
1823
|
+
const toolDefinition = {
|
|
1824
|
+
name: definition.name,
|
|
1825
|
+
title: definition.title,
|
|
1826
|
+
description: definition.description,
|
|
1827
|
+
annotations: definition.toolAnnotations,
|
|
1828
|
+
_meta: Object.keys(toolMetadata).length > 0 ? toolMetadata : void 0
|
|
1829
|
+
};
|
|
1830
|
+
if (isZodSchema) {
|
|
1831
|
+
toolDefinition.schema = propsOrSchema;
|
|
1832
|
+
} else if (propsOrSchema) {
|
|
1833
|
+
toolDefinition.inputs = convertPropsToInputs(
|
|
1834
|
+
propsOrSchema
|
|
1835
|
+
);
|
|
1836
|
+
}
|
|
1837
|
+
server.tool(toolDefinition, async (params) => {
|
|
1838
|
+
const uiResource = await createWidgetUIResource(
|
|
1839
|
+
definition,
|
|
1840
|
+
params,
|
|
1841
|
+
serverConfig
|
|
1842
|
+
);
|
|
1843
|
+
if (definition.type === "appsSdk") {
|
|
1844
|
+
const randomId = Math.random().toString(36).substring(2, 15);
|
|
1845
|
+
const uniqueUri = generateWidgetUri(
|
|
1846
|
+
definition.name,
|
|
1847
|
+
server.buildId,
|
|
1848
|
+
".html",
|
|
1849
|
+
randomId
|
|
1829
1850
|
);
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
} else {
|
|
1848
|
-
toolOutputResult = {
|
|
1849
|
-
content: [
|
|
1850
|
-
{
|
|
1851
|
-
type: "text",
|
|
1852
|
-
text: `Displaying ${displayName}`
|
|
1853
|
-
}
|
|
1854
|
-
]
|
|
1855
|
-
};
|
|
1856
|
-
}
|
|
1857
|
-
const content = toolOutputResult.content || [
|
|
1858
|
-
{ type: "text", text: `Displaying ${displayName}` }
|
|
1859
|
-
];
|
|
1860
|
-
return {
|
|
1861
|
-
_meta: uniqueToolMetadata,
|
|
1862
|
-
content,
|
|
1863
|
-
structuredContent: toolOutputResult.structuredContent
|
|
1851
|
+
const uniqueToolMetadata = {
|
|
1852
|
+
...toolMetadata,
|
|
1853
|
+
"openai/outputTemplate": uniqueUri,
|
|
1854
|
+
"mcp-use/props": params
|
|
1855
|
+
// Pass params as widget props
|
|
1856
|
+
};
|
|
1857
|
+
let toolOutputResult;
|
|
1858
|
+
if (definition.toolOutput) {
|
|
1859
|
+
toolOutputResult = typeof definition.toolOutput === "function" ? definition.toolOutput(params) : definition.toolOutput;
|
|
1860
|
+
} else {
|
|
1861
|
+
toolOutputResult = {
|
|
1862
|
+
content: [
|
|
1863
|
+
{
|
|
1864
|
+
type: "text",
|
|
1865
|
+
text: `Displaying ${displayName}`
|
|
1866
|
+
}
|
|
1867
|
+
]
|
|
1864
1868
|
};
|
|
1865
1869
|
}
|
|
1870
|
+
const content = toolOutputResult.content || [
|
|
1871
|
+
{ type: "text", text: `Displaying ${displayName}` }
|
|
1872
|
+
];
|
|
1866
1873
|
return {
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
text: `Displaying ${displayName}`,
|
|
1871
|
-
description: `Show MCP-UI widget for ${displayName}`
|
|
1872
|
-
},
|
|
1873
|
-
uiResource
|
|
1874
|
-
]
|
|
1874
|
+
_meta: uniqueToolMetadata,
|
|
1875
|
+
content,
|
|
1876
|
+
structuredContent: toolOutputResult.structuredContent
|
|
1875
1877
|
};
|
|
1876
1878
|
}
|
|
1877
|
-
|
|
1879
|
+
return {
|
|
1880
|
+
content: [
|
|
1881
|
+
{
|
|
1882
|
+
type: "text",
|
|
1883
|
+
text: `Displaying ${displayName}`,
|
|
1884
|
+
description: `Show MCP-UI widget for ${displayName}`
|
|
1885
|
+
},
|
|
1886
|
+
uiResource
|
|
1887
|
+
]
|
|
1888
|
+
};
|
|
1889
|
+
});
|
|
1878
1890
|
}
|
|
1879
1891
|
return server;
|
|
1880
1892
|
}
|
|
@@ -1936,9 +1948,9 @@ async function mountInspectorUI(app, serverHost, serverPort, isProduction) {
|
|
|
1936
1948
|
__name(mountInspectorUI, "mountInspectorUI");
|
|
1937
1949
|
|
|
1938
1950
|
// src/server/tools/schema-helpers.ts
|
|
1939
|
-
import { z } from "zod";
|
|
1951
|
+
import { z as z2 } from "zod";
|
|
1940
1952
|
function convertZodSchemaToParams(zodSchema) {
|
|
1941
|
-
if (!(zodSchema instanceof
|
|
1953
|
+
if (!(zodSchema instanceof z2.ZodObject)) {
|
|
1942
1954
|
throw new Error("schema must be a Zod object schema (z.object({...}))");
|
|
1943
1955
|
}
|
|
1944
1956
|
const shape = zodSchema.shape;
|
|
@@ -1955,22 +1967,22 @@ function createParamsSchema(inputs) {
|
|
|
1955
1967
|
let zodType;
|
|
1956
1968
|
switch (input.type) {
|
|
1957
1969
|
case "string":
|
|
1958
|
-
zodType =
|
|
1970
|
+
zodType = z2.string();
|
|
1959
1971
|
break;
|
|
1960
1972
|
case "number":
|
|
1961
|
-
zodType =
|
|
1973
|
+
zodType = z2.number();
|
|
1962
1974
|
break;
|
|
1963
1975
|
case "boolean":
|
|
1964
|
-
zodType =
|
|
1976
|
+
zodType = z2.boolean();
|
|
1965
1977
|
break;
|
|
1966
1978
|
case "object":
|
|
1967
|
-
zodType =
|
|
1979
|
+
zodType = z2.object({});
|
|
1968
1980
|
break;
|
|
1969
1981
|
case "array":
|
|
1970
|
-
zodType =
|
|
1982
|
+
zodType = z2.array(z2.any());
|
|
1971
1983
|
break;
|
|
1972
1984
|
default:
|
|
1973
|
-
zodType =
|
|
1985
|
+
zodType = z2.any();
|
|
1974
1986
|
}
|
|
1975
1987
|
if (input.description) {
|
|
1976
1988
|
zodType = zodType.describe(input.description);
|
|
@@ -2205,7 +2217,7 @@ function registerResource(resourceDefinition, callback) {
|
|
|
2205
2217
|
const explicitMimeType = resourceDefinition.mimeType;
|
|
2206
2218
|
const wrappedCallback = /* @__PURE__ */ __name(async () => {
|
|
2207
2219
|
const { getRequestContext: getRequestContext2, runWithContext: runWithContext2 } = await import("../../context-storage-NA4MHWOZ.js");
|
|
2208
|
-
const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-
|
|
2220
|
+
const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-ZUA5D5IO.js");
|
|
2209
2221
|
const initialRequestContext = getRequestContext2();
|
|
2210
2222
|
const sessions = this.sessions || /* @__PURE__ */ new Map();
|
|
2211
2223
|
const { requestContext } = findSessionContext2(
|
|
@@ -2283,7 +2295,7 @@ function registerResourceTemplate(resourceTemplateDefinition, callback) {
|
|
|
2283
2295
|
async (uri) => {
|
|
2284
2296
|
const params = this.parseTemplateUri(uriTemplate, uri.toString());
|
|
2285
2297
|
const { getRequestContext: getRequestContext2, runWithContext: runWithContext2 } = await import("../../context-storage-NA4MHWOZ.js");
|
|
2286
|
-
const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-
|
|
2298
|
+
const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-ZUA5D5IO.js");
|
|
2287
2299
|
const initialRequestContext = getRequestContext2();
|
|
2288
2300
|
const sessions = this.sessions || /* @__PURE__ */ new Map();
|
|
2289
2301
|
const { requestContext } = findSessionContext2(
|
|
@@ -2338,7 +2350,7 @@ function registerPrompt(promptDefinition, callback) {
|
|
|
2338
2350
|
}
|
|
2339
2351
|
const wrappedCallback = /* @__PURE__ */ __name(async (params, extra) => {
|
|
2340
2352
|
const { getRequestContext: getRequestContext2, runWithContext: runWithContext2 } = await import("../../context-storage-NA4MHWOZ.js");
|
|
2341
|
-
const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-
|
|
2353
|
+
const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-ZUA5D5IO.js");
|
|
2342
2354
|
const initialRequestContext = getRequestContext2();
|
|
2343
2355
|
const sessions = this.sessions || /* @__PURE__ */ new Map();
|
|
2344
2356
|
const { requestContext } = findSessionContext2(
|
|
@@ -4452,7 +4464,7 @@ var MCPServerClass = class {
|
|
|
4452
4464
|
);
|
|
4453
4465
|
}
|
|
4454
4466
|
newServer.server.setRequestHandler(
|
|
4455
|
-
|
|
4467
|
+
z3.object({ method: z3.literal("logging/setLevel") }).passthrough(),
|
|
4456
4468
|
(async (request, extra) => {
|
|
4457
4469
|
const level = request.params?.level;
|
|
4458
4470
|
if (!level) {
|
|
@@ -8,9 +8,9 @@ export interface WidgetMetadata {
|
|
|
8
8
|
description?: string;
|
|
9
9
|
/** Zod schema for widget props validation (preferred) or InputDefinition array */
|
|
10
10
|
props?: z.ZodObject<any> | InputDefinition[];
|
|
11
|
-
/** @deprecated Use `props` instead - Zod schema for input validation */
|
|
11
|
+
/** @deprecated Use `props` instead - Zod schema for widget input validation */
|
|
12
12
|
inputs?: z.ZodObject<any> | InputDefinition[];
|
|
13
|
-
/** @deprecated Use `props` instead - Alias for
|
|
13
|
+
/** @deprecated Use `props` instead - Alias for props to align with tool naming convention */
|
|
14
14
|
schema?: z.ZodObject<any> | InputDefinition[];
|
|
15
15
|
/**
|
|
16
16
|
* For auto-registered widgets: function or helper that generates the tool output (what the model sees).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../../../src/server/types/widget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,KAAK,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,eAAe,EAAE,CAAC;IAC7C
|
|
1
|
+
{"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../../../src/server/types/widget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,KAAK,CAAC,EAA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BAAsB,EACtC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"mount-widgets-dev.d.ts","sourceRoot":"","sources":["../../../../src/server/widgets/mount-widgets-dev.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAiB,MAAM,MAAM,CAAC;AAS5D,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAI3B;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,QAAQ,EACb,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,sBAAsB,EACtC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAkhBf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-resource-registration.d.ts","sourceRoot":"","sources":["../../../../src/server/widgets/ui-resource-registration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,iCAAiC,EACjC,0BAA0B,EAC1B,yCAAyC,EACzC,8BAA8B,EAC9B,6CAA6C,EAC7C,cAAc,EACf,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ui-resource-registration.d.ts","sourceRoot":"","sources":["../../../../src/server/widgets/ui-resource-registration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,iCAAiC,EACjC,0BAA0B,EAC1B,yCAAyC,EACzC,8BAA8B,EAC9B,6CAA6C,EAC7C,cAAc,EACf,MAAM,mBAAmB,CAAC;AAU3B;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,kFAAkF;IAClF,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACxD,QAAQ,EAAE,CACR,UAAU,EAAE,kBAAkB,GAAG,iCAAiC,EAClE,QAAQ,CAAC,EAAE,GAAG,KACX,GAAG,CAAC;IACT,gBAAgB,EAAE,CAChB,UAAU,EACN,0BAA0B,GAC1B,yCAAyC,GACzC,8BAA8B,GAC9B,6CAA6C,EACjD,QAAQ,CAAC,EAAE,GAAG,KACX,GAAG,CAAC;IACT,IAAI,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;CAC3D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,gBAAgB,EAC/D,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,oBAAoB,GAC/B,CAAC,CAkQH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../src/telemetry/telemetry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EAC3B,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../src/telemetry/telemetry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,EAClB,0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ACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvD"}
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,WAAW,CAAC;AAEhC;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
sendProgressNotification,
|
|
11
11
|
shouldLogMessage,
|
|
12
12
|
withTimeout
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-B7AGEK7F.js";
|
|
14
14
|
import "./chunk-KUEVOU4M.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-ZLZOOXMJ.js";
|
|
16
16
|
import "./chunk-FRUZDWXH.js";
|
|
17
17
|
import "./chunk-3GQAWCBQ.js";
|
|
18
18
|
export {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-use",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.11.0
|
|
4
|
+
"version": "1.11.0",
|
|
5
5
|
"description": "Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents, Clients and Servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.",
|
|
6
6
|
"author": "mcp-use, Inc.",
|
|
7
7
|
"license": "MIT",
|
|
@@ -127,42 +127,39 @@
|
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
"dependencies": {
|
|
130
|
-
"@hono/node-server": "^1.19.
|
|
131
|
-
"@mcp-ui/server": "^5.
|
|
130
|
+
"@hono/node-server": "^1.19.7",
|
|
131
|
+
"@mcp-ui/server": "^5.16.2",
|
|
132
132
|
"@mcp-use/modelcontextprotocol-sdk": "1.24.3-mcp-use.4",
|
|
133
|
-
"express": "^5.2.
|
|
134
|
-
"hono": "^4.
|
|
135
|
-
"jose": "^6.1.
|
|
136
|
-
"posthog-js": "^1.
|
|
137
|
-
"posthog-node": "^5.
|
|
133
|
+
"express": "^5.2.1",
|
|
134
|
+
"hono": "^4.11.1",
|
|
135
|
+
"jose": "^6.1.3",
|
|
136
|
+
"posthog-js": "^1.306.1",
|
|
137
|
+
"posthog-node": "^5.17.2",
|
|
138
138
|
"ws": "^8.18.3",
|
|
139
|
-
"zod": "^4.
|
|
140
|
-
"@mcp-use/cli": "2.6.0
|
|
141
|
-
"@mcp-use/inspector": "0.13.0
|
|
139
|
+
"zod": "^4.2.0",
|
|
140
|
+
"@mcp-use/cli": "2.6.0",
|
|
141
|
+
"@mcp-use/inspector": "0.13.0"
|
|
142
142
|
},
|
|
143
143
|
"optionalDependencies": {
|
|
144
144
|
"chalk": "^5.6.2",
|
|
145
145
|
"cli-highlight": "^2.1.11",
|
|
146
146
|
"redis": "^5.10.0",
|
|
147
|
-
"winston": "^3.
|
|
147
|
+
"winston": "^3.19.0"
|
|
148
148
|
},
|
|
149
149
|
"devDependencies": {
|
|
150
|
-
"@antfu/eslint-config": "^6.
|
|
151
|
-
"@langchain/anthropic": "^1.
|
|
152
|
-
"@langchain/openai": "^1.
|
|
153
|
-
"@types/node": "^24.10.1",
|
|
154
|
-
"@types/react": "^19.2.7",
|
|
150
|
+
"@antfu/eslint-config": "^6.7.1",
|
|
151
|
+
"@langchain/anthropic": "^1.3.0",
|
|
152
|
+
"@langchain/openai": "^1.2.0",
|
|
155
153
|
"@types/ws": "^8.18.1",
|
|
156
|
-
"ai": "^5.0.
|
|
157
|
-
"esbuild": "^0.27.
|
|
158
|
-
"eslint": "^9.39.
|
|
159
|
-
"eslint-plugin-format": "^1.0
|
|
154
|
+
"ai": "^5.0.113",
|
|
155
|
+
"esbuild": "^0.27.1",
|
|
156
|
+
"eslint": "^9.39.2",
|
|
157
|
+
"eslint-plugin-format": "^1.1.0",
|
|
160
158
|
"husky": "^9.1.7",
|
|
161
159
|
"lint-staged": "^16.2.7",
|
|
162
|
-
"react": "^19.2.
|
|
160
|
+
"react": "^19.2.3",
|
|
163
161
|
"tsx": "^4.21.0",
|
|
164
|
-
"
|
|
165
|
-
"vitest": "^4.0.14"
|
|
162
|
+
"vitest": "^4.0.15"
|
|
166
163
|
},
|
|
167
164
|
"lint-staged": {
|
|
168
165
|
"*.{js,ts}": [
|
|
@@ -203,36 +200,36 @@
|
|
|
203
200
|
"release": "npm version patch --tag-version-prefix=v && git push --follow-tags",
|
|
204
201
|
"release:minor": "npm version minor --tag-version-prefix=v && git push --follow-tags",
|
|
205
202
|
"release:major": "npm version major --tag-version-prefix=v && git push --follow-tags",
|
|
206
|
-
"example:airbnb": "tsx examples/
|
|
207
|
-
"example:browser": "tsx examples/
|
|
208
|
-
"example:chat": "tsx examples/
|
|
209
|
-
"example:stream": "tsx examples/
|
|
203
|
+
"example:airbnb": "tsx examples/typescript/agent/integrations/airbnb_use.ts",
|
|
204
|
+
"example:browser": "tsx examples/typescript/agent/integrations/browser_use.ts",
|
|
205
|
+
"example:chat": "tsx examples/typescript/agent/basic/chat_example.ts",
|
|
206
|
+
"example:stream": "tsx examples/typescript/agent/advanced/stream_example.ts",
|
|
210
207
|
"example:stream_events": "tsx examples/client/stream_events_example.ts",
|
|
211
|
-
"example:ai_sdk": "tsx examples/
|
|
212
|
-
"example:filesystem": "tsx examples/
|
|
213
|
-
"example:http": "tsx examples/client/http_example.ts",
|
|
214
|
-
"example:everything": "tsx examples/
|
|
215
|
-
"example:multi": "tsx examples/
|
|
208
|
+
"example:ai_sdk": "tsx examples/typescript/agent/frameworks/ai_sdk_example.ts",
|
|
209
|
+
"example:filesystem": "tsx examples/typescript/agent/integrations/filesystem_use.ts",
|
|
210
|
+
"example:http": "tsx examples/typescript/client/basic/http_example.ts",
|
|
211
|
+
"example:everything": "tsx examples/typescript/agent/basic/mcp_everything.ts",
|
|
212
|
+
"example:multi": "tsx examples/typescript/agent/server-management/multi_server_example.ts",
|
|
216
213
|
"example:sandbox": "tsx examples/client/sandbox_everything.ts",
|
|
217
214
|
"example:oauth": "tsx examples/client/simple_oauth_example.ts",
|
|
218
|
-
"example:blender": "tsx examples/
|
|
219
|
-
"example:add_server": "tsx examples/
|
|
220
|
-
"example:structured": "tsx examples/
|
|
221
|
-
"example:observability": "tsx examples/
|
|
222
|
-
"example:simplified": "tsx examples/
|
|
223
|
-
"example:commonjs": "node examples/client/commonjs_example.cjs",
|
|
224
|
-
"example:code_mode": "tsx examples/
|
|
225
|
-
"example:code_mode_e2b": "source .env 2>/dev/null || true && tsx examples/
|
|
226
|
-
"example:server:notification": "tsx examples/server/
|
|
227
|
-
"example:client:notification": "tsx examples/client/notification-client.ts",
|
|
228
|
-
"example:notifications": "lsof -ti:3000 | xargs kill -9 2>/dev/null; tsx examples/server/notifications/src/server.ts & sleep 3 && tsx examples/client/notification-client.ts",
|
|
229
|
-
"example:server:sampling": "tsx examples/server/sampling/src/server.ts",
|
|
230
|
-
"example:client:sampling": "tsx examples/client/sampling-client.ts",
|
|
231
|
-
"example:server:elicitation": "tsx examples/server/elicitation/src/server.ts",
|
|
232
|
-
"example:sampling": "lsof -ti:3000 | xargs kill -9 2>/dev/null; tsx examples/server/sampling/src/server.ts & sleep 3 && tsx examples/client/sampling-client.ts",
|
|
233
|
-
"example:server:oauth:supabase": "tsx examples/server/oauth/supabase/src/server.ts",
|
|
234
|
-
"example:client:oauth:auth0": "tsx examples/server/oauth/auth0/src/server.ts",
|
|
235
|
-
"example:client:oauth:workos": "tsx examples/server/oauth/workos/src/server.ts",
|
|
236
|
-
"example:client:oauth:keycloak": "tsx examples/server/oauth/keycloak/src/server.ts"
|
|
215
|
+
"example:blender": "tsx examples/typescript/agent/integrations/blender_use.ts",
|
|
216
|
+
"example:add_server": "tsx examples/typescript/agent/server-management/add_server_tool.ts",
|
|
217
|
+
"example:structured": "tsx examples/typescript/agent/advanced/structured_output.ts",
|
|
218
|
+
"example:observability": "tsx examples/typescript/agent/advanced/observability.ts",
|
|
219
|
+
"example:simplified": "tsx examples/typescript/agent/basic/simplified_agent_example.ts",
|
|
220
|
+
"example:commonjs": "node examples/typescript/client/basic/commonjs_example.cjs",
|
|
221
|
+
"example:code_mode": "tsx examples/typescript/agent/code-mode/code_mode_example.ts",
|
|
222
|
+
"example:code_mode_e2b": "source .env 2>/dev/null || true && tsx examples/typescript/agent/code-mode/code_mode_e2b_example.ts",
|
|
223
|
+
"example:server:notification": "tsx examples/typescript/server/features/notifications/src/server.ts",
|
|
224
|
+
"example:client:notification": "tsx examples/typescript/client/communication/notification-client.ts",
|
|
225
|
+
"example:notifications": "lsof -ti:3000 | xargs kill -9 2>/dev/null; tsx examples/typescript/server/features/notifications/src/server.ts & sleep 3 && tsx examples/typescript/client/communication/notification-client.ts",
|
|
226
|
+
"example:server:sampling": "tsx examples/typescript/server/features/sampling/src/server.ts",
|
|
227
|
+
"example:client:sampling": "tsx examples/typescript/client/communication/sampling-client.ts",
|
|
228
|
+
"example:server:elicitation": "tsx examples/typescript/server/features/elicitation/src/server.ts",
|
|
229
|
+
"example:sampling": "lsof -ti:3000 | xargs kill -9 2>/dev/null; tsx examples/typescript/server/features/sampling/src/server.ts & sleep 3 && tsx examples/typescript/client/communication/sampling-client.ts",
|
|
230
|
+
"example:server:oauth:supabase": "tsx examples/typescript/server/oauth/supabase/src/server.ts",
|
|
231
|
+
"example:client:oauth:auth0": "tsx examples/typescript/server/oauth/auth0/src/server.ts",
|
|
232
|
+
"example:client:oauth:workos": "tsx examples/typescript/server/oauth/workos/src/server.ts",
|
|
233
|
+
"example:client:oauth:keycloak": "tsx examples/typescript/server/oauth/keycloak/src/server.ts"
|
|
237
234
|
}
|
|
238
235
|
}
|