@sentientui/mcp 0.19.0 → 0.20.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/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ApiClient,
4
4
  createMcpServer
5
- } from "./chunk-HT23NB6F.js";
5
+ } from "./chunk-35I5EJTS.js";
6
6
 
7
7
  // src/index.ts
8
8
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -83,6 +83,11 @@ async function main() {
83
83
  "SENTIENTUI_API_KEY is set but empty. Set it to a real server key (sk_\u2026), or unset it entirely to use anonymous demo mode."
84
84
  );
85
85
  }
86
+ if (apiKey && /^pk_/i.test(apiKey)) {
87
+ throw new Error(
88
+ "SENTIENTUI_API_KEY is a pk_ publishable key \u2014 that key is for the browser SDK and cannot read or manage project data. Use the project's sk_ server key (Dashboard \u2192 Settings \u2192 API keys \u2192 Server key), or connect by URL (https://api.sentient-ui.com/mcp) and sign in."
89
+ );
90
+ }
86
91
  if (!apiKey) {
87
92
  apiKey = await resolveDemoToken();
88
93
  refreshApiKey = refreshDemoToken;