mcp-use 2.12.0 → 2.12.1-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/README.md +50 -0
- package/dist/bin.js +1 -1
- package/dist/index-node.js +47 -54
- package/dist/index.js +1 -1
- package/dist/internal/usage.js +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -223,6 +223,56 @@ export default function WeatherCard() {
|
|
|
223
223
|
|
|
224
224
|
[Build your first MCP App →](https://mcp-use.com/docs/typescript/mcp-apps/quickstart)
|
|
225
225
|
|
|
226
|
+
## Create ChatGPT Plugin Extensions
|
|
227
|
+
|
|
228
|
+
Build ChatGPT Plugin Extensions with interactive Views that users can open alongside their conversation. Use `useModelContext` to let them add content from a View to the conversation, such as a book to discuss or analytics to explore.
|
|
229
|
+
|
|
230
|
+
<table><tr><td>
|
|
231
|
+
<details>
|
|
232
|
+
<summary><strong><code>add-book.tsx</code></strong> — Share a selected book with the model</summary>
|
|
233
|
+
|
|
234
|
+
```tsx
|
|
235
|
+
import { useModelContext } from "mcp-use/react";
|
|
236
|
+
|
|
237
|
+
export default function AddBook() {
|
|
238
|
+
const { add, pending, error } = useModelContext();
|
|
239
|
+
|
|
240
|
+
async function shareBook() {
|
|
241
|
+
try {
|
|
242
|
+
await add("selected-book", {
|
|
243
|
+
type: "text",
|
|
244
|
+
title: "The Great Gatsby",
|
|
245
|
+
text: "Selected book: The Great Gatsby by F. Scott Fitzgerald",
|
|
246
|
+
});
|
|
247
|
+
} catch (error) {
|
|
248
|
+
console.error("Could not share the book", error);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
return (
|
|
253
|
+
<>
|
|
254
|
+
<button disabled={pending} onClick={shareBook}>
|
|
255
|
+
{pending ? "Adding…" : "Add book to chat"}
|
|
256
|
+
</button>
|
|
257
|
+
{error && <p role="alert">{error.message}</p>}
|
|
258
|
+
</>
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
</details>
|
|
264
|
+
</td></tr></table>
|
|
265
|
+
|
|
266
|
+
**Little Bookshop**
|
|
267
|
+
|
|
268
|
+
https://github.com/user-attachments/assets/2f9b56c1-f149-430e-b5b6-a258c08491e6
|
|
269
|
+
|
|
270
|
+
**Manufact Analytics**
|
|
271
|
+
|
|
272
|
+
https://github.com/user-attachments/assets/e488c66e-8f65-4930-8e08-711bdf12ec6e
|
|
273
|
+
|
|
274
|
+
[Explore ChatGPT Plugin Extensions →](https://mcp-use.com/docs/typescript/mcp-apps/chatgpt-extensions)
|
|
275
|
+
|
|
226
276
|
## Build
|
|
227
277
|
|
|
228
278
|
Create the production build:
|
package/dist/bin.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var{runBin}=await import("@mcp-use/cli");runBin(process.argv.slice(2),{frameworkVersion:"2.12.0"});
|
|
2
|
+
var{runBin}=await import("@mcp-use/cli");runBin(process.argv.slice(2),{frameworkVersion:"2.12.1-canary.0"});
|