@sentientui/mcp 0.3.2 → 0.3.3

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/AGENTS.md CHANGED
@@ -17,7 +17,7 @@ Only call `create_variant` for the no-code path. If the user is writing (or you
17
17
 
18
18
  **Shadow mode** — project-level flag (toggled in dashboard settings). When ON: personalization is computed and logged but visitors receive the default layout/variant. Use it to validate the algorithm before committing to live changes.
19
19
 
20
- **Insights** — AI-generated. Two tiers: narrator observations (all plans) + advisor recommendations (Growth tier). Insights go stale after 6 hours. Always check `isStale` before presenting them.
20
+ **Insights** — AI-generated. Two tiers: narrator observations (generation requires Starter+; Free plans can only view already-stored bullets) + advisor recommendations (Growth tier). Insights go stale after 6 hours. Always check `isStale` before presenting them.
21
21
 
22
22
  **Layout stats** — per-persona section ordering driven by a bandit algorithm. `pulls` = times a layout was applied, `avgReward` = normalized conversion signal (not raw CVR).
23
23
 
@@ -57,7 +57,7 @@ Server keys start with `sk_` — required for the management API. Public keys (`
57
57
  2. `get_variant_brief` — pull performance, audience, insights, data-sufficiency, best-practice priors, and code instructions for that component
58
58
  3. Find `<Adaptive id="...">` in the repo and add a new on-brand variant key to its `variants` map (and to the `AdaptiveRoot` `components` list if SSR). Match the project's existing components and design system.
59
59
  4. Do **not** call `create_variant`. Commit, push, deploy — the variant auto-registers on the first assignment and goes live.
60
- 5. Optional: enable shadow mode for the component first to validate before serving.
60
+ 5. Optional: enable shadow mode (project-level, in dashboard settings — it applies to the whole project, not a single component) first to validate before serving.
61
61
 
62
62
  Data sufficiency (from the brief) drives the change: when it reports **SUFFICIENT**, target the specific weakness; when **COLLECTING** or **EMPTY** (no data yet), apply the best-practice priors for the project's context type — use your best judgment and make one conservative change.
63
63
 
package/README.md CHANGED
@@ -10,7 +10,11 @@ Dashboard → Project → **Settings → API key → Server key** → Generate (
10
10
 
11
11
  **2. Add to your AI assistant**
12
12
 
13
- **Claude Code** — `~/.claude/settings.json`:
13
+ **Claude Code** — one command:
14
+ ```bash
15
+ claude mcp add sentientui -e SENTIENTUI_API_KEY=sk_your_key_here -- npx -y @sentientui/mcp
16
+ ```
17
+ Or check a project-scoped `.mcp.json` into your repo:
14
18
  ```json
15
19
  {
16
20
  "mcpServers": {
@@ -18,7 +22,7 @@ Dashboard → Project → **Settings → API key → Server key** → Generate (
18
22
  "command": "npx",
19
23
  "args": ["-y", "@sentientui/mcp"],
20
24
  "env": {
21
- "SENTIENTUI_API_KEY": "sk_live_your_key_here"
25
+ "SENTIENTUI_API_KEY": "sk_your_key_here"
22
26
  }
23
27
  }
24
28
  }
@@ -33,7 +37,7 @@ Dashboard → Project → **Settings → API key → Server key** → Generate (
33
37
  "command": "npx",
34
38
  "args": ["-y", "@sentientui/mcp"],
35
39
  "env": {
36
- "SENTIENTUI_API_KEY": "sk_live_your_key_here"
40
+ "SENTIENTUI_API_KEY": "sk_your_key_here"
37
41
  }
38
42
  }
39
43
  }
@@ -49,7 +53,7 @@ Dashboard → Project → **Settings → API key → Server key** → Generate (
49
53
  "command": "npx",
50
54
  "args": ["-y", "@sentientui/mcp"],
51
55
  "env": {
52
- "SENTIENTUI_API_KEY": "sk_live_your_key_here"
56
+ "SENTIENTUI_API_KEY": "sk_your_key_here"
53
57
  }
54
58
  }
55
59
  }
@@ -82,7 +86,7 @@ A sandboxed demo token is provisioned automatically — 10 calls/month, read-onl
82
86
  | `get_goal_funnel` | Goal hit counts and conversion rates per variant |
83
87
  | `list_guardrail_events` | Variants auto-paused by the guardrail (last 24h) |
84
88
  | `get_layout_stats` | Per-persona section layout rankings and reward weights |
85
- | `get_integration_guide` | Framework-specific setup instructions for the current project |
89
+ | `get_integration_guide` | SentientUI adaptive-ladder setup guide (static — same for every project) |
86
90
  | `get_test_brief` | What to test and how, for the project's current state |
87
91
  | `get_variant_brief` | Insight-driven brief for writing a new **code-native** variant: performance, audience, insights, data-sufficiency (with a best-practice fallback when there's no data yet), and step-by-step code instructions |
88
92
  | `create_variant` | Create a no-code (managed) text variant (Starter+) — fallback for text-only variants without a code change |
@@ -106,8 +110,8 @@ A sandboxed demo token is provisioned automatically — 10 calls/month, read-onl
106
110
 
107
111
  | Environment variable | Default | Description |
108
112
  |----------------------|---------|-------------|
109
- | `SENTIENTUI_API_KEY` | — | Your `sk_live_...` server key. Required (or demo mode activates). |
110
- | `SENTIENTUI_API_URL` | `https://api.sentient-ui.com` | Override for self-hosted or staging deployments. |
113
+ | `SENTIENTUI_API_KEY` | — | Your `sk_...` server key. Required (or demo mode activates). |
114
+ | `SENTIENTUI_API_URL` | `https://api.sentient-ui.com` | Override for staging or a custom API endpoint. |
111
115
 
112
116
  ## Auth model
113
117
 
package/dist/index.cjs CHANGED
@@ -580,16 +580,17 @@ Visit 2 converts. Integrate one rung at a time.
580
580
  ## Setup (60 seconds, no account)
581
581
 
582
582
  1. Run \`npx @sentientui/cli init\` (detects Next App/Pages, Vite, Remix, CRA; installs
583
- @sentientui/react; wraps the app; writes .env.local; scaffolds an example).
584
- 2. \`npm run dev\`, then open the app with \`?sentient_persona=buyer\` vs
583
+ @sentientui/react; writes .env.local; scaffolds an example). It does NOT edit your layout \u2014
584
+ it prints the wrap snippet for step 2.
585
+ 2. Wrap the root layout with <AdaptiveRoot apiKey context> (from '@sentientui/react/next';
586
+ other React apps use <AdaptiveProvider> from '@sentientui/react') and add
587
+ suppressHydrationWarning to <html> \u2014 an inline script sets persona attributes pre-paint.
588
+ Nothing adapts and nothing is tracked until this wrap is in place.
589
+ 3. \`npm run dev\`, then open the app with \`?sentient_persona=buyer\` vs
585
590
  \`?sentient_persona=deal_seeker\` to see it adapt. No API key needed (keyless local mode).
586
- 3. To learn from real traffic: create a project at https://sentient-ui.com and set
591
+ 4. To learn from real traffic: create a project at https://sentient-ui.com and set
587
592
  NEXT_PUBLIC_SENTIENT_API_KEY=pk_... in .env.local.
588
593
 
589
- Manual setup: wrap the root layout with <AdaptiveRoot apiKey context> (from
590
- '@sentientui/react/next'; other React apps use <AdaptiveProvider> from '@sentientui/react')
591
- and add suppressHydrationWarning to <html> \u2014 an inline script sets persona attributes pre-paint.
592
-
593
594
  ## Rung 1 \u2014 Style (CSS only)
594
595
 
595
596
  Persona attributes on <html> (zero declaration):
package/dist/index.js CHANGED
@@ -579,16 +579,17 @@ Visit 2 converts. Integrate one rung at a time.
579
579
  ## Setup (60 seconds, no account)
580
580
 
581
581
  1. Run \`npx @sentientui/cli init\` (detects Next App/Pages, Vite, Remix, CRA; installs
582
- @sentientui/react; wraps the app; writes .env.local; scaffolds an example).
583
- 2. \`npm run dev\`, then open the app with \`?sentient_persona=buyer\` vs
582
+ @sentientui/react; writes .env.local; scaffolds an example). It does NOT edit your layout \u2014
583
+ it prints the wrap snippet for step 2.
584
+ 2. Wrap the root layout with <AdaptiveRoot apiKey context> (from '@sentientui/react/next';
585
+ other React apps use <AdaptiveProvider> from '@sentientui/react') and add
586
+ suppressHydrationWarning to <html> \u2014 an inline script sets persona attributes pre-paint.
587
+ Nothing adapts and nothing is tracked until this wrap is in place.
588
+ 3. \`npm run dev\`, then open the app with \`?sentient_persona=buyer\` vs
584
589
  \`?sentient_persona=deal_seeker\` to see it adapt. No API key needed (keyless local mode).
585
- 3. To learn from real traffic: create a project at https://sentient-ui.com and set
590
+ 4. To learn from real traffic: create a project at https://sentient-ui.com and set
586
591
  NEXT_PUBLIC_SENTIENT_API_KEY=pk_... in .env.local.
587
592
 
588
- Manual setup: wrap the root layout with <AdaptiveRoot apiKey context> (from
589
- '@sentientui/react/next'; other React apps use <AdaptiveProvider> from '@sentientui/react')
590
- and add suppressHydrationWarning to <html> \u2014 an inline script sets persona attributes pre-paint.
591
-
592
593
  ## Rung 1 \u2014 Style (CSS only)
593
594
 
594
595
  Persona attributes on <html> (zero declaration):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentientui/mcp",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "MCP server for SentientUI — exposes project data and actions to AI agents",
5
5
  "type": "module",
6
6
  "bin": {