mcp-use 2.0.0-beta.32 → 2.0.0-beta.34

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/context.d.ts CHANGED
@@ -216,6 +216,26 @@ type RequestContextBase<TEnv extends Env> = Omit<Context<TEnv>, "req"> & {
216
216
  * when state affects authorization or business logic.
217
217
  */
218
218
  requestState: RequestStateAccessor;
219
+ /**
220
+ * Sends a one-way notification related to the current MCP request.
221
+ *
222
+ * The notification is delivered on the originating request's response
223
+ * stream and must be sent before the callback returns. Use the
224
+ * `server.notifyToolsChanged()` and related server helpers for
225
+ * cross-request list or resource invalidations.
226
+ *
227
+ * @param method - Application-defined notification method.
228
+ * @param params - Optional JSON-serializable notification parameters.
229
+ * @returns A promise that resolves after the notification is sent.
230
+ *
231
+ * @example
232
+ * ```ts
233
+ * await ctx.sendNotification("com.example/import-status", {
234
+ * status: "started",
235
+ * });
236
+ * ```
237
+ */
238
+ sendNotification(method: string, params?: Record<string, unknown>): Promise<void>;
219
239
  /**
220
240
  * Report request-scoped progress when the caller supplied a progress token.
221
241
  *
package/dist/index.js CHANGED
@@ -522,6 +522,12 @@ function toRequestContext(ctx) {
522
522
  client: toClientContext(ctx),
523
523
  elicit: createElicit(ctx.mcpReq.inputResponses),
524
524
  requestState: () => ctx.mcpReq.requestState(),
525
+ async sendNotification(method, params) {
526
+ await ctx.mcpReq.notify({
527
+ method,
528
+ ...params !== void 0 && { params }
529
+ });
530
+ },
525
531
  async reportProgress(progress, total, message) {
526
532
  const progressToken = ctx.mcpReq._meta?.progressToken;
527
533
  if (progressToken === void 0) return false;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mcp-use",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.32",
4
+ "version": "2.0.0-beta.34",
5
5
  "description": "MCP framework and CLI built on the official v2 SDK",
6
6
  "author": "mcp-use, Inc.",
7
7
  "license": "MIT",
@@ -89,8 +89,8 @@
89
89
  "@modelcontextprotocol/server": "2.0.0-beta.5",
90
90
  "hono": "^4.12.27",
91
91
  "jose": "^6.1.3",
92
- "@mcp-use/inspector": "20.0.0-beta.24",
93
- "@mcp-use/cli": "4.0.0-beta.6"
92
+ "@mcp-use/cli": "4.0.0-beta.7",
93
+ "@mcp-use/inspector": "20.0.0-beta.26"
94
94
  },
95
95
  "peerDependencies": {
96
96
  "@mcp-use/client": "^2.0.0-alpha.0",
@@ -124,7 +124,7 @@
124
124
  "vitest": "^4.1.9",
125
125
  "zod": "^4.4.3",
126
126
  "@mcp-use/client": "2.0.0-beta.12",
127
- "mcp-use": "2.0.0-beta.32"
127
+ "mcp-use": "2.0.0-beta.34"
128
128
  },
129
129
  "publishConfig": {
130
130
  "access": "public"