@xenia-martech/mcp 1.0.0-dev.1 → 1.0.0-dev.11
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 +31 -3
- package/dist/bin.js +149 -94
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# @xenia-martech/mcp
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@xenia-martech/mcp)
|
|
4
|
+
[](https://www.npmjs.com/package/@xenia-martech/mcp)
|
|
5
|
+
[](https://www.npmjs.com/package/@xenia-martech/mcp)
|
|
6
|
+
[](https://www.npmjs.com/package/@xenia-martech/mcp)
|
|
7
|
+
|
|
3
8
|
Connect your **Xenia** account to any AI coding assistant. Your assistant reads your real
|
|
4
9
|
journeys — trigger ids, request shapes, personalization content keys — and wires the Xenia SDK
|
|
5
10
|
into your project against those real values instead of guessing.
|
|
@@ -16,6 +21,26 @@ you> wire the abandoned-cart journey into my checkout
|
|
|
16
21
|
→ detects your stack, writes .env, and edits your component
|
|
17
22
|
```
|
|
18
23
|
|
|
24
|
+
## What it wires
|
|
25
|
+
|
|
26
|
+
After you choose how to get the SDK token, the assistant does the rest without stopping:
|
|
27
|
+
|
|
28
|
+
- **One-time setup** for your stack (`xenia_setup_project`). In Next.js: `proxy.ts` (or merges into
|
|
29
|
+
your existing one) for the visitor cookie and page URL, a `lib/xenia.ts` server helper with a
|
|
30
|
+
timeout and circuit breaker, consent from your cookie banner, and form conversions.
|
|
31
|
+
- **Each journey** you name, in your real components: server-side with `{ fallback: null }` so an
|
|
32
|
+
outage renders your default content; `track()` for event triggers.
|
|
33
|
+
- **Checks** — a type-check/build and `xenia_verify`, plus warnings about the journey itself (an
|
|
34
|
+
A/B split that would show the same visitor different variants, a journey that's stopped) with the
|
|
35
|
+
dashboard fix.
|
|
36
|
+
|
|
37
|
+
One SDK token covers everything, webhook triggers that require auth included, and a minted token
|
|
38
|
+
never expires unless you ask for an expiry (it can always be revoked). Connected to a non-default
|
|
39
|
+
engine with `--base-url`? The mint tool also writes `XENIA_URL`, so your app calls that same engine.
|
|
40
|
+
|
|
41
|
+
It stops to ask only for the token choice, a production write, or — if your site has no consent
|
|
42
|
+
banner — whether analytics needs consent.
|
|
43
|
+
|
|
19
44
|
## Install
|
|
20
45
|
|
|
21
46
|
Pick your assistant — each command registers the server via the assistant's own MCP config.
|
|
@@ -62,11 +87,12 @@ can be disconnected there at any time.
|
|
|
62
87
|
| `xenia_login` / `xenia_login_wait` | Connect via browser approval |
|
|
63
88
|
| `xenia_status` | Who is connected, and the active workspace |
|
|
64
89
|
| `xenia_list_scopes` / `xenia_select_scope` | See and switch org / tenant / environment |
|
|
65
|
-
| `xenia_list_journeys` | The journeys in the active workspace |
|
|
66
|
-
| `xenia_get_journey` | Trigger id, method, request fields, content keys,
|
|
90
|
+
| `xenia_list_journeys` | The journeys in the active workspace, each with its trigger(s) — flagged `can't connect` for a scheduler or a Shopify/HubSpot trigger whose connector isn't connected |
|
|
91
|
+
| `xenia_get_journey` | Trigger id, method, request fields, content keys, a stack-matched SDK snippet, and journey warnings (e.g. a non-sticky A/B split) |
|
|
67
92
|
| `xenia_list_content_keys` | Every personalization key, and which journeys resolve it |
|
|
68
93
|
| `xenia_detect_stack` | Framework, SDK entry point, and which token type this project needs |
|
|
69
|
-
| `
|
|
94
|
+
| `xenia_setup_project` | The one-time wiring plan for this stack: files to create or merge, consent, forms, verification |
|
|
95
|
+
| `xenia_mint_sdk_token` | Mint a token (never expires unless `expiresInDays` is given) and write it, plus the engine URL when it isn't the default, to your env file |
|
|
70
96
|
| `xenia_verify` | Read journeys, resolve a content key, optionally fire a test event |
|
|
71
97
|
| `xenia_logout` | Revoke the session and forget the local credential |
|
|
72
98
|
|
|
@@ -74,6 +100,8 @@ can be disconnected there at any time.
|
|
|
74
100
|
|
|
75
101
|
- **No token value ever appears in a tool result.** Minted SDK tokens are written straight to your
|
|
76
102
|
env file; session tokens stay in `~/.xenia/credentials.json` (mode `0600`).
|
|
103
|
+
- **Setup always asks first.** Before creating an SDK token, the assistant asks whether you want it
|
|
104
|
+
minted now or created by you in the dashboard's API Tokens page — it never mints one unasked.
|
|
77
105
|
- **The SDK token type is derived from your project, not guessed** — a server token stays
|
|
78
106
|
server-side; a browser token is origin-restricted.
|
|
79
107
|
- **Writes against a production environment require explicit confirmation.**
|