@mcp-native/webview 0.0.2 → 0.1.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 +102 -1
- package/dist/index.d.ts +26 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +85 -3
- package/dist/index.js.map +1 -1
- package/package.json +14 -3
package/README.md
CHANGED
|
@@ -1,3 +1,104 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# @mcp-native/webview
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
### Deny-by-default HTML policy primitives for a future MCP Apps host
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@mcp-native/webview)
|
|
8
|
+
[](https://www.npmjs.com/package/@mcp-native/webview)
|
|
9
|
+
[](https://github.com/pablospaniard/mcp-native/blob/main/LICENSE)
|
|
10
|
+
|
|
11
|
+
[GitHub](https://github.com/pablospaniard/mcp-native) · [Architecture](https://github.com/pablospaniard/mcp-native/blob/main/docs/RFC-0001-architecture.md) · [Standards status](https://github.com/pablospaniard/mcp-native/blob/main/docs/standards-compatibility.md) · [Security](https://github.com/pablospaniard/mcp-native/blob/main/SECURITY.md)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
> **Experimental:** this package defines document validation and one policy decision. It does not mount or sandbox a platform WebView and is not a complete MCP Apps host.
|
|
16
|
+
|
|
17
|
+
`@mcp-native/webview` handles the compatibility path for MCP resources that contain HTML. It recognizes supported MIME types and rejects both inline and remote documents unless the host explicitly grants them through policy. Inline base URLs are limited to non-network `ui:` / `mcp:` schemes. Remote loads require an exact origin allowlist, accept only credential-free `http:` / `https:` URIs, and use a dedicated `{ uri, mimeType }` input rather than an MCP blob/text body.
|
|
18
|
+
|
|
19
|
+
Current support does not include tool `_meta.ui.resourceUri` discovery, `ui://` preloading, resource CSP or permission metadata, `ui/initialize`, AppBridge, the Apps JSON-RPC protocol, or a postMessage bridge. Those are required before this package can claim [MCP Apps](https://modelcontextprotocol.io/extensions/apps/overview) host compatibility.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @mcp-native/webview
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`@mcp-native/core` is installed as a dependency. The package is ESM-only and includes TypeScript declarations.
|
|
28
|
+
|
|
29
|
+
## Inline HTML (opt-in)
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { createWebViewDocument } from "@mcp-native/webview";
|
|
33
|
+
|
|
34
|
+
const document = createWebViewDocument(
|
|
35
|
+
{
|
|
36
|
+
uri: "mcp://example/app",
|
|
37
|
+
mimeType: "text/html",
|
|
38
|
+
text: "<main>Hello from an MCP App</main>",
|
|
39
|
+
},
|
|
40
|
+
{ allowInlineDocuments: true },
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
// { kind: "inline", html: "...", baseUrl: "mcp://example/app" }
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Inline documents and remote documents are both denied by default. Inline base URLs must use a non-network allowlisted scheme (`ui:` or `mcp:`) so relative fetches cannot be steered at an arbitrary https origin. Embedded credentials are always rejected.
|
|
47
|
+
|
|
48
|
+
## Remote documents require an origin allowlist
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import { createWebViewDocument, WebViewPolicyError } from "@mcp-native/webview";
|
|
52
|
+
|
|
53
|
+
const resource = {
|
|
54
|
+
uri: "https://example.com/app",
|
|
55
|
+
mimeType: "text/html",
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
try {
|
|
59
|
+
createWebViewDocument(resource);
|
|
60
|
+
} catch (error) {
|
|
61
|
+
if (error instanceof WebViewPolicyError) {
|
|
62
|
+
console.error(error.message);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const allowed = createWebViewDocument(resource, {
|
|
67
|
+
allowRemoteDocuments: true,
|
|
68
|
+
allowedRemoteOrigins: ["https://example.com"],
|
|
69
|
+
});
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Remote inputs are `{ uri, mimeType }` references (not MCP text/blob resource bodies). Only credential-free `http:` / `https:` URIs are accepted, and the URI origin must appear exactly in `allowedRemoteOrigins`. Binary `blob` resources are rejected.
|
|
73
|
+
|
|
74
|
+
## Public API
|
|
75
|
+
|
|
76
|
+
| Export | Purpose |
|
|
77
|
+
| ----------------------- | ----------------------------------------------------------------------------------------- |
|
|
78
|
+
| `isHtmlResource` | Returns whether a resource declares a supported HTML MIME type. |
|
|
79
|
+
| `createWebViewDocument` | Validates a text or remote HTML input and returns a policy-approved document descriptor. |
|
|
80
|
+
| `WebViewDocumentInput` | `McpTextResourceContents` or `{ uri, mimeType }` remote reference (never blob resources). |
|
|
81
|
+
| `WebViewRemoteResource` | Remote HTML reference without a resource body. |
|
|
82
|
+
| `WebViewPolicy` | Host policy for inline opt-in, remote opt-in, and remote origin allowlists. |
|
|
83
|
+
| `WebViewDocument` | Discriminated union for inline and remote documents. |
|
|
84
|
+
| `WebViewPolicyError` | Error thrown for unsupported MIME types, schemes, credentials, or denied documents. |
|
|
85
|
+
|
|
86
|
+
Supported MIME types are `text/html` and `text/html+skybridge`.
|
|
87
|
+
|
|
88
|
+
## Host responsibilities
|
|
89
|
+
|
|
90
|
+
Returning a `WebViewDocument` is not permission to render it without further controls. A production host must still define:
|
|
91
|
+
|
|
92
|
+
- allowed origins and navigation rules;
|
|
93
|
+
- bridge message schemas and directionality;
|
|
94
|
+
- storage, cookie, download, and external-link policy;
|
|
95
|
+
- camera, microphone, location, clipboard, and filesystem permissions;
|
|
96
|
+
- process isolation and platform-specific WebView hardening.
|
|
97
|
+
|
|
98
|
+
See the repository's [security policy](https://github.com/pablospaniard/mcp-native/blob/main/SECURITY.md) before expanding this boundary. Install [`mcp-native`](https://www.npmjs.com/package/mcp-native) for the combined runtime and UI APIs.
|
|
99
|
+
|
|
100
|
+
The planned compatibility work and the differences between browser iframe isolation and native WebView isolation are tracked in [Standards and compatibility](https://github.com/pablospaniard/mcp-native/blob/main/docs/standards-compatibility.md).
|
|
101
|
+
|
|
102
|
+
## License
|
|
103
|
+
|
|
104
|
+
[MIT](https://github.com/pablospaniard/mcp-native/blob/main/LICENSE)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { McpTextResourceContents } from "@mcp-native/core";
|
|
2
2
|
export interface WebViewPolicy {
|
|
3
|
+
/**
|
|
4
|
+
* Allows returning inline HTML from a text resource. Denied by default —
|
|
5
|
+
* hosts must opt in and still apply their own WebView sandbox.
|
|
6
|
+
*/
|
|
7
|
+
readonly allowInlineDocuments?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Allows remote documents. Requires a non-empty `allowedRemoteOrigins` list
|
|
10
|
+
* and only accepts credential-free `http:` / `https:` URIs.
|
|
11
|
+
*/
|
|
3
12
|
readonly allowRemoteDocuments?: boolean;
|
|
13
|
+
/** Exact origins such as `https://example.com` that may be loaded remotely. */
|
|
14
|
+
readonly allowedRemoteOrigins?: readonly string[];
|
|
4
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* A remote HTML document reference. Unlike `McpResource`, remote WebView inputs
|
|
18
|
+
* intentionally omit `text`/`blob` bodies — the host loads `uri` after policy checks.
|
|
19
|
+
*/
|
|
20
|
+
export interface WebViewRemoteResource {
|
|
21
|
+
readonly uri: string;
|
|
22
|
+
readonly mimeType: string;
|
|
23
|
+
}
|
|
24
|
+
/** Inputs accepted by `createWebViewDocument`. Binary MCP resources are not accepted. */
|
|
25
|
+
export type WebViewDocumentInput = McpTextResourceContents | WebViewRemoteResource;
|
|
5
26
|
export type WebViewDocument = {
|
|
6
27
|
readonly kind: "inline";
|
|
7
28
|
readonly html: string;
|
|
@@ -13,6 +34,8 @@ export type WebViewDocument = {
|
|
|
13
34
|
export declare class WebViewPolicyError extends Error {
|
|
14
35
|
constructor(message: string);
|
|
15
36
|
}
|
|
16
|
-
export declare function isHtmlResource(resource:
|
|
17
|
-
|
|
37
|
+
export declare function isHtmlResource(resource: {
|
|
38
|
+
readonly mimeType?: string;
|
|
39
|
+
}): boolean;
|
|
40
|
+
export declare function createWebViewDocument(resource: WebViewDocumentInput, policy?: WebViewPolicy): WebViewDocument;
|
|
18
41
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAMhE,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IACxC;;;OAGG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IACxC,+EAA+E;IAC/E,QAAQ,CAAC,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACnD;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,yFAAyF;AACzF,MAAM,MAAM,oBAAoB,GAAG,uBAAuB,GAAG,qBAAqB,CAAC;AAEnF,MAAM,MAAM,eAAe,GACvB;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB,CAAC;AAEN,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE;IAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAEhF;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,oBAAoB,EAC9B,MAAM,GAAE,aAAkB,GACzB,eAAe,CA2CjB"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
const HTML_MIME_TYPES = new Set(["text/html", "text/html+skybridge"]);
|
|
2
|
+
/** Non-network schemes permitted for inline document base URLs. */
|
|
3
|
+
const INLINE_BASE_URL_SCHEMES = new Set(["ui", "mcp"]);
|
|
2
4
|
export class WebViewPolicyError extends Error {
|
|
3
5
|
constructor(message) {
|
|
4
6
|
super(message);
|
|
@@ -12,12 +14,92 @@ export function createWebViewDocument(resource, policy = {}) {
|
|
|
12
14
|
if (!isHtmlResource(resource)) {
|
|
13
15
|
throw new WebViewPolicyError(`Unsupported WebView MIME type: ${resource.mimeType ?? "unknown"}`);
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
const uri = expectDocumentUri(resource.uri, "resource.uri");
|
|
18
|
+
if (hasOwnDefined(resource, "blob")) {
|
|
19
|
+
throw new WebViewPolicyError("Binary WebView resources are not supported");
|
|
20
|
+
}
|
|
21
|
+
if (hasOwnDefined(resource, "text")) {
|
|
22
|
+
const text = resource.text;
|
|
23
|
+
if (typeof text !== "string") {
|
|
24
|
+
throw new WebViewPolicyError("Expected a string at resource.text");
|
|
25
|
+
}
|
|
26
|
+
if (policy.allowInlineDocuments !== true) {
|
|
27
|
+
throw new WebViewPolicyError("Inline WebView documents are disabled by policy");
|
|
28
|
+
}
|
|
29
|
+
assertInlineBaseUrl(uri);
|
|
30
|
+
return { kind: "inline", html: text, baseUrl: uri };
|
|
17
31
|
}
|
|
18
32
|
if (policy.allowRemoteDocuments !== true) {
|
|
19
33
|
throw new WebViewPolicyError("Remote WebView documents are disabled by policy");
|
|
20
34
|
}
|
|
21
|
-
|
|
35
|
+
const allowedOrigins = policy.allowedRemoteOrigins;
|
|
36
|
+
if (allowedOrigins === undefined || allowedOrigins.length === 0) {
|
|
37
|
+
throw new WebViewPolicyError("Remote WebView documents require a non-empty allowedRemoteOrigins allowlist");
|
|
38
|
+
}
|
|
39
|
+
for (const [index, origin] of allowedOrigins.entries()) {
|
|
40
|
+
assertOriginAllowlistEntry(expectDocumentUri(origin, `allowedRemoteOrigins[${index}]`));
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
kind: "remote",
|
|
44
|
+
uri: assertAllowedRemoteUri(uri, allowedOrigins),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function hasOwnDefined(value, key) {
|
|
48
|
+
return Object.hasOwn(value, key) && value[key] !== undefined;
|
|
49
|
+
}
|
|
50
|
+
function expectDocumentUri(value, path) {
|
|
51
|
+
if (typeof value !== "string") {
|
|
52
|
+
throw new WebViewPolicyError(`Expected a string at ${path}`);
|
|
53
|
+
}
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
function parseDocumentUrl(uri, path) {
|
|
57
|
+
const URLParser = globalThis.URL;
|
|
58
|
+
if (URLParser === undefined) {
|
|
59
|
+
throw new WebViewPolicyError("URL parsing is unavailable in this runtime");
|
|
60
|
+
}
|
|
61
|
+
let url;
|
|
62
|
+
try {
|
|
63
|
+
url = new URLParser(uri);
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
throw new WebViewPolicyError(`Invalid WebView document URI at ${path}`);
|
|
67
|
+
}
|
|
68
|
+
if (url.username.length > 0 || url.password.length > 0) {
|
|
69
|
+
throw new WebViewPolicyError("WebView document URIs must not include embedded credentials");
|
|
70
|
+
}
|
|
71
|
+
return url;
|
|
72
|
+
}
|
|
73
|
+
function assertInlineBaseUrl(uri) {
|
|
74
|
+
const url = parseDocumentUrl(uri, "resource.uri");
|
|
75
|
+
const scheme = url.protocol.replace(/:$/, "").toLowerCase();
|
|
76
|
+
if (!INLINE_BASE_URL_SCHEMES.has(scheme)) {
|
|
77
|
+
throw new WebViewPolicyError(`Inline WebView base URL scheme is not allowlisted: ${scheme}:`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function assertOriginAllowlistEntry(origin) {
|
|
81
|
+
const url = parseDocumentUrl(origin, "allowedRemoteOrigins");
|
|
82
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
83
|
+
throw new WebViewPolicyError(`allowedRemoteOrigins entries must use http: or https:, received ${url.protocol}`);
|
|
84
|
+
}
|
|
85
|
+
if (url.hostname.length === 0) {
|
|
86
|
+
throw new WebViewPolicyError("allowedRemoteOrigins entries require a hostname");
|
|
87
|
+
}
|
|
88
|
+
if (url.origin !== origin) {
|
|
89
|
+
throw new WebViewPolicyError(`allowedRemoteOrigins entries must be exact origins such as https://example.com, received ${origin}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function assertAllowedRemoteUri(uri, allowedOrigins) {
|
|
93
|
+
const url = parseDocumentUrl(uri, "resource.uri");
|
|
94
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
95
|
+
throw new WebViewPolicyError(`Remote WebView documents require http: or https:, received ${url.protocol}`);
|
|
96
|
+
}
|
|
97
|
+
if (url.hostname.length === 0) {
|
|
98
|
+
throw new WebViewPolicyError("Remote WebView documents require a hostname");
|
|
99
|
+
}
|
|
100
|
+
if (!allowedOrigins.includes(url.origin)) {
|
|
101
|
+
throw new WebViewPolicyError(`Remote WebView origin is not allowlisted: ${url.origin}`);
|
|
102
|
+
}
|
|
103
|
+
return uri;
|
|
22
104
|
}
|
|
23
105
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA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itives for MCP Native.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"mcp-apps",
|
|
8
|
+
"model-context-protocol",
|
|
9
|
+
"security",
|
|
10
|
+
"webview"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/pablospaniard/mcp-native#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/pablospaniard/mcp-native/issues"
|
|
15
|
+
},
|
|
5
16
|
"license": "MIT",
|
|
6
17
|
"repository": {
|
|
7
18
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/pablospaniard/mcp-native.git",
|
|
19
|
+
"url": "git+https://github.com/pablospaniard/mcp-native.git",
|
|
9
20
|
"directory": "packages/webview"
|
|
10
21
|
},
|
|
11
22
|
"files": [
|
|
@@ -26,6 +37,6 @@
|
|
|
26
37
|
"access": "public"
|
|
27
38
|
},
|
|
28
39
|
"dependencies": {
|
|
29
|
-
"@mcp-native/core": "^0.0
|
|
40
|
+
"@mcp-native/core": "^0.1.0"
|
|
30
41
|
}
|
|
31
42
|
}
|