@se-studio/contentful-cms 1.4.0 → 2.0.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.
Files changed (145) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/HOSTED.md +25 -72
  3. package/INSTALL.md +2 -2
  4. package/README.md +1 -1
  5. package/dist/cli/program.js +2 -2
  6. package/dist/cli/program.js.map +1 -1
  7. package/dist/commands/host-scaffold.d.ts +4 -0
  8. package/dist/commands/host-scaffold.d.ts.map +1 -0
  9. package/dist/commands/host-scaffold.js +73 -0
  10. package/dist/commands/host-scaffold.js.map +1 -0
  11. package/dist/commands/{mcpb-pack.d.ts → host-stage.d.ts} +2 -2
  12. package/dist/commands/host-stage.d.ts.map +1 -0
  13. package/dist/commands/host-stage.js +60 -0
  14. package/dist/commands/host-stage.js.map +1 -0
  15. package/dist/commands/host.d.ts +3 -0
  16. package/dist/commands/host.d.ts.map +1 -0
  17. package/dist/commands/host.js +9 -0
  18. package/dist/commands/host.js.map +1 -0
  19. package/dist/generated/hosted-guide.d.ts +1 -1
  20. package/dist/generated/hosted-guide.d.ts.map +1 -1
  21. package/dist/generated/hosted-guide.js +1 -1
  22. package/dist/generated/hosted-guide.js.map +1 -1
  23. package/dist/generated/version.d.ts +1 -1
  24. package/dist/generated/version.js +1 -1
  25. package/dist/hosted/index.d.ts +7 -0
  26. package/dist/hosted/index.d.ts.map +1 -1
  27. package/dist/hosted/index.js +7 -0
  28. package/dist/hosted/index.js.map +1 -1
  29. package/dist/hosted/next/claude-connect.d.ts +8 -0
  30. package/dist/hosted/next/claude-connect.d.ts.map +1 -0
  31. package/dist/hosted/next/claude-connect.js +23 -0
  32. package/dist/hosted/next/claude-connect.js.map +1 -0
  33. package/dist/hosted/next/context.d.ts +3 -0
  34. package/dist/hosted/next/context.d.ts.map +1 -0
  35. package/dist/hosted/next/context.js +11 -0
  36. package/dist/hosted/next/context.js.map +1 -0
  37. package/dist/hosted/next/editor-pack-path.d.ts +2 -0
  38. package/dist/hosted/next/editor-pack-path.d.ts.map +1 -0
  39. package/dist/hosted/next/editor-pack-path.js +6 -0
  40. package/dist/hosted/next/editor-pack-path.js.map +1 -0
  41. package/dist/hosted/next/page-styles.d.ts +6 -0
  42. package/dist/hosted/next/page-styles.d.ts.map +1 -0
  43. package/dist/hosted/next/page-styles.js +37 -0
  44. package/dist/hosted/next/page-styles.js.map +1 -0
  45. package/dist/hosted/next/pages/CmsEditPage.d.ts +2 -0
  46. package/dist/hosted/next/pages/CmsEditPage.d.ts.map +1 -0
  47. package/dist/hosted/next/pages/CmsEditPage.js +22 -0
  48. package/dist/hosted/next/pages/CmsEditPage.js.map +1 -0
  49. package/dist/hosted/next/pages/ContentfulCallbackPage.d.ts +2 -0
  50. package/dist/hosted/next/pages/ContentfulCallbackPage.d.ts.map +1 -0
  51. package/dist/hosted/next/pages/ContentfulCallbackPage.js +45 -0
  52. package/dist/hosted/next/pages/ContentfulCallbackPage.js.map +1 -0
  53. package/dist/hosted/next/pages/HomePage.d.ts +2 -0
  54. package/dist/hosted/next/pages/HomePage.d.ts.map +1 -0
  55. package/dist/hosted/next/pages/HomePage.js +36 -0
  56. package/dist/hosted/next/pages/HomePage.js.map +1 -0
  57. package/dist/hosted/next/redis.d.ts +5 -0
  58. package/dist/hosted/next/redis.d.ts.map +1 -0
  59. package/dist/hosted/next/redis.js +23 -0
  60. package/dist/hosted/next/redis.js.map +1 -0
  61. package/dist/hosted/next/routes/connect.d.ts +2 -0
  62. package/dist/hosted/next/routes/connect.d.ts.map +1 -0
  63. package/dist/hosted/next/routes/connect.js +19 -0
  64. package/dist/hosted/next/routes/connect.js.map +1 -0
  65. package/dist/hosted/next/routes/health.d.ts +2 -0
  66. package/dist/hosted/next/routes/health.d.ts.map +1 -0
  67. package/dist/hosted/next/routes/health.js +51 -0
  68. package/dist/hosted/next/routes/health.js.map +1 -0
  69. package/dist/hosted/next/routes/link-contentful.d.ts +2 -0
  70. package/dist/hosted/next/routes/link-contentful.d.ts.map +1 -0
  71. package/dist/hosted/next/routes/link-contentful.js +6 -0
  72. package/dist/hosted/next/routes/link-contentful.js.map +1 -0
  73. package/dist/hosted/next/routes/mcp.d.ts +4 -0
  74. package/dist/hosted/next/routes/mcp.d.ts.map +1 -0
  75. package/dist/hosted/next/routes/mcp.js +52 -0
  76. package/dist/hosted/next/routes/mcp.js.map +1 -0
  77. package/dist/hosted/next/routes/oauth-authorization-server.d.ts +2 -0
  78. package/dist/hosted/next/routes/oauth-authorization-server.d.ts.map +1 -0
  79. package/dist/hosted/next/routes/oauth-authorization-server.js +5 -0
  80. package/dist/hosted/next/routes/oauth-authorization-server.js.map +1 -0
  81. package/dist/hosted/next/routes/oauth-authorize.d.ts +2 -0
  82. package/dist/hosted/next/routes/oauth-authorize.d.ts.map +1 -0
  83. package/dist/hosted/next/routes/oauth-authorize.js +6 -0
  84. package/dist/hosted/next/routes/oauth-authorize.js.map +1 -0
  85. package/dist/hosted/next/routes/oauth-protected-resource.d.ts +2 -0
  86. package/dist/hosted/next/routes/oauth-protected-resource.d.ts.map +1 -0
  87. package/dist/hosted/next/routes/oauth-protected-resource.js +5 -0
  88. package/dist/hosted/next/routes/oauth-protected-resource.js.map +1 -0
  89. package/dist/hosted/next/routes/oauth-register.d.ts +2 -0
  90. package/dist/hosted/next/routes/oauth-register.d.ts.map +1 -0
  91. package/dist/hosted/next/routes/oauth-register.js +6 -0
  92. package/dist/hosted/next/routes/oauth-register.js.map +1 -0
  93. package/dist/hosted/next/routes/oauth-token.d.ts +2 -0
  94. package/dist/hosted/next/routes/oauth-token.d.ts.map +1 -0
  95. package/dist/hosted/next/routes/oauth-token.js +6 -0
  96. package/dist/hosted/next/routes/oauth-token.js.map +1 -0
  97. package/dist/hosted/next/stage-site.d.ts +11 -0
  98. package/dist/hosted/next/stage-site.d.ts.map +1 -0
  99. package/dist/hosted/next/stage-site.js +49 -0
  100. package/dist/hosted/next/stage-site.js.map +1 -0
  101. package/dist/hosted/oauth/auth.d.ts +11 -0
  102. package/dist/hosted/oauth/auth.d.ts.map +1 -0
  103. package/dist/hosted/oauth/auth.js +41 -0
  104. package/dist/hosted/oauth/auth.js.map +1 -0
  105. package/dist/hosted/oauth/complete.d.ts +13 -0
  106. package/dist/hosted/oauth/complete.d.ts.map +1 -0
  107. package/dist/hosted/oauth/complete.js +40 -0
  108. package/dist/hosted/oauth/complete.js.map +1 -0
  109. package/dist/hosted/oauth/config.d.ts +7 -0
  110. package/dist/hosted/oauth/config.d.ts.map +1 -0
  111. package/dist/hosted/oauth/config.js +33 -0
  112. package/dist/hosted/oauth/config.js.map +1 -0
  113. package/dist/hosted/oauth/handlers.d.ts +18 -0
  114. package/dist/hosted/oauth/handlers.d.ts.map +1 -0
  115. package/dist/hosted/oauth/handlers.js +212 -0
  116. package/dist/hosted/oauth/handlers.js.map +1 -0
  117. package/dist/hosted/oauth/jwt.d.ts +9 -0
  118. package/dist/hosted/oauth/jwt.d.ts.map +1 -0
  119. package/dist/hosted/oauth/jwt.js +31 -0
  120. package/dist/hosted/oauth/jwt.js.map +1 -0
  121. package/dist/hosted/oauth/pkce.d.ts +3 -0
  122. package/dist/hosted/oauth/pkce.d.ts.map +1 -0
  123. package/dist/hosted/oauth/pkce.js +9 -0
  124. package/dist/hosted/oauth/pkce.js.map +1 -0
  125. package/dist/hosted/oauth/store.d.ts +35 -0
  126. package/dist/hosted/oauth/store.d.ts.map +1 -0
  127. package/dist/hosted/oauth/store.js +70 -0
  128. package/dist/hosted/oauth/store.js.map +1 -0
  129. package/dist/mcp/guide.js +5 -5
  130. package/dist/mcp/guide.js.map +1 -1
  131. package/dist/mcp/prompts/onboarding.js +1 -1
  132. package/dist/mcp/tools/cms-edit.d.ts +1 -1
  133. package/dist/mcp/tools/cms-edit.d.ts.map +1 -1
  134. package/dist/mcp/tools/cms-edit.js +2 -2
  135. package/dist/mcp/tools/cms-edit.js.map +1 -1
  136. package/dist/project/types.d.ts +0 -8
  137. package/dist/project/types.d.ts.map +1 -1
  138. package/dist/project/types.js +0 -8
  139. package/dist/project/types.js.map +1 -1
  140. package/docs/mcp/hosted-guide.md +5 -5
  141. package/package.json +34 -6
  142. package/skills/setup/SKILL.md +12 -15
  143. package/dist/commands/mcpb-pack.d.ts.map +0 -1
  144. package/dist/commands/mcpb-pack.js +0 -60
  145. package/dist/commands/mcpb-pack.js.map +0 -1
@@ -0,0 +1,9 @@
1
+ import { createHash, randomBytes } from 'node:crypto';
2
+ export function generateAuthCode() {
3
+ return randomBytes(32).toString('base64url');
4
+ }
5
+ export function verifyPkce(codeVerifier, codeChallenge) {
6
+ const digest = createHash('sha256').update(codeVerifier).digest('base64url');
7
+ return digest === codeChallenge;
8
+ }
9
+ //# sourceMappingURL=pkce.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pkce.js","sourceRoot":"","sources":["../../../src/hosted/oauth/pkce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,UAAU,gBAAgB;IAC9B,OAAO,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,YAAoB,EAAE,aAAqB;IACpE,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC7E,OAAO,MAAM,KAAK,aAAa,CAAC;AAClC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { RedisClient } from '../../session/session-store.js';
2
+ export interface OAuthClientRegistration {
3
+ clientId: string;
4
+ redirectUris: string[];
5
+ clientName?: string;
6
+ }
7
+ export interface PendingAuthRequest {
8
+ clientId: string;
9
+ redirectUri: string;
10
+ codeChallenge: string;
11
+ state?: string;
12
+ resource: string;
13
+ }
14
+ export interface AuthCodeRecord {
15
+ authRequestId: string;
16
+ sub: string;
17
+ }
18
+ export declare function contentfulTokenKey(sub: string): string;
19
+ export interface OAuthStore {
20
+ registerOAuthClient(input: {
21
+ redirectUris: string[];
22
+ clientName?: string;
23
+ }): Promise<OAuthClientRegistration>;
24
+ getOAuthClient(clientId: string): Promise<OAuthClientRegistration | null>;
25
+ savePendingAuthRequest(request: PendingAuthRequest): Promise<{
26
+ authRequestId: string;
27
+ }>;
28
+ getPendingAuthRequest(authRequestId: string): Promise<PendingAuthRequest | null>;
29
+ saveAuthCode(code: string, record: AuthCodeRecord): Promise<void>;
30
+ consumeAuthCode(code: string): Promise<AuthCodeRecord | null>;
31
+ storeContentfulToken(sub: string, token: string): Promise<void>;
32
+ getContentfulToken(sub: string): Promise<string | null>;
33
+ }
34
+ export declare function createOAuthStore(redis: RedisClient): OAuthStore;
35
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/hosted/oauth/store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAMlE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,MAAM,WAAW,UAAU;IACzB,mBAAmB,CAAC,KAAK,EAAE;QACzB,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACrC,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;IAC1E,sBAAsB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxF,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IACjF,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC9D,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACzD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,CAiE/D"}
@@ -0,0 +1,70 @@
1
+ import { randomUUID } from 'node:crypto';
2
+ const AUTH_REQUEST_TTL_SECONDS = 600;
3
+ const AUTH_CODE_TTL_SECONDS = 120;
4
+ const CONTENTFUL_TOKEN_TTL_SECONDS = 7 * 24 * 60 * 60;
5
+ export function contentfulTokenKey(sub) {
6
+ return `cms-edit:oauth:user:${sub}:contentful_token`;
7
+ }
8
+ export function createOAuthStore(redis) {
9
+ return {
10
+ async registerOAuthClient(input) {
11
+ const clientId = randomUUID();
12
+ const record = {
13
+ clientId,
14
+ redirectUris: input.redirectUris,
15
+ clientName: input.clientName,
16
+ };
17
+ await redis.set(`cms-edit:oauth:client:${clientId}`, JSON.stringify(record));
18
+ return record;
19
+ },
20
+ async getOAuthClient(clientId) {
21
+ const raw = await redis.get(`cms-edit:oauth:client:${clientId}`);
22
+ if (!raw)
23
+ return null;
24
+ if (typeof raw === 'string') {
25
+ return JSON.parse(raw);
26
+ }
27
+ return raw;
28
+ },
29
+ async savePendingAuthRequest(request) {
30
+ const authRequestId = randomUUID();
31
+ await redis.set(`cms-edit:oauth:request:${authRequestId}`, JSON.stringify(request), {
32
+ ex: AUTH_REQUEST_TTL_SECONDS,
33
+ });
34
+ return { authRequestId };
35
+ },
36
+ async getPendingAuthRequest(authRequestId) {
37
+ const raw = await redis.get(`cms-edit:oauth:request:${authRequestId}`);
38
+ if (!raw)
39
+ return null;
40
+ if (typeof raw === 'string') {
41
+ return JSON.parse(raw);
42
+ }
43
+ return raw;
44
+ },
45
+ async saveAuthCode(code, record) {
46
+ await redis.set(`cms-edit:oauth:code:${code}`, JSON.stringify(record), {
47
+ ex: AUTH_CODE_TTL_SECONDS,
48
+ });
49
+ },
50
+ async consumeAuthCode(code) {
51
+ const key = `cms-edit:oauth:code:${code}`;
52
+ const raw = await redis.get(key);
53
+ if (!raw)
54
+ return null;
55
+ await redis.del(key);
56
+ if (typeof raw === 'string') {
57
+ return JSON.parse(raw);
58
+ }
59
+ return raw;
60
+ },
61
+ async storeContentfulToken(sub, token) {
62
+ await redis.set(contentfulTokenKey(sub), token, { ex: CONTENTFUL_TOKEN_TTL_SECONDS });
63
+ },
64
+ async getContentfulToken(sub) {
65
+ const token = await redis.get(contentfulTokenKey(sub));
66
+ return typeof token === 'string' ? token : null;
67
+ },
68
+ };
69
+ }
70
+ //# sourceMappingURL=store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/hosted/oauth/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AACrC,MAAM,qBAAqB,GAAG,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C,CAAC,CAAC;YACvD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QAClD,CAAC;KACF,CAAC;AACJ,CAAC"}
package/dist/mcp/guide.js CHANGED
@@ -26,7 +26,7 @@ const TOPIC_HEADINGS = {
26
26
  workflow: '## Core workflow',
27
27
  commands: '## Command reference (cms_edit args)',
28
28
  troubleshooting: '## Troubleshooting',
29
- hosted: '## Hosted extension rules',
29
+ hosted: '## Hosted connector rules',
30
30
  };
31
31
  export function loadHostedGuideTemplate() {
32
32
  return HOSTED_GUIDE_TEMPLATE;
@@ -35,7 +35,7 @@ function buildSiteIntro(hosted) {
35
35
  if (hosted) {
36
36
  const siteName = hosted.displayName ?? hosted.projectKey;
37
37
  return (`This deployment is configured for **${siteName}** (project key \`${hosted.projectKey}\`). ` +
38
- 'You are using the hosted Claude Desktop extension — no local config files or `--space` flag needed.');
38
+ 'You are using the hosted Claude Integrations connector — no local config files or `--space` flag needed.');
39
39
  }
40
40
  return ('You are using local stdio MCP. Multi-space setups may use `--space <name>` when multiple spaces ' +
41
41
  'are configured in `.contentful-cms.json`.');
@@ -43,12 +43,12 @@ function buildSiteIntro(hosted) {
43
43
  function buildHostedRules(hosted) {
44
44
  if (hosted) {
45
45
  return ('- **Do not pass `--space`** — this deployment is already bound to one Contentful space.\n' +
46
- '- Your Contentful personal access token is sent on each request; edits appear under your name.\n' +
47
- '- Redeploy the hosted server to pick up cms-edit updates; no `.mcpb` reinstall needed for tool changes.');
46
+ '- You sign in with Contentful OAuth; edits appear under your name.\n' +
47
+ '- Redeploy the hosted server to pick up cms-edit updates; editors do not reconnect for tool changes.');
48
48
  }
49
49
  return ('- Use `--space <name>` only when your config defines multiple spaces.\n' +
50
50
  '- Ensure `.contentful-cms.json` exists and your management token is configured.\n' +
51
- '- For hosted editors, use the `.mcpb` extension instead of local config.');
51
+ '- For hosted editors, use Claude Integrations (OAuth) instead of local config.');
52
52
  }
53
53
  export function buildGuideMarkdown(hosted) {
54
54
  const exampleSlug = hosted?.exampleSlugs?.[1] ?? DEFAULT_EXAMPLE_SLUGS[1] ?? '/pricing';
@@ -1 +1 @@
1
- {"version":3,"file":"guide.js","sourceRoot":"","sources":["../../src/mcp/guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAUrE,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,UAAU;IACV,UAAU;IACV,UAAU;IACV,iBAAiB;IACjB,QAAQ;CACT,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAErD,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,iBAAiB;IACjB,kBAAkB;IAClB,oBAAoB;IACpB,qBAAqB;IACrB,sBAAsB;IACtB,0BAA0B;IAC1B,mBAAmB;CACX,CAAC;AAEX,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,WAAW,EAAE,kBAAkB;IAC/B,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;IAChC,QAAQ,EAAE,eAAe;CACjB,CAAC;AAEX,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AAEhD,MAAM,cAAc,GAAoD;IACtE,QAAQ,EAAE,kBAAkB;IAC5B,QAAQ,EAAE,sCAAsC;IAChD,eAAe,EAAE,oBAAoB;IACrC,MAAM,EAAE,2BAA2B;CACpC,CAAC;AAEF,MAAM,UAAU,uBAAuB;IACrC,OAAO,qBAAqB,CAAC;AAC/B,CAAC;AAED,SAAS,cAAc,CAAC,MAAsB;IAC5C,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,UAAU,CAAC;QACzD,OAAO,CACL,uCAAuC,QAAQ,qBAAqB,MAAM,CAAC,UAAU,OAAO;YAC5F,qGAAqG,CACtG,CAAC;IACJ,CAAC;IACD,OAAO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"}
@@ -5,7 +5,7 @@ function hostedNote(hosted) {
5
5
  }
6
6
  const siteName = hosted.displayName ?? hosted.projectKey;
7
7
  return (`Hosted deployment for ${siteName}. Do NOT pass --space in cms_edit args — ` +
8
- 'this extension is already bound to one Contentful space.');
8
+ 'this connector is already bound to one Contentful space.');
9
9
  }
10
10
  export function registerOnboardingPrompts(server, hosted) {
11
11
  const note = hostedNote(hosted);
@@ -1,6 +1,6 @@
1
1
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import type { RunCmsEditFn } from '../types.js';
3
- export declare const TOOL_DESCRIPTION = "Run any cms-edit command. cms-edit edits Contentful draft content (no publishing).\n\nUse cms_edit_version (no args) to check the installed version.\nUse cms_edit_help to read the getting-started guide by topic.\nRead the cms-edit://guide resource for the full guide.\n\nWorkflow: open \u2192 snapshot \u2192 read/set/rtf/add/remove \u2192 diff \u2192 save\nAll saves create drafts only \u2014 a human must publish in Contentful.\n\nCommon command sequences:\n [\"open\", \"--page-slug\", \"/\"] \u2014 homepage (CMS slug index; /index is equivalent)\n [\"open\", \"--page-slug\", \"/pricing\"] \u2014 load a page by slug\n [\"open\", \"--id\", \"<entry-id>\"] \u2014 load by Contentful entry ID\n [\"snapshot\"] \u2014 print content tree with @refs\n [\"read\", \"@c0\"] \u2014 read all fields of a component (requires open session)\n [\"read\", \"@c0\", \"heading\"] \u2014 read a specific field (requires open session)\n [\"read\", \"@root\"] \u2014 read root entry fields (requires open session)\n [\"read\", \"<entry-id>\", \"--id\"] \u2014 read entry by ID (no session)\n [\"read\", \"<entry-id>\", \"--id\", \"heading\"] \u2014 read one field by entry ID (no session)\n [\"peek\", \"--page-slug\", \"/pricing\"] \u2014 preview tree + root fields (no session)\n [\"peek\", \"--id\", \"<entry-id>\"] \u2014 preview by entry ID with rootFields in JSON\n [\"set\", \"@c0\", \"heading\", \"New heading\"] \u2014 set a scalar field\n [\"rtf\", \"@c0\", \"body\", \"--content\", \"# H1\\n\\nBody.\"] \u2014 set rich text (preferred for AI)\n [\"rtf\", \"@c0\", \"body\", \"--base64\", \"<encoded>\"] \u2014 set rich text via base64 (no filesystem)\n [\"diff\"] \u2014 show pending changes\n [\"save\"] \u2014 write drafts to Contentful\n [\"discard\"] \u2014 discard unsaved changes\n [\"links\", \"set\", \"@c0\", \"0\", \"variant\", \"link\"] \u2014 set scalar field on link at index 0\n [\"batch\", \"set\", \"<entry-id>:variant=link\"] \u2014 queue scalar edit by entry ID\n [\"batch\", \"diff\"] \u2014 show pending batch edits\n [\"batch\", \"save\"] \u2014 save all batch edits as drafts\n [\"health\"] \u2014 verify config and connectivity\n [\"diagnose\"] \u2014 session/MCP diagnostics (store, userId, active session)\n [\"version\"] \u2014 print installed cms-edit version\n [\"guide\"] \u2014 print getting-started guide\n [\"guide\", \"workflow\"] \u2014 print a guide section\n [\"list\", \"--type\", \"article\", \"--sort\", \"date\", \"-n\", \"10\"] \u2014 recent articles by publication date\n [\"sitemap\", \"--include\", \"article\", \"--status\", \"draft\"] \u2014 find draft articles\n [\"peek\", \"--article-slug\", \"<slug>\"] \u2014 preview draft or published article (CMA)\n\nDiscovery notes:\n peek/open/read --id load draft content via CMA \u2014 NOT published-only.\n Only list --published / resolve --published use the published-only Delivery API index.\n Articles: use --article-slug (not --page-slug). search --type article sorts by publication date.\n\nSessions persist between MCP calls (Redis on hosted, disk locally). MCP auto-uses session \"_mcp\" unless you pass --session.\nUse --session <name> before the subcommand to isolate concurrent workflows, e.g. [\"--session\", \"my-work\", \"open\", \"/\"].\nUse --space <name> to target a specific Contentful space (local MCP only \u2014 omit for hosted .mcpb extensions).\nStateless read (no open required): [\"read\", \"<entry-id>\", \"--id\"] or [\"read\", \"<entry-id>\", \"--id\", \"heading\"].\npeek is one-shot (no session): use [\"peek\", \"--page-slug\", \"<slug>\"] or [\"peek\", \"--id\", \"<entry-id>\"]. Includes rootFields in JSON \u2014 no follow-up read required.\nOutput is always JSON (CMS_EDIT_JSON=1 is forced by the MCP server).\n\nRich text tips:\n --content \"<markdown>\" preferred named flag for inline content (any length)\n --base64 \"<encoded>\" fully environment-agnostic, no filesystem needed\n --file \"<abs-path>\" platform-native absolute path required (C:\\\\Users\\\\... on Windows)\n stdin (\"-\") not supported via MCP";
3
+ export declare const TOOL_DESCRIPTION = "Run any cms-edit command. cms-edit edits Contentful draft content (no publishing).\n\nUse cms_edit_version (no args) to check the installed version.\nUse cms_edit_help to read the getting-started guide by topic.\nRead the cms-edit://guide resource for the full guide.\n\nWorkflow: open \u2192 snapshot \u2192 read/set/rtf/add/remove \u2192 diff \u2192 save\nAll saves create drafts only \u2014 a human must publish in Contentful.\n\nCommon command sequences:\n [\"open\", \"--page-slug\", \"/\"] \u2014 homepage (CMS slug index; /index is equivalent)\n [\"open\", \"--page-slug\", \"/pricing\"] \u2014 load a page by slug\n [\"open\", \"--id\", \"<entry-id>\"] \u2014 load by Contentful entry ID\n [\"snapshot\"] \u2014 print content tree with @refs\n [\"read\", \"@c0\"] \u2014 read all fields of a component (requires open session)\n [\"read\", \"@c0\", \"heading\"] \u2014 read a specific field (requires open session)\n [\"read\", \"@root\"] \u2014 read root entry fields (requires open session)\n [\"read\", \"<entry-id>\", \"--id\"] \u2014 read entry by ID (no session)\n [\"read\", \"<entry-id>\", \"--id\", \"heading\"] \u2014 read one field by entry ID (no session)\n [\"peek\", \"--page-slug\", \"/pricing\"] \u2014 preview tree + root fields (no session)\n [\"peek\", \"--id\", \"<entry-id>\"] \u2014 preview by entry ID with rootFields in JSON\n [\"set\", \"@c0\", \"heading\", \"New heading\"] \u2014 set a scalar field\n [\"rtf\", \"@c0\", \"body\", \"--content\", \"# H1\\n\\nBody.\"] \u2014 set rich text (preferred for AI)\n [\"rtf\", \"@c0\", \"body\", \"--base64\", \"<encoded>\"] \u2014 set rich text via base64 (no filesystem)\n [\"diff\"] \u2014 show pending changes\n [\"save\"] \u2014 write drafts to Contentful\n [\"discard\"] \u2014 discard unsaved changes\n [\"links\", \"set\", \"@c0\", \"0\", \"variant\", \"link\"] \u2014 set scalar field on link at index 0\n [\"batch\", \"set\", \"<entry-id>:variant=link\"] \u2014 queue scalar edit by entry ID\n [\"batch\", \"diff\"] \u2014 show pending batch edits\n [\"batch\", \"save\"] \u2014 save all batch edits as drafts\n [\"health\"] \u2014 verify config and connectivity\n [\"diagnose\"] \u2014 session/MCP diagnostics (store, userId, active session)\n [\"version\"] \u2014 print installed cms-edit version\n [\"guide\"] \u2014 print getting-started guide\n [\"guide\", \"workflow\"] \u2014 print a guide section\n [\"list\", \"--type\", \"article\", \"--sort\", \"date\", \"-n\", \"10\"] \u2014 recent articles by publication date\n [\"sitemap\", \"--include\", \"article\", \"--status\", \"draft\"] \u2014 find draft articles\n [\"peek\", \"--article-slug\", \"<slug>\"] \u2014 preview draft or published article (CMA)\n\nDiscovery notes:\n peek/open/read --id load draft content via CMA \u2014 NOT published-only.\n Only list --published / resolve --published use the published-only Delivery API index.\n Articles: use --article-slug (not --page-slug). search --type article sorts by publication date.\n\nSessions persist between MCP calls (Redis on hosted, disk locally). MCP auto-uses session \"_mcp\" unless you pass --session.\nUse --session <name> before the subcommand to isolate concurrent workflows, e.g. [\"--session\", \"my-work\", \"open\", \"/\"].\nUse --space <name> to target a specific Contentful space (local MCP only \u2014 omit for hosted Integrations).\nStateless read (no open required): [\"read\", \"<entry-id>\", \"--id\"] or [\"read\", \"<entry-id>\", \"--id\", \"heading\"].\npeek is one-shot (no session): use [\"peek\", \"--page-slug\", \"<slug>\"] or [\"peek\", \"--id\", \"<entry-id>\"]. Includes rootFields in JSON \u2014 no follow-up read required.\nOutput is always JSON (CMS_EDIT_JSON=1 is forced by the MCP server).\n\nRich text tips:\n --content \"<markdown>\" preferred named flag for inline content (any length)\n --base64 \"<encoded>\" fully environment-agnostic, no filesystem needed\n --file \"<abs-path>\" platform-native absolute path required (C:\\\\Users\\\\... on Windows)\n stdin (\"-\") not supported via MCP";
4
4
  export declare function registerCmsEditTools(server: McpServer, runCmsEdit: RunCmsEditFn): void;
5
5
  export declare function getMcpServerInfo(): {
6
6
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"cms-edit.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/cms-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,gBAAgB,y3JAwDoB,CAAC;AAElD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,GAAG,IAAI,CA8BtF;AAED,wBAAgB,gBAAgB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAEpE"}
1
+ {"version":3,"file":"cms-edit.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/cms-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,gBAAgB,q3JAwDoB,CAAC;AAElD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,GAAG,IAAI,CA8BtF;AAED,wBAAgB,gBAAgB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAEpE"}
@@ -49,7 +49,7 @@ Discovery notes:
49
49
 
50
50
  Sessions persist between MCP calls (Redis on hosted, disk locally). MCP auto-uses session "_mcp" unless you pass --session.
51
51
  Use --session <name> before the subcommand to isolate concurrent workflows, e.g. ["--session", "my-work", "open", "/"].
52
- Use --space <name> to target a specific Contentful space (local MCP only — omit for hosted .mcpb extensions).
52
+ Use --space <name> to target a specific Contentful space (local MCP only — omit for hosted Integrations).
53
53
  Stateless read (no open required): ["read", "<entry-id>", "--id"] or ["read", "<entry-id>", "--id", "heading"].
54
54
  peek is one-shot (no session): use ["peek", "--page-slug", "<slug>"] or ["peek", "--id", "<entry-id>"]. Includes rootFields in JSON — no follow-up read required.
55
55
  Output is always JSON (CMS_EDIT_JSON=1 is forced by the MCP server).
@@ -69,7 +69,7 @@ export function registerCmsEditTools(server, runCmsEdit) {
69
69
  server.tool('cms_edit', TOOL_DESCRIPTION, {
70
70
  args: z
71
71
  .array(z.string())
72
- .describe('CLI arguments to pass to cms-edit, e.g. ["open", "/pricing"] or ["snapshot"] or ["read", "@c1"]. Do not pass --space when using a hosted .mcpb extension.'),
72
+ .describe('CLI arguments to pass to cms-edit, e.g. ["open", "/pricing"] or ["snapshot"] or ["read", "@c1"]. Do not pass --space when using a hosted Integration.'),
73
73
  }, async ({ args }) => {
74
74
  const normalizedArgs = withMcpSession(args);
75
75
  sessionLogVerbose('cms_edit tool call', { rawArgs: args, normalizedArgs });
@@ -1 +1 @@
1
- {"version":3,"file":"cms-edit.js","sourceRoot":"","sources":["../../../src/mcp/tools/cms-edit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAwDiB,CAAC;AAElD,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,UAAwB;IAC9E,MAAM,CAAC,IAAI,CACT,kBAAkB,EAClB,+FAA+F,EAC/F,EAAE,EACF,KAAK,IAAI,EAAE;QACT,MAAM,IAAI,GAAG,cAAc,EAAE,CAAC;QAC9B,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,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;AAElD,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,UAAwB;IAC9E,MAAM,CAAC,IAAI,CACT,kBAAkB,EAClB,+FAA+F,EAC/F,EAAE,EACF,KAAK,IAAI,EAAE;QACT,MAAM,IAAI,GAAG,cAAc,EAAE,CAAC;QAC9B,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC,EAAE,CAAC;SAClF,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,UAAU,EACV,gBAAgB,EAChB;QACE,IAAI,EAAE,CAAC;aACJ,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,QAAQ,CACP,uJAAuJ,CACxJ;KACJ,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACjB,MAAM,cAAc,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;QAC5C,iBAAiB,CAAC,oBAAoB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;QAC3E,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,cAAc,CAAC,CAAC;QAC9C,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACxD,CAAC,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;AACzD,CAAC"}
@@ -19,12 +19,4 @@ export declare const CmsEditProjectSchema: z.ZodObject<{
19
19
  }, z.core.$strip>;
20
20
  }, z.core.$strip>;
21
21
  export type CmsEditProject = z.infer<typeof CmsEditProjectSchema>;
22
- /** Legacy mcpb customer config shape (se-core-product/mcpb/customers/*.json). */
23
- export interface McpbCustomerConfig {
24
- projectKey: string;
25
- displayName: string;
26
- mcpUrl: string;
27
- description: string;
28
- }
29
- export declare function toMcpbCustomerConfig(project: CmsEditProject): McpbCustomerConfig;
30
22
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/project/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;iBAsB/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,iFAAiF;AACjF,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,kBAAkB,CAOhF"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/project/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;iBAsB/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -22,12 +22,4 @@ export const CmsEditProjectSchema = z.object({
22
22
  mcpUrl: z.string().url(),
23
23
  }),
24
24
  });
25
- export function toMcpbCustomerConfig(project) {
26
- return {
27
- projectKey: project.projectKey,
28
- displayName: project.displayName,
29
- mcpUrl: project.hosted.mcpUrl,
30
- description: project.description,
31
- };
32
- }
33
25
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/project/types.ts"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kB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QAChD,kFAAkF;QAClF,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;KAC3C,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;KACzB,CAAC;CACH,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  # cms-edit MCP guide
2
2
 
3
- Use this guide when editing Contentful draft content through Claude Desktop (hosted `.mcpb` extension) or local stdio MCP.
3
+ Use this guide when editing Contentful draft content through Claude Desktop (hosted Integrations + OAuth) or local stdio MCP.
4
4
 
5
5
  {{SITE_INTRO}}
6
6
 
@@ -148,7 +148,7 @@ Asset search and media-by-filename list **require** the index. Template/taxonomy
148
148
  ["search", "pricing"]
149
149
  ```
150
150
 
151
- ## Hosted extension rules
151
+ ## Hosted connector rules
152
152
 
153
153
  {{HOSTED_RULES}}
154
154
 
@@ -177,10 +177,10 @@ Asset search and media-by-filename list **require** the index. Template/taxonomy
177
177
 
178
178
  | Problem | What to do |
179
179
  |---------|------------|
180
- | **401 / invalid token** | Regenerate CMA token in Contentful; update token in Claude Desktop → Settings → Extensions |
181
- | **No cms_edit tool** | Quit Claude fully and reopen; confirm extension is enabled |
180
+ | **401 / connection failed** | Claude → Settings → Integrations → Connect again; complete Contentful sign-in |
181
+ | **No cms_edit tool** | Confirm the integration is connected under Settings → Integrations |
182
182
  | **No active session** | Do not pass `--space` on hosted. Check `/api/health` — `redis` must be ok. MCP uses `_mcp` session automatically. Manual session: `["--session", "name", "open", "--page-slug", "/"]`. Fallback: `["read", "<entry-id>", "--id"]` |
183
- | **Wrong space** | Token must belong to this deployment's Contentful space |
183
+ | **Wrong space** | Your Contentful account must have access to this deployment's space |
184
184
  | **Check version** | Call `cms_edit_version` or `curl /api/health` and read `cmsEdit` |
185
185
 
186
186
  ## Articles
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/contentful-cms",
3
- "version": "1.4.0",
3
+ "version": "2.0.0",
4
4
  "description": "CLI tool for AI agents to read and edit Contentful draft content without publish permissions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,6 +22,30 @@
22
22
  "./hosted": {
23
23
  "types": "./dist/hosted/index.d.ts",
24
24
  "import": "./dist/hosted/index.js"
25
+ },
26
+ "./hosted/next/*": {
27
+ "types": "./dist/hosted/next/*.d.ts",
28
+ "import": "./dist/hosted/next/*.js"
29
+ }
30
+ },
31
+ "peerDependencies": {
32
+ "@upstash/redis": ">=1.38.0",
33
+ "next": ">=15.0.0",
34
+ "react": ">=19.0.0",
35
+ "react-dom": ">=19.0.0"
36
+ },
37
+ "peerDependenciesMeta": {
38
+ "@upstash/redis": {
39
+ "optional": false
40
+ },
41
+ "next": {
42
+ "optional": true
43
+ },
44
+ "react": {
45
+ "optional": true
46
+ },
47
+ "react-dom": {
48
+ "optional": true
25
49
  }
26
50
  },
27
51
  "bin": {
@@ -45,14 +69,19 @@
45
69
  "contentful": "^11.12.4",
46
70
  "contentful-management": "^12.5.1",
47
71
  "dotenv": "^17.4.2",
72
+ "jose": "^6.2.3",
48
73
  "picocolors": "^1.1.1",
49
74
  "zod": "^4.4.3"
50
75
  },
51
76
  "devDependencies": {
52
- "@anthropic-ai/mcpb": "^2.1.2",
53
77
  "@biomejs/biome": "^2.4.16",
54
- "@types/node": "^24.13.1",
55
- "esbuild": "^0.28.0",
78
+ "@types/node": "^24.13.2",
79
+ "@types/react": "^19.2.17",
80
+ "@types/react-dom": "^19.2.3",
81
+ "@upstash/redis": "^1.38.0",
82
+ "next": "^15.5.19",
83
+ "react": "^19.2.7",
84
+ "react-dom": "^19.2.7",
56
85
  "typescript": "^6.0.3",
57
86
  "vitest": "^4.1.8"
58
87
  },
@@ -72,11 +101,10 @@
72
101
  "generate:embeds": "node scripts/generate-embedded-assets.mjs",
73
102
  "sync:skills": "node scripts/sync-cms-edit-skills.mjs",
74
103
  "build": "node scripts/generate-embedded-assets.mjs && node scripts/sync-cms-edit-skills.mjs && tsc --project tsconfig.build.json",
75
- "build:mcpb-bridge": "esbuild mcpb/bridge/index.ts --bundle --platform=node --target=node20 --format=esm --packages=bundle --outfile=mcpb/.pack/bridge/index.js",
76
104
  "dev": "node scripts/generate-embedded-assets.mjs && node scripts/sync-cms-edit-skills.mjs && tsc --project tsconfig.build.json --watch",
77
105
  "type-check": "node scripts/generate-embedded-assets.mjs && tsc --noEmit",
78
106
  "lint": "biome lint .",
79
- "clean": "rm -rf dist src/generated .turbo *.tsbuildinfo mcpb/.pack mcpb/dist",
107
+ "clean": "rm -rf dist src/generated .turbo *.tsbuildinfo",
80
108
  "test": "node scripts/generate-embedded-assets.mjs && node scripts/sync-cms-edit-skills.mjs && vitest run"
81
109
  }
82
110
  }
@@ -11,35 +11,32 @@ Use this skill when the user wants to install or configure the `cms-edit` MCP se
11
11
 
12
12
  | Path | When to use |
13
13
  |------|-------------|
14
- | **Hosted (`.mcpb`)** | User is a content editor; SE sent a `.mcpb` file; no Node.js |
14
+ | **Hosted (Integrations)** | Content editor; SE sent an onboarding URL (e.g. `/cms-edit`); no Node.js |
15
15
  | **Local (setup wizard)** | Developer; multi-space; or no hosted deployment |
16
16
 
17
17
  Ask which applies if unclear.
18
18
 
19
19
  ---
20
20
 
21
- ## Hosted setup (`.mcpb` extension)
21
+ ## Hosted setup (Claude Integrations + OAuth)
22
22
 
23
- Use when the user has a **`.mcpb` file** from SE (e.g. `cms-edit-om1.mcpb`). Do **not** run the setup wizard.
23
+ Use when SE sent an **onboarding link** (e.g. `https://your-site.content.se.studio/cms-edit`). Do **not** run the setup wizard.
24
24
 
25
- ### Step 1: Get a Contentful token
25
+ ### Step 1: Connect to Claude
26
26
 
27
- Same as local — tell the user to create a **personal access token** in Contentful (Settings → CMA tokens), name it `Claude Desktop`, and copy it.
27
+ 1. Open the link SE sent (or **Connect to Claude** on `/cms-edit`)
28
+ 2. Confirm the connector in Claude Desktop or claude.ai
29
+ 3. Sign in with **Contentful** when prompted (same account SE invited to the space)
28
30
 
29
- ### Step 2: Install the extension
30
-
31
- 1. Open [Claude Desktop](https://claude.ai/download)
32
- 2. **Settings → Extensions → Install Extension…** (or double-click the `.mcpb` file)
33
- 3. Paste the Contentful token when prompted
34
- 4. Fully quit and reopen Claude Desktop
31
+ Manual alternative: Claude → **Customize → Connectors** → Add custom connector → paste the MCP URL (`…/api/mcp`) → Connect.
35
32
 
36
33
  Full editor guide: `packages/contentful-cms/HOSTED.md`
37
34
 
38
- ### Step 3: Verify
35
+ ### Step 2: Verify
39
36
 
40
- In Claude, ask to list pages or open the homepage. If `cms_edit` returns content, setup is complete.
37
+ In Claude, ask to read the cms-edit guide or verify the connection. If `cms_edit` returns content, setup is complete.
41
38
 
42
- **Token update:** Settings → Extensions → open the cms-edit extension → update token.
39
+ **Reconnect:** Settings → Integrations → Connect again if the connection stops working.
43
40
 
44
41
  ---
45
42
 
@@ -126,4 +123,4 @@ If it returns a page structure, setup is complete. If it errors, see Troubleshoo
126
123
  It should contain an `mcpServers.cms-edit` entry. If missing, run the wizard again.
127
124
 
128
125
  **Adding another space**
129
- → Run `npx @se-studio/contentful-cms@latest setup` again — it merges the new space into the existing config.
126
+ → Run `npx @se-studio/contentful-cms@latest setup` again — it merges the new space into the existing config.
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcpb-pack.d.ts","sourceRoot":"","sources":["../../src/commands/mcpb-pack.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAOvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAuDjE"}
@@ -1,60 +0,0 @@
1
- /** biome-ignore-all lint/suspicious/noConsole: Console output is intentional in CLI */
2
- import * as child_process from 'node:child_process';
3
- import * as fs from 'node:fs';
4
- import * as os from 'node:os';
5
- import * as path from 'node:path';
6
- import { fileURLToPath } from 'node:url';
7
- import { isJsonMode } from '../output/mode.js';
8
- import { loadProjectConfig } from '../project/load.js';
9
- import { toMcpbCustomerConfig } from '../project/types.js';
10
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
11
- const PACKAGE_ROOT = path.resolve(__dirname, '..', '..');
12
- const MCPB_DIR = path.join(PACKAGE_ROOT, 'mcpb');
13
- const BUILD_SCRIPT = path.resolve(PACKAGE_ROOT, '..', '..', 'scripts', 'build-cms-edit-mcpb.sh');
14
- export function registerMcpbPackCommand(program) {
15
- const cmd = program.command('mcpb').description('Build Claude Desktop cms-edit extensions');
16
- cmd
17
- .command('pack')
18
- .description('Build a .mcpb extension from cms-edit/<site>/project.json')
19
- .requiredOption('--project-config <path>', 'Path to cms-edit/<site>/project.json')
20
- .option('--output <path>', 'Output .mcpb path')
21
- .action((opts) => {
22
- const project = loadProjectConfig(opts.projectConfig);
23
- const customer = toMcpbCustomerConfig(project);
24
- const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cms-edit-mcpb-'));
25
- const tempConfig = path.join(tempDir, `${project.projectKey}.json`);
26
- fs.writeFileSync(tempConfig, `${JSON.stringify(customer, null, 2)}\n`);
27
- try {
28
- if (!fs.existsSync(BUILD_SCRIPT)) {
29
- throw new Error(`mcpb build script not found: ${BUILD_SCRIPT}`);
30
- }
31
- const args = ['--config', tempConfig];
32
- if (opts.output) {
33
- args.push('--output', path.resolve(opts.output));
34
- }
35
- const result = child_process.spawnSync('bash', [BUILD_SCRIPT, ...args], {
36
- cwd: path.resolve(PACKAGE_ROOT, '..', '..'),
37
- stdio: 'inherit',
38
- env: {
39
- ...process.env,
40
- CMS_EDIT_CUSTOMER_CONFIG: tempConfig,
41
- },
42
- });
43
- if (result.status !== 0) {
44
- throw new Error('mcpb pack failed');
45
- }
46
- const defaultOutput = path.join(MCPB_DIR, 'dist', `cms-edit-${project.projectKey}.mcpb`);
47
- const outputPath = opts.output ? path.resolve(opts.output) : defaultOutput;
48
- if (isJsonMode()) {
49
- console.log(JSON.stringify({ ok: true, output: outputPath, projectKey: project.projectKey }));
50
- return;
51
- }
52
- console.log(`Built extension: ${outputPath}`);
53
- }
54
- finally {
55
- fs.rmSync(tempDir, { recursive: true, force: true });
56
- }
57
- });
58
- return cmd;
59
- }
60
- //# sourceMappingURL=mcpb-pack.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcpb-pack.js","sourceRoot":"","sources":["../../src/commands/mcpb-pack.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAEvF,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACzD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AACjD,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,wBAAwB,CAAC,CAAC;AAEjG,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,MAAM,GAAG,GAAG,OAA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