@ractive-ch/tab-mcp 0.5.1 → 0.6.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 +22 -3
- package/index.js +775 -170
- package/index.js.map +12 -10
- package/jwt.d.ts +10 -2
- package/main.js +775 -170
- package/main.js.map +12 -10
- package/oauth/cimd.d.ts +49 -4
- package/oauth/client-auth.d.ts +86 -0
- package/oauth/domain-cache.d.ts +24 -0
- package/oauth/server.d.ts +1 -0
- package/package.json +2 -2
- package/relay.d.ts +6 -0
- package/store/memory.d.ts +13 -0
- package/store/sqlite.d.ts +2 -0
- package/store/types.d.ts +17 -0
- package/testing.d.ts +33 -2
- package/testing.js +5863 -1
- package/testing.js.map +28 -4
- package/tokens.d.ts +4 -1
package/README.md
CHANGED
|
@@ -10,14 +10,14 @@ and gets an MCP address. The user adds that address to an AI app and pairs it by
|
|
|
10
10
|
a code from the page on the relay's sign-in page. The relay then forwards the AI app's
|
|
11
11
|
requests to the page. It knows nothing about the tools themselves.
|
|
12
12
|
|
|
13
|
-
**Status: 0.
|
|
13
|
+
**Status: 0.6.1.** Until 1.0, a new minor version can still change settings and the API.
|
|
14
14
|
The relay speaks MCP revision 2026-07-28 only and accepts AI apps that register through
|
|
15
15
|
OAuth Client ID Metadata Documents; see [compatibility](https://github.com/ractive/tab-mcp/blob/main/docs/compatibility.md)
|
|
16
16
|
for which apps work.
|
|
17
17
|
|
|
18
18
|
## Run it
|
|
19
19
|
|
|
20
|
-
The relay needs [Bun](https://bun.sh) 1.4.
|
|
20
|
+
The relay needs [Bun](https://bun.sh) 1.4.4 or newer. It does not run on Node.js.
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
23
|
bun add --global @ractive-ch/tab-mcp
|
|
@@ -32,7 +32,7 @@ Or with Docker (linux/amd64 and linux/arm64):
|
|
|
32
32
|
docker run -d -p 127.0.0.1:8080:8080 -v tab-mcp-data:/data \
|
|
33
33
|
-e TAB_MCP_PUBLIC_URL=https://relay.example.com \
|
|
34
34
|
-e TAB_MCP_ALLOWED_ORIGINS=https://app.example.com \
|
|
35
|
-
ractive/tab-mcp:0.
|
|
35
|
+
ractive/tab-mcp:0.6.1
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
The image is also on `ghcr.io/ractive/tab-mcp`. Put the relay behind a reverse proxy
|
|
@@ -112,6 +112,25 @@ tokenStoreConformance("MyTokenStore", () => new MyTokenStore());
|
|
|
112
112
|
[Token store](https://github.com/ractive/tab-mcp/blob/main/docs/token-store.md) explains
|
|
113
113
|
the interface, its guarantees and a Redis example.
|
|
114
114
|
|
|
115
|
+
### Testing a page's tools
|
|
116
|
+
|
|
117
|
+
For end-to-end tests under `bun test`, `startTestRelay()` runs a relay in the test
|
|
118
|
+
process (127.0.0.1, a free port, development mode, every page origin allowed, a memory
|
|
119
|
+
store, no log output unless `logger` or `logLevel` is given; options override any of that), and `tokenFor()` writes a token for
|
|
120
|
+
a page's MCP address into its store, as if an AI app had paired:
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
import { startTestRelay, tokenFor } from "@ractive-ch/tab-mcp/testing";
|
|
124
|
+
|
|
125
|
+
const relay = startTestRelay();
|
|
126
|
+
// The page connects with `relay: relay.url`; its address is `session.address`.
|
|
127
|
+
const token = await tokenFor(relay.store, address);
|
|
128
|
+
// Any MCP client, with the header `Authorization: Bearer ${token}`.
|
|
129
|
+
await relay.stop();
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
It is for tests only: it accepts every origin and skips pairing.
|
|
133
|
+
|
|
115
134
|
## Security
|
|
116
135
|
|
|
117
136
|
Connecting an AI app to a page means trusting that page, as with any MCP server. The
|