mcp-native 0.9.0 → 0.9.2
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/LICENSE +21 -0
- package/README.md +18 -28
- package/package.json +11 -8
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MCP Native contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# mcp-native
|
|
4
4
|
|
|
5
|
-
### One entry point for the MCP Native
|
|
5
|
+
### One entry point for the MCP Native React Native host runtime
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/mcp-native)
|
|
8
8
|
[](https://www.npmjs.com/package/mcp-native)
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
`mcp-native` is the convenient way to use the runtime, A2UI, React Native, mixed-surface, and WebView
|
|
17
|
+
APIs from one package. It re-exports the focused `@mcp-native/*` layers while leaving transport
|
|
18
|
+
adapters as a separate installation choice.
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
The current 0.9 line contains the React Native feature set planned for 1.0 and is ready to try in an
|
|
21
|
+
integration. New work should use A2UI v1 Candidate or the stable MCP Apps `2026-01-26` host flow;
|
|
22
|
+
the custom A2UI 0.1 APIs live under `/legacy` for migration.
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Read the human-oriented [product guide](https://github.com/pablospaniard/mcp-native/blob/main/docs/product-guide.md)
|
|
23
|
-
and [mixed-surface guide](https://github.com/pablospaniard/mcp-native/blob/main/docs/mixed-surfaces.md)
|
|
24
|
-
before the API examples.
|
|
24
|
+
For the big picture, start with the [product guide](https://github.com/pablospaniard/mcp-native/blob/main/docs/product-guide.md).
|
|
25
25
|
|
|
26
26
|
## Install
|
|
27
27
|
|
|
@@ -41,20 +41,18 @@ official action envelopes to a host callback; it never selects a return transpor
|
|
|
41
41
|
[complete v1 host-flow example](https://github.com/pablospaniard/mcp-native#a2ui-v1-candidate-host-flow)
|
|
42
42
|
and the [`@mcp-native/react-native` adapter documentation](https://github.com/pablospaniard/mcp-native/tree/main/packages/react-native#a2ui-v1-render-plan-adapter).
|
|
43
43
|
|
|
44
|
-
##
|
|
44
|
+
## Legacy custom `0.1` migration
|
|
45
45
|
|
|
46
46
|
For `0.9.x`, migrate these imports to `mcp-native/legacy`. Root aliases are removed at `1.0.0`;
|
|
47
47
|
the explicit legacy subpath stays frozen for migration and security fixes.
|
|
48
48
|
|
|
49
49
|
```tsx
|
|
50
|
+
import { McpNativeRuntime, createAllowlistActionPolicy, type McpClient } from "mcp-native";
|
|
50
51
|
import {
|
|
51
52
|
McpNativeSurface,
|
|
52
|
-
McpNativeRuntime,
|
|
53
|
-
createAllowlistActionPolicy,
|
|
54
53
|
parseA2uiSurface,
|
|
55
54
|
useMcpNativeActionDispatcher,
|
|
56
|
-
|
|
57
|
-
} from "mcp-native";
|
|
55
|
+
} from "mcp-native/legacy";
|
|
58
56
|
import { Button, Text, TextInput, View } from "react-native";
|
|
59
57
|
|
|
60
58
|
const components = { Button, Text, TextInput, View };
|
|
@@ -119,10 +117,10 @@ Install an individual package instead when you only need one layer.
|
|
|
119
117
|
|
|
120
118
|
Use the separately installable [`@mcp-native/mcp`](https://github.com/pablospaniard/mcp-native/tree/main/packages/mcp) package to connect these APIs to the official MCP TypeScript SDK without forcing that SDK dependency on every `mcp-native` consumer.
|
|
121
119
|
|
|
122
|
-
##
|
|
120
|
+
## Included in the current 0.9 line
|
|
123
121
|
|
|
124
122
|
- transport-independent MCP runtime contracts;
|
|
125
|
-
-
|
|
123
|
+
- isolated migration support for the deprecated custom `0.1` surface;
|
|
126
124
|
- declared tool-action dispatch;
|
|
127
125
|
- strict A2UI resource-link resolution from tool results;
|
|
128
126
|
- schema-validated A2UI v1 JSONL lifecycle state and explicit host policies;
|
|
@@ -147,24 +145,16 @@ Use the separately installable [`@mcp-native/mcp`](https://github.com/pablospani
|
|
|
147
145
|
- pinned current-protocol integration coverage through the SDK HTTP handler/fetch path;
|
|
148
146
|
- ESM exports, TypeScript declarations, automated tests, and signed npm provenance.
|
|
149
147
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
non-media catalog, typed renderer-local bindings, bounded formatting and validation, host-callback
|
|
155
|
-
actions, required image grants, policy-gated HTTP(S) `openUrl`, and exact installed-subset
|
|
156
|
-
discovery. Release `0.6.0` added bounded consent, expiring/revocable host-owned grants, interactive
|
|
157
|
-
OAuth, scope history, lifecycle coordination, actionable states, and redacted operations. Complete
|
|
158
|
-
MCP and A2UI conformance, full streaming host integration, transport placement for A2UI capability
|
|
159
|
-
objects, and separate non-blocking Expo Go integration PoCs remain future work. Follow the
|
|
160
|
-
[roadmap](https://github.com/pablospaniard/mcp-native/blob/main/docs/roadmap.md) for exact claim
|
|
161
|
-
boundaries.
|
|
148
|
+
For the release-by-release history, see the
|
|
149
|
+
[changelog](https://github.com/pablospaniard/mcp-native/blob/main/CHANGELOG.md). The runnable
|
|
150
|
+
[Expo Go todo app](../../examples/expo-go-todolist/README.md) shows the main A2UI and React Native
|
|
151
|
+
pieces working together.
|
|
162
152
|
|
|
163
153
|
## Security model
|
|
164
154
|
|
|
165
155
|
Remote servers may provide declarative UI and actions, but the host owns component resolution, tool execution, permissions, and every sensitive capability. Unknown data fails closed at validation and policy boundaries.
|
|
166
156
|
|
|
167
|
-
Read the full [architecture](https://github.com/pablospaniard/mcp-native/blob/main/docs/RFC-0001-architecture.md) and [security policy](https://github.com/pablospaniard/mcp-native/blob/main/SECURITY.md) before
|
|
157
|
+
Read the full [architecture](https://github.com/pablospaniard/mcp-native/blob/main/docs/RFC-0001-architecture.md) and [security policy](https://github.com/pablospaniard/mcp-native/blob/main/SECURITY.md) before integrating or extending the runtime.
|
|
168
158
|
|
|
169
159
|
## License
|
|
170
160
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-native",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "Convenience package for the MCP Native runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"a2ui",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"dist",
|
|
24
|
+
"LICENSE",
|
|
24
25
|
"README.md"
|
|
25
26
|
],
|
|
26
27
|
"type": "module",
|
|
@@ -30,25 +31,27 @@
|
|
|
30
31
|
"exports": {
|
|
31
32
|
".": {
|
|
32
33
|
"types": "./dist/index.d.ts",
|
|
33
|
-
"import": "./dist/index.js"
|
|
34
|
+
"import": "./dist/index.js",
|
|
35
|
+
"default": "./dist/index.js"
|
|
34
36
|
},
|
|
35
37
|
"./legacy": {
|
|
36
38
|
"types": "./dist/legacy.d.ts",
|
|
37
|
-
"import": "./dist/legacy.js"
|
|
39
|
+
"import": "./dist/legacy.js",
|
|
40
|
+
"default": "./dist/legacy.js"
|
|
38
41
|
}
|
|
39
42
|
},
|
|
40
43
|
"publishConfig": {
|
|
41
44
|
"access": "public"
|
|
42
45
|
},
|
|
43
46
|
"dependencies": {
|
|
44
|
-
"@mcp-native/a2ui": "^0.9.
|
|
45
|
-
"@mcp-native/core": "^0.9.
|
|
46
|
-
"@mcp-native/react-native": "^0.9.
|
|
47
|
-
"@mcp-native/webview": "^0.9.
|
|
47
|
+
"@mcp-native/a2ui": "^0.9.2",
|
|
48
|
+
"@mcp-native/core": "^0.9.2",
|
|
49
|
+
"@mcp-native/react-native": "^0.9.2",
|
|
50
|
+
"@mcp-native/webview": "^0.9.2"
|
|
48
51
|
},
|
|
49
52
|
"peerDependencies": {
|
|
50
53
|
"react": ">=18.3.1 <20",
|
|
51
|
-
"react-native": ">=0.
|
|
54
|
+
"react-native": ">=0.86.0 <1"
|
|
52
55
|
},
|
|
53
56
|
"peerDependenciesMeta": {
|
|
54
57
|
"react-native": {
|