@frontmcp/react 1.5.6 → 1.6.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 +6 -6
- package/esm/package.json +6 -6
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -28,8 +28,7 @@ Optional peer dependencies:
|
|
|
28
28
|
## Quick Start
|
|
29
29
|
|
|
30
30
|
```tsx
|
|
31
|
-
import { create } from '@frontmcp/react';
|
|
32
|
-
import { FrontMcpProvider, useCallTool } from '@frontmcp/react';
|
|
31
|
+
import { create, FrontMcpProvider, useCallTool } from '@frontmcp/react';
|
|
33
32
|
|
|
34
33
|
const server = await create({
|
|
35
34
|
info: { name: 'my-app', version: '1.0.0' },
|
|
@@ -84,9 +83,10 @@ The provider manages the MCP client lifecycle. It supports multi-server setups,
|
|
|
84
83
|
Type-safe factory that wraps a React component + zod schema into an MCP-registered component:
|
|
85
84
|
|
|
86
85
|
```tsx
|
|
87
|
-
import { mcpComponent } from '@frontmcp/react';
|
|
88
86
|
import { z } from 'zod';
|
|
89
87
|
|
|
88
|
+
import { mcpComponent } from '@frontmcp/react';
|
|
89
|
+
|
|
90
90
|
const WeatherCard = mcpComponent(
|
|
91
91
|
({ city, temp }) => (
|
|
92
92
|
<div>
|
|
@@ -190,7 +190,7 @@ useReduxResource({
|
|
|
190
190
|
Register stores directly on `FrontMcpProvider` without hooks:
|
|
191
191
|
|
|
192
192
|
```tsx
|
|
193
|
-
import { FrontMcpProvider, reduxStore, valtioStore
|
|
193
|
+
import { createStore, FrontMcpProvider, reduxStore, valtioStore } from '@frontmcp/react';
|
|
194
194
|
|
|
195
195
|
<FrontMcpProvider
|
|
196
196
|
server={server}
|
|
@@ -221,7 +221,7 @@ import { FrontMcpProvider, reduxStore, valtioStore, createStore } from '@frontmc
|
|
|
221
221
|
`@frontmcp/react/api` registers OpenAPI operations as MCP tools with a pluggable HTTP client.
|
|
222
222
|
|
|
223
223
|
```tsx
|
|
224
|
-
import {
|
|
224
|
+
import { createFetchClient, parseOpenApiSpec, useApiClient } from '@frontmcp/react/api';
|
|
225
225
|
|
|
226
226
|
useApiClient({
|
|
227
227
|
baseUrl: 'https://api.example.com',
|
|
@@ -255,7 +255,7 @@ function App() {
|
|
|
255
255
|
## AI Integration
|
|
256
256
|
|
|
257
257
|
```tsx
|
|
258
|
-
import { useAITools, useTools
|
|
258
|
+
import { createToolCallHandler, useAITools, useTools } from '@frontmcp/react/ai';
|
|
259
259
|
```
|
|
260
260
|
|
|
261
261
|
## License
|
package/esm/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "React hooks, components, and AI SDK integration for FrontMCP",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"homepage": "https://docs.agentfront.dev",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
"node": ">=24.0.0"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"@frontmcp/lazy-zod": "1.
|
|
90
|
-
"@frontmcp/sdk": "1.
|
|
91
|
-
"@frontmcp/utils": "1.
|
|
89
|
+
"@frontmcp/lazy-zod": "1.6.0",
|
|
90
|
+
"@frontmcp/sdk": "1.6.0",
|
|
91
|
+
"@frontmcp/utils": "1.6.0",
|
|
92
92
|
"react": "^18.0.0 || ^19.0.0",
|
|
93
93
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
94
94
|
"react-router-dom": "^7.0.0"
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
-
"@frontmcp/sdk": "1.
|
|
106
|
-
"@frontmcp/utils": "1.
|
|
105
|
+
"@frontmcp/sdk": "1.6.0",
|
|
106
|
+
"@frontmcp/utils": "1.6.0"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"typescript": "^5.9.3"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "React hooks, components, and AI SDK integration for FrontMCP",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"homepage": "https://docs.agentfront.dev",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
"node": ">=24.0.0"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"@frontmcp/lazy-zod": "1.
|
|
90
|
-
"@frontmcp/sdk": "1.
|
|
91
|
-
"@frontmcp/utils": "1.
|
|
89
|
+
"@frontmcp/lazy-zod": "1.6.0",
|
|
90
|
+
"@frontmcp/sdk": "1.6.0",
|
|
91
|
+
"@frontmcp/utils": "1.6.0",
|
|
92
92
|
"react": "^18.0.0 || ^19.0.0",
|
|
93
93
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
94
94
|
"react-router-dom": "^7.0.0"
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
-
"@frontmcp/sdk": "1.
|
|
106
|
-
"@frontmcp/utils": "1.
|
|
105
|
+
"@frontmcp/sdk": "1.6.0",
|
|
106
|
+
"@frontmcp/utils": "1.6.0"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"typescript": "^5.9.3"
|