@mcp-use/cli 2.10.0 → 2.10.1-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.
- package/README.md +33 -33
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
|
|
26
26
|
## 📦 Related Packages
|
|
27
27
|
|
|
28
|
-
| Package
|
|
29
|
-
|
|
|
30
|
-
| [mcp-use](https://github.com/mcp-use/mcp-use/tree/main/packages/mcp-use) | Core MCP framework | [](https://www.npmjs.com/package/mcp-use) |
|
|
31
|
-
| [@mcp-use/inspector](https://github.com/mcp-use/mcp-use/tree/main/packages/inspector) | Web-based MCP inspector | [](https://www.npmjs.com/package/@mcp-use/inspector) |
|
|
32
|
-
| [create-mcp-use-app](https://github.com/mcp-use/mcp-use/tree/main/packages/create-mcp-use-app) | Create MCP apps | [](https://www.npmjs.com/package/create-mcp-use-app) |
|
|
28
|
+
| Package | Description | Version |
|
|
29
|
+
| ------------------------------------------------------------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
30
|
+
| [mcp-use](https://github.com/mcp-use/mcp-use/tree/main/libraries/typescript/packages/mcp-use) | Core MCP framework | [](https://www.npmjs.com/package/mcp-use) |
|
|
31
|
+
| [@mcp-use/inspector](https://github.com/mcp-use/mcp-use/tree/main/libraries/typescript/packages/inspector) | Web-based MCP inspector | [](https://www.npmjs.com/package/@mcp-use/inspector) |
|
|
32
|
+
| [create-mcp-use-app](https://github.com/mcp-use/mcp-use/tree/main/libraries/typescript/packages/create-mcp-use-app) | Create MCP apps | [](https://www.npmjs.com/package/create-mcp-use-app) |
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
@@ -247,37 +247,37 @@ UI widgets are React components that get compiled into standalone HTML pages. Th
|
|
|
247
247
|
|
|
248
248
|
```tsx
|
|
249
249
|
// resources/task-manager.tsx
|
|
250
|
-
import React, { useState, useEffect } from
|
|
251
|
-
import { useMcp } from
|
|
250
|
+
import React, { useState, useEffect } from "react";
|
|
251
|
+
import { useMcp } from "mcp-use/react";
|
|
252
252
|
|
|
253
253
|
export default function TaskManager() {
|
|
254
|
-
const { callTool, status, error } = useMcp()
|
|
255
|
-
const [tasks, setTasks] = useState([])
|
|
256
|
-
const [newTask, setNewTask] = useState(
|
|
254
|
+
const { callTool, status, error } = useMcp();
|
|
255
|
+
const [tasks, setTasks] = useState([]);
|
|
256
|
+
const [newTask, setNewTask] = useState("");
|
|
257
257
|
|
|
258
258
|
useEffect(() => {
|
|
259
|
-
loadTasks()
|
|
260
|
-
}, [])
|
|
259
|
+
loadTasks();
|
|
260
|
+
}, []);
|
|
261
261
|
|
|
262
262
|
const loadTasks = async () => {
|
|
263
|
-
const result = await callTool(
|
|
264
|
-
setTasks(result.tasks)
|
|
265
|
-
}
|
|
263
|
+
const result = await callTool("list_tasks");
|
|
264
|
+
setTasks(result.tasks);
|
|
265
|
+
};
|
|
266
266
|
|
|
267
267
|
const addTask = async () => {
|
|
268
|
-
if (!newTask.trim()) return
|
|
268
|
+
if (!newTask.trim()) return;
|
|
269
269
|
|
|
270
|
-
await callTool(
|
|
270
|
+
await callTool("create_task", {
|
|
271
271
|
title: newTask,
|
|
272
|
-
status:
|
|
273
|
-
})
|
|
272
|
+
status: "pending",
|
|
273
|
+
});
|
|
274
274
|
|
|
275
|
-
setNewTask(
|
|
276
|
-
await loadTasks()
|
|
277
|
-
}
|
|
275
|
+
setNewTask("");
|
|
276
|
+
await loadTasks();
|
|
277
|
+
};
|
|
278
278
|
|
|
279
|
-
if (status ===
|
|
280
|
-
if (error) return <div>Error: {error.message}</div
|
|
279
|
+
if (status === "connecting") return <div>Connecting...</div>;
|
|
280
|
+
if (error) return <div>Error: {error.message}</div>;
|
|
281
281
|
|
|
282
282
|
return (
|
|
283
283
|
<div className="p-4">
|
|
@@ -307,7 +307,7 @@ export default function TaskManager() {
|
|
|
307
307
|
))}
|
|
308
308
|
</ul>
|
|
309
309
|
</div>
|
|
310
|
-
)
|
|
310
|
+
);
|
|
311
311
|
}
|
|
312
312
|
```
|
|
313
313
|
|
|
@@ -410,16 +410,16 @@ CMD ["npm", "start"]
|
|
|
410
410
|
If you have an existing Express app, you can mount the built widgets:
|
|
411
411
|
|
|
412
412
|
```ts
|
|
413
|
-
import express from
|
|
414
|
-
import path from
|
|
413
|
+
import express from "express";
|
|
414
|
+
import path from "path";
|
|
415
415
|
|
|
416
|
-
const app = express()
|
|
416
|
+
const app = express();
|
|
417
417
|
|
|
418
418
|
// Serve MCP widgets
|
|
419
419
|
app.use(
|
|
420
|
-
|
|
421
|
-
express.static(path.join(__dirname,
|
|
422
|
-
)
|
|
420
|
+
"/widgets",
|
|
421
|
+
express.static(path.join(__dirname, "../dist/resources/mcp-use/widgets"))
|
|
422
|
+
);
|
|
423
423
|
|
|
424
424
|
// Your other routes...
|
|
425
425
|
```
|
|
@@ -465,8 +465,8 @@ mcp-use dev --no-open
|
|
|
465
465
|
|
|
466
466
|
- [mcp-use Documentation](https://github.com/mcp-use/mcp-use)
|
|
467
467
|
- [Model Context Protocol](https://modelcontextprotocol.io)
|
|
468
|
-
- [Creating MCP Servers](https://github.com/mcp-use/mcp-use/tree/main/packages/mcp-use#-mcp-server-framework)
|
|
469
|
-
- [MCP Inspector Guide](https://github.com/mcp-use/mcp-use/tree/main/packages/inspector)
|
|
468
|
+
- [Creating MCP Servers](https://github.com/mcp-use/mcp-use/tree/main/libraries/typescript/packages/mcp-use#-mcp-server-framework)
|
|
469
|
+
- [MCP Inspector Guide](https://github.com/mcp-use/mcp-use/tree/main/libraries/typescript/packages/inspector)
|
|
470
470
|
|
|
471
471
|
---
|
|
472
472
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-use/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.10.
|
|
4
|
+
"version": "2.10.1-canary.1",
|
|
5
5
|
"description": "The mcp-use CLI is a tool for building and deploying MCP servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.",
|
|
6
6
|
"author": "mcp-use, Inc.",
|
|
7
7
|
"license": "MIT",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"vite": "^7.3.0",
|
|
55
55
|
"ws": "^8.18.3",
|
|
56
56
|
"zod": "^4.2.0",
|
|
57
|
-
"@mcp-use/inspector": "0.15.
|
|
58
|
-
"mcp-use": "1.13.
|
|
57
|
+
"@mcp-use/inspector": "0.15.1-canary.1",
|
|
58
|
+
"mcp-use": "1.13.3-canary.1"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/ws": "^8.18.1",
|