mcp-use 1.34.0 → 1.34.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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/{chunk-3UOADQDZ.js → chunk-2EBW4344.js} +40 -4
- package/dist/{chunk-U6UCVQKQ.js → chunk-D7SEH5RU.js} +4 -4
- package/dist/{chunk-3N6PYMAD.js → chunk-LPVVF6US.js} +2 -2
- package/dist/{chunk-AOZBHAT7.js → chunk-LZOTKOYW.js} +1 -1
- package/dist/{chunk-VWJXSLCF.js → chunk-N3DGPXFX.js} +38 -2
- package/dist/{chunk-EIYWOJYK.js → chunk-NXLY2JS7.js} +1 -1
- package/dist/{chunk-WEMFZYUR.js → chunk-PSOT2YDT.js} +1 -1
- package/dist/{chunk-2J3FVMZ5.js → chunk-TAPTQKI4.js} +1 -1
- package/dist/{chunk-7MKAP6XK.js → chunk-VYDFQS24.js} +1 -1
- package/dist/{chunk-XS2ZMBOG.js → chunk-XIAP7CEH.js} +1 -1
- package/dist/{chunk-BOFDVMBT.js → chunk-YQIRNTLE.js} +2 -2
- package/dist/{chunk-4KP3757O.js → chunk-YZ22J43K.js} +1 -1
- package/dist/{client-O5HMGXF3.js → client-AGYZM4PU.js} +4 -4
- package/dist/index.cjs +39 -3
- package/dist/index.js +7 -7
- package/dist/src/agents/index.cjs +1 -1
- package/dist/src/agents/index.js +4 -4
- package/dist/src/auth/browser-provider.d.ts +16 -0
- package/dist/src/auth/browser-provider.d.ts.map +1 -1
- package/dist/src/auth/index.cjs +38 -2
- package/dist/src/auth/index.js +1 -1
- package/dist/src/browser-agent.cjs +1 -1
- package/dist/src/browser-agent.js +2 -2
- package/dist/src/browser.cjs +39 -3
- package/dist/src/browser.js +4 -4
- package/dist/src/client.cjs +1 -1
- package/dist/src/client.js +4 -4
- package/dist/src/react/index.cjs +39 -3
- package/dist/src/react/index.js +4 -4
- package/dist/src/server/index.cjs +1 -1
- package/dist/src/server/index.js +7 -7
- package/dist/src/version.d.ts +1 -1
- package/dist/{stdio-QIYDKXTT.js → stdio-ECCMBHYL.js} +3 -3
- package/dist/{stdio-NRH7PMXI.js → stdio-VYJBFXTQ.js} +2 -2
- package/dist/{tool-execution-helpers-GEQBGCKR.js → tool-execution-helpers-J4XLCZBU.js} +2 -2
- package/package.json +3 -3
package/dist/src/browser.js
CHANGED
|
@@ -2,22 +2,22 @@ import {
|
|
|
2
2
|
BrowserMCPClient,
|
|
3
3
|
BrowserOAuthClientProvider,
|
|
4
4
|
onMcpAuthorization
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-2EBW4344.js";
|
|
6
6
|
import {
|
|
7
7
|
HttpConnector,
|
|
8
8
|
MCPSession
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-YQIRNTLE.js";
|
|
10
10
|
import "../chunk-URE3PRDB.js";
|
|
11
11
|
import {
|
|
12
12
|
BaseConnector
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-VYDFQS24.js";
|
|
14
14
|
import {
|
|
15
15
|
Tel,
|
|
16
16
|
Telemetry,
|
|
17
17
|
VERSION,
|
|
18
18
|
getPackageVersion,
|
|
19
19
|
setTelemetrySource
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-XIAP7CEH.js";
|
|
21
21
|
import {
|
|
22
22
|
Logger,
|
|
23
23
|
logger
|
package/dist/src/client.cjs
CHANGED
package/dist/src/client.js
CHANGED
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
isVMAvailable,
|
|
14
14
|
reject,
|
|
15
15
|
validate
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-D7SEH5RU.js";
|
|
17
17
|
import "../chunk-GKPKUKD6.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-TAPTQKI4.js";
|
|
19
|
+
import "../chunk-YZ22J43K.js";
|
|
20
20
|
import "../chunk-LG5NSHEL.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-PSOT2YDT.js";
|
|
22
22
|
import "../chunk-BXZHMYMM.js";
|
|
23
23
|
import "../chunk-MTHLLDCX.js";
|
|
24
24
|
import "../chunk-QWQYAQCK.js";
|
package/dist/src/react/index.cjs
CHANGED
|
@@ -1110,7 +1110,7 @@ var ClientRemoveServerEvent = class extends BaseTelemetryEvent {
|
|
|
1110
1110
|
};
|
|
1111
1111
|
|
|
1112
1112
|
// src/version.ts
|
|
1113
|
-
var VERSION = "1.34.
|
|
1113
|
+
var VERSION = "1.34.1";
|
|
1114
1114
|
function getPackageVersion() {
|
|
1115
1115
|
return VERSION;
|
|
1116
1116
|
}
|
|
@@ -4023,6 +4023,41 @@ var BrowserOAuthClientProvider = class {
|
|
|
4023
4023
|
getKey(keySuffix) {
|
|
4024
4024
|
return this.session.getKey(keySuffix);
|
|
4025
4025
|
}
|
|
4026
|
+
/**
|
|
4027
|
+
* Re-anchor an SDK-derived OAuth discovery URL from the MCP connection
|
|
4028
|
+
* (proxy) origin onto the actual MCP server.
|
|
4029
|
+
*
|
|
4030
|
+
* When MCP traffic is tunneled through a gateway/inspector proxy, the SDK
|
|
4031
|
+
* transport derives `/.well-known/*` URLs from the URL it connected to (the
|
|
4032
|
+
* proxy) whenever no `resource_metadata` hint is available — the SSE
|
|
4033
|
+
* transport's EventSource cannot read `WWW-Authenticate`, and token refresh
|
|
4034
|
+
* runs without a 401 response at hand. The proxy origin serves no OAuth
|
|
4035
|
+
* metadata, so discovery would fail and the server would be misclassified
|
|
4036
|
+
* as "does not support OAuth". Rewriting reproduces what a direct
|
|
4037
|
+
* connection would have requested: the same well-known document, anchored
|
|
4038
|
+
* on the server origin, with the RFC 8414 §3.1 / RFC 9728 §3.1 path
|
|
4039
|
+
* insertion using the server's path instead of the proxy's.
|
|
4040
|
+
*/
|
|
4041
|
+
reanchorWellKnownUrl(url) {
|
|
4042
|
+
if (!this.connectionUrl) return url;
|
|
4043
|
+
try {
|
|
4044
|
+
const requested = new URL(url);
|
|
4045
|
+
const connection = new URL(this.connectionUrl);
|
|
4046
|
+
if (requested.origin !== connection.origin) return url;
|
|
4047
|
+
if (!requested.pathname.startsWith("/.well-known/")) return url;
|
|
4048
|
+
const target = new URL(this.serverUrl);
|
|
4049
|
+
const rest = requested.pathname.slice("/.well-known/".length);
|
|
4050
|
+
const [doc, ...suffixParts] = rest.split("/");
|
|
4051
|
+
if (!doc) return url;
|
|
4052
|
+
const suffix = suffixParts.length ? `/${suffixParts.join("/")}` : "";
|
|
4053
|
+
const connectionPath = connection.pathname.replace(/\/+$/, "");
|
|
4054
|
+
const targetPath = target.pathname.replace(/\/+$/, "");
|
|
4055
|
+
const newSuffix = suffix && suffix === connectionPath ? targetPath : suffix;
|
|
4056
|
+
return `${target.origin}/.well-known/${doc}${newSuffix}${requested.search}`;
|
|
4057
|
+
} catch {
|
|
4058
|
+
return url;
|
|
4059
|
+
}
|
|
4060
|
+
}
|
|
4026
4061
|
/**
|
|
4027
4062
|
* Returns a `fetch` function, scoped to this provider, that routes OAuth
|
|
4028
4063
|
* requests (`.well-known` metadata, token, register, authorize) through the
|
|
@@ -4052,7 +4087,8 @@ var BrowserOAuthClientProvider = class {
|
|
|
4052
4087
|
const connectionUrl = this.connectionUrl;
|
|
4053
4088
|
const serverUrl = this.serverUrl;
|
|
4054
4089
|
return async (input, init) => {
|
|
4055
|
-
const
|
|
4090
|
+
const requestedUrl = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
|
|
4091
|
+
const url = this.reanchorWellKnownUrl(requestedUrl);
|
|
4056
4092
|
const isOAuthRequest = url.includes("/.well-known/") || url.match(/\/(register|token|authorize)$/);
|
|
4057
4093
|
if (!isOAuthRequest) {
|
|
4058
4094
|
return await base(input, init);
|
|
@@ -4122,7 +4158,7 @@ var BrowserOAuthClientProvider = class {
|
|
|
4122
4158
|
"[OAuth Proxy] Request failed, falling back to direct fetch:",
|
|
4123
4159
|
error
|
|
4124
4160
|
);
|
|
4125
|
-
return await base(input, init);
|
|
4161
|
+
return url !== requestedUrl ? await base(url, init) : await base(input, init);
|
|
4126
4162
|
}
|
|
4127
4163
|
};
|
|
4128
4164
|
}
|
package/dist/src/react/index.js
CHANGED
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
onMcpAuthorization,
|
|
7
7
|
runAuthPopup,
|
|
8
8
|
sanitizeUrl
|
|
9
|
-
} from "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
} from "../../chunk-2EBW4344.js";
|
|
10
|
+
import "../../chunk-YQIRNTLE.js";
|
|
11
11
|
import "../../chunk-URE3PRDB.js";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-VYDFQS24.js";
|
|
13
13
|
import {
|
|
14
14
|
Tel,
|
|
15
15
|
Telemetry,
|
|
16
16
|
getPackageVersion,
|
|
17
17
|
setTelemetrySource
|
|
18
|
-
} from "../../chunk-
|
|
18
|
+
} from "../../chunk-XIAP7CEH.js";
|
|
19
19
|
import {
|
|
20
20
|
clearRpcLogs,
|
|
21
21
|
getAllRpcLogs,
|
package/dist/src/server/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
findSessionContext,
|
|
18
18
|
isValidLogLevel,
|
|
19
19
|
supportsApps
|
|
20
|
-
} from "../../chunk-
|
|
20
|
+
} from "../../chunk-NXLY2JS7.js";
|
|
21
21
|
import {
|
|
22
22
|
getRequestContext,
|
|
23
23
|
hasRequestContext,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
Telemetry,
|
|
60
60
|
VERSION,
|
|
61
61
|
getPackageVersion
|
|
62
|
-
} from "../../chunk-
|
|
62
|
+
} from "../../chunk-PSOT2YDT.js";
|
|
63
63
|
import "../../chunk-BXZHMYMM.js";
|
|
64
64
|
import {
|
|
65
65
|
fsHelpers,
|
|
@@ -3332,7 +3332,7 @@ function registerPrompt(promptDefinition, callback) {
|
|
|
3332
3332
|
}
|
|
3333
3333
|
const wrappedCallback = /* @__PURE__ */ __name(async (params, extra) => {
|
|
3334
3334
|
const { getRequestContext: getRequestContext2, runWithContext: runWithContext2 } = await import("../../context-storage-KMOAHEL7.js");
|
|
3335
|
-
const { findSessionContext: findSessionContext2, createClientCapabilityChecker } = await import("../../tool-execution-helpers-
|
|
3335
|
+
const { findSessionContext: findSessionContext2, createClientCapabilityChecker } = await import("../../tool-execution-helpers-J4XLCZBU.js");
|
|
3336
3336
|
const initialRequestContext = getRequestContext2();
|
|
3337
3337
|
const sessions = this.sessions || /* @__PURE__ */ new Map();
|
|
3338
3338
|
const { requestContext, session } = findSessionContext2(
|
|
@@ -3537,7 +3537,7 @@ function registerResource(resourceDefinition, callback) {
|
|
|
3537
3537
|
const explicitMimeType = resourceDefinition.mimeType;
|
|
3538
3538
|
const wrappedCallback = /* @__PURE__ */ __name(async () => {
|
|
3539
3539
|
const { getRequestContext: getRequestContext2, runWithContext: runWithContext2 } = await import("../../context-storage-KMOAHEL7.js");
|
|
3540
|
-
const { findSessionContext: findSessionContext2, createClientCapabilityChecker } = await import("../../tool-execution-helpers-
|
|
3540
|
+
const { findSessionContext: findSessionContext2, createClientCapabilityChecker } = await import("../../tool-execution-helpers-J4XLCZBU.js");
|
|
3541
3541
|
const initialRequestContext = getRequestContext2();
|
|
3542
3542
|
const sessions = this.sessions || /* @__PURE__ */ new Map();
|
|
3543
3543
|
const { requestContext, session } = findSessionContext2(
|
|
@@ -3626,7 +3626,7 @@ function registerResourceTemplate(resourceTemplateDefinition, callback) {
|
|
|
3626
3626
|
async (uri) => {
|
|
3627
3627
|
const params = this.parseTemplateUri(uriTemplate, uri.toString());
|
|
3628
3628
|
const { getRequestContext: getRequestContext2, runWithContext: runWithContext2 } = await import("../../context-storage-KMOAHEL7.js");
|
|
3629
|
-
const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-
|
|
3629
|
+
const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-J4XLCZBU.js");
|
|
3630
3630
|
const initialRequestContext = getRequestContext2();
|
|
3631
3631
|
const sessions = this.sessions || /* @__PURE__ */ new Map();
|
|
3632
3632
|
const { requestContext } = findSessionContext2(
|
|
@@ -6988,7 +6988,7 @@ var MCPServerClass = class _MCPServerClass {
|
|
|
6988
6988
|
onSampling: /* @__PURE__ */ __name(async (params) => {
|
|
6989
6989
|
try {
|
|
6990
6990
|
const { getRequestContext: getRequestContext2 } = await import("../../context-storage-KMOAHEL7.js");
|
|
6991
|
-
const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-
|
|
6991
|
+
const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-J4XLCZBU.js");
|
|
6992
6992
|
const ctx = getRequestContext2();
|
|
6993
6993
|
if (!ctx) throw new Error("No request context");
|
|
6994
6994
|
const { session } = findSessionContext2(
|
|
@@ -7016,7 +7016,7 @@ var MCPServerClass = class _MCPServerClass {
|
|
|
7016
7016
|
onElicitation: /* @__PURE__ */ __name(async (params) => {
|
|
7017
7017
|
try {
|
|
7018
7018
|
const { getRequestContext: getRequestContext2 } = await import("../../context-storage-KMOAHEL7.js");
|
|
7019
|
-
const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-
|
|
7019
|
+
const { findSessionContext: findSessionContext2 } = await import("../../tool-execution-helpers-J4XLCZBU.js");
|
|
7020
7020
|
const ctx = getRequestContext2();
|
|
7021
7021
|
if (!ctx) throw new Error("No request context");
|
|
7022
7022
|
const { session } = findSessionContext2(
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StdioConnector
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LZOTKOYW.js";
|
|
4
4
|
import "./chunk-GKPKUKD6.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-YZ22J43K.js";
|
|
6
|
+
import "./chunk-PSOT2YDT.js";
|
|
7
7
|
import "./chunk-BXZHMYMM.js";
|
|
8
8
|
import "./chunk-MTHLLDCX.js";
|
|
9
9
|
import "./chunk-QWQYAQCK.js";
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
findSessionContext,
|
|
8
8
|
isValidLogLevel,
|
|
9
9
|
supportsApps
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NXLY2JS7.js";
|
|
11
11
|
import "./chunk-G7JEMXJW.js";
|
|
12
12
|
import "./chunk-KUEVOU4M.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-PSOT2YDT.js";
|
|
14
14
|
import "./chunk-BXZHMYMM.js";
|
|
15
15
|
import "./chunk-MTHLLDCX.js";
|
|
16
16
|
import "./chunk-QWQYAQCK.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-use",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.34.
|
|
4
|
+
"version": "1.34.1",
|
|
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",
|
|
@@ -158,8 +158,8 @@
|
|
|
158
158
|
"node-mocks-http": "1.17.2",
|
|
159
159
|
"posthog-js": "1.351.3",
|
|
160
160
|
"posthog-node": "5.24.17",
|
|
161
|
-
"@mcp-use/cli": "3.6.
|
|
162
|
-
"@mcp-use/inspector": "12.0.
|
|
161
|
+
"@mcp-use/cli": "3.6.2",
|
|
162
|
+
"@mcp-use/inspector": "12.0.1"
|
|
163
163
|
},
|
|
164
164
|
"optionalDependencies": {
|
|
165
165
|
"cli-highlight": "2.1.11",
|