@se-studio/contentful-cms 2.4.0 → 2.5.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.
Files changed (136) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/HOSTED.md +2 -2
  3. package/INSTALL.md +14 -136
  4. package/README.md +16 -40
  5. package/dist/bin/contentful-cms.js +2 -12
  6. package/dist/bin/contentful-cms.js.map +1 -1
  7. package/dist/cli/program.d.ts.map +1 -1
  8. package/dist/cli/program.js +10 -8
  9. package/dist/cli/program.js.map +1 -1
  10. package/dist/commands/article-tags-from-json.d.ts +4 -0
  11. package/dist/commands/article-tags-from-json.d.ts.map +1 -0
  12. package/dist/commands/article-tags-from-json.js +54 -0
  13. package/dist/commands/article-tags-from-json.js.map +1 -0
  14. package/dist/commands/bulk-rtf-replace.d.ts +4 -0
  15. package/dist/commands/bulk-rtf-replace.d.ts.map +1 -0
  16. package/dist/commands/bulk-rtf-replace.js +103 -0
  17. package/dist/commands/bulk-rtf-replace.js.map +1 -0
  18. package/dist/commands/create-person-from-json.d.ts +4 -0
  19. package/dist/commands/create-person-from-json.d.ts.map +1 -0
  20. package/dist/commands/create-person-from-json.js +85 -0
  21. package/dist/commands/create-person-from-json.js.map +1 -0
  22. package/dist/commands/create-person.d.ts +4 -0
  23. package/dist/commands/create-person.d.ts.map +1 -0
  24. package/dist/commands/create-person.js +56 -0
  25. package/dist/commands/create-person.js.map +1 -0
  26. package/dist/commands/create-taxonomy-from-json.d.ts.map +1 -1
  27. package/dist/commands/create-taxonomy-from-json.js +47 -31
  28. package/dist/commands/create-taxonomy-from-json.js.map +1 -1
  29. package/dist/commands/create-taxonomy.d.ts +2 -0
  30. package/dist/commands/create-taxonomy.d.ts.map +1 -1
  31. package/dist/commands/create-taxonomy.js +7 -6
  32. package/dist/commands/create-taxonomy.js.map +1 -1
  33. package/dist/commands/ensure.d.ts.map +1 -1
  34. package/dist/commands/ensure.js +49 -0
  35. package/dist/commands/ensure.js.map +1 -1
  36. package/dist/commands/help.js +1 -1
  37. package/dist/commands/help.js.map +1 -1
  38. package/dist/commands/project.d.ts.map +1 -1
  39. package/dist/commands/project.js +35 -0
  40. package/dist/commands/project.js.map +1 -1
  41. package/dist/contentful/article-tags-from-json.d.ts +25 -0
  42. package/dist/contentful/article-tags-from-json.d.ts.map +1 -0
  43. package/dist/contentful/article-tags-from-json.js +121 -0
  44. package/dist/contentful/article-tags-from-json.js.map +1 -0
  45. package/dist/contentful/bulk-rtf-replace.d.ts +29 -0
  46. package/dist/contentful/bulk-rtf-replace.d.ts.map +1 -0
  47. package/dist/contentful/bulk-rtf-replace.js +119 -0
  48. package/dist/contentful/bulk-rtf-replace.js.map +1 -0
  49. package/dist/contentful/entry-fields.d.ts +1 -1
  50. package/dist/contentful/entry-fields.d.ts.map +1 -1
  51. package/dist/contentful/entry-fields.js +13 -0
  52. package/dist/contentful/entry-fields.js.map +1 -1
  53. package/dist/contentful/person-create.d.ts +31 -0
  54. package/dist/contentful/person-create.d.ts.map +1 -0
  55. package/dist/contentful/person-create.js +111 -0
  56. package/dist/contentful/person-create.js.map +1 -0
  57. package/dist/editor-pack/capabilities.d.ts +82 -0
  58. package/dist/editor-pack/capabilities.d.ts.map +1 -0
  59. package/dist/editor-pack/capabilities.js +350 -0
  60. package/dist/editor-pack/capabilities.js.map +1 -0
  61. package/dist/editor-pack/generate.d.ts.map +1 -1
  62. package/dist/editor-pack/generate.js +57 -15
  63. package/dist/editor-pack/generate.js.map +1 -1
  64. package/dist/generated/hosted-guide.d.ts +1 -1
  65. package/dist/generated/hosted-guide.d.ts.map +1 -1
  66. package/dist/generated/hosted-guide.js +1 -1
  67. package/dist/generated/hosted-guide.js.map +1 -1
  68. package/dist/generated/version.d.ts +1 -1
  69. package/dist/generated/version.js +1 -1
  70. package/dist/hosted/customer-playbooks.d.ts.map +1 -1
  71. package/dist/hosted/customer-playbooks.js +3 -16
  72. package/dist/hosted/customer-playbooks.js.map +1 -1
  73. package/dist/hosted/next/pages/CmsEditPage.d.ts.map +1 -1
  74. package/dist/hosted/next/pages/CmsEditPage.js +1 -1
  75. package/dist/hosted/next/pages/CmsEditPage.js.map +1 -1
  76. package/dist/hosted/next/pages/CustomerPlaybooksPage.d.ts.map +1 -1
  77. package/dist/hosted/next/pages/CustomerPlaybooksPage.js +12 -3
  78. package/dist/hosted/next/pages/CustomerPlaybooksPage.js.map +1 -1
  79. package/dist/hosted/next/pages/HomePage.d.ts.map +1 -1
  80. package/dist/hosted/next/pages/HomePage.js +1 -1
  81. package/dist/hosted/next/pages/HomePage.js.map +1 -1
  82. package/dist/mcp/guide.d.ts +2 -2
  83. package/dist/mcp/guide.d.ts.map +1 -1
  84. package/dist/mcp/guide.js +10 -5
  85. package/dist/mcp/guide.js.map +1 -1
  86. package/dist/mcp/prompts/onboarding.d.ts.map +1 -1
  87. package/dist/mcp/prompts/onboarding.js +116 -2
  88. package/dist/mcp/prompts/onboarding.js.map +1 -1
  89. package/dist/mcp/server.d.ts +1 -1
  90. package/dist/mcp/server.d.ts.map +1 -1
  91. package/dist/project/doctor.d.ts +9 -0
  92. package/dist/project/doctor.d.ts.map +1 -0
  93. package/dist/project/doctor.js +136 -0
  94. package/dist/project/doctor.js.map +1 -0
  95. package/docs/FUNCTIONAL_SPEC.md +1 -1
  96. package/docs/MEDIA_INDEX_PLAN.md +1 -1
  97. package/docs/SKILLS.md +3 -3
  98. package/docs/editor-tasks/article-tags.md +47 -0
  99. package/docs/editor-tasks/authors-import.md +53 -0
  100. package/docs/editor-tasks/bulk-find-replace.md +52 -0
  101. package/docs/editor-tasks/clone-page.md +39 -0
  102. package/docs/editor-tasks/create-article.md +46 -0
  103. package/docs/editor-tasks/create-from-document.md +45 -0
  104. package/docs/editor-tasks/create-page.md +41 -0
  105. package/docs/editor-tasks/edit-rich-text.md +44 -0
  106. package/docs/editor-tasks/edit-scalar-fields.md +47 -0
  107. package/docs/editor-tasks/featured-images.md +46 -0
  108. package/docs/editor-tasks/media-reuse-and-upload.md +51 -0
  109. package/docs/editor-tasks/navigation.md +39 -0
  110. package/docs/editor-tasks/preview-verify.md +38 -0
  111. package/docs/editor-tasks/publish-handoff.md +36 -0
  112. package/docs/editor-tasks/seo-descriptions.md +48 -0
  113. package/docs/editor-tasks/taxonomy.md +51 -0
  114. package/docs/help/article-tags-from-json.md +62 -0
  115. package/docs/help/bulk-rtf-replace.md +80 -0
  116. package/docs/help/index.md +16 -1
  117. package/docs/help/person-from-json.md +82 -0
  118. package/docs/mcp/hosted-guide.md +15 -4
  119. package/package.json +3 -5
  120. package/skills/README.md +1 -1
  121. package/skills/core/SKILL.md +7 -1
  122. package/skills/editor-tasks/SKILL.md +83 -0
  123. package/skills/manifest.json +2 -1
  124. package/skills/setup/SKILL.md +21 -87
  125. package/dist/bin/cms-edit-mcp.d.ts +0 -3
  126. package/dist/bin/cms-edit-mcp.d.ts.map +0 -1
  127. package/dist/bin/cms-edit-mcp.js +0 -15
  128. package/dist/bin/cms-edit-mcp.js.map +0 -1
  129. package/dist/bin/cms-edit-setup.d.ts +0 -3
  130. package/dist/bin/cms-edit-setup.d.ts.map +0 -1
  131. package/dist/bin/cms-edit-setup.js +0 -7
  132. package/dist/bin/cms-edit-setup.js.map +0 -1
  133. package/dist/setup/wizard.d.ts +0 -4
  134. package/dist/setup/wizard.d.ts.map +0 -1
  135. package/dist/setup/wizard.js +0 -260
  136. package/dist/setup/wizard.js.map +0 -1
@@ -0,0 +1,82 @@
1
+ # cms-edit create person-from-json — Batch Author Import
2
+
3
+ `create person-from-json` creates multiple `person` entries from a single JSON file. Use it for spreadsheet-to-CMS author imports and team directory bootstraps.
4
+
5
+ ```bash
6
+ cms-edit create person-from-json --file authors.json --dry-run
7
+ cms-edit create person-from-json --file authors.json --if-not-exists
8
+ ```
9
+
10
+ All entries are created as **drafts**. Nothing is published automatically.
11
+
12
+ **Not transactional:** If the command fails partway through, entries created earlier remain in the space. Re-run with `--if-not-exists` to continue idempotently.
13
+
14
+ ---
15
+
16
+ ## JSON schema
17
+
18
+ ```jsonc
19
+ {
20
+ "persons": [
21
+ {
22
+ "slug": "jane-smith",
23
+ "name": "Jane Smith",
24
+ "jobTitle": "Chief Medical Officer",
25
+ "description": "Short card blurb",
26
+ "emailAddress": "jane@example.com",
27
+ "phoneNumber": "+1 555 0100",
28
+ "bioMarkdown": "## Bio\n\nMarkdown converted to Rich Text.",
29
+ "fields": {
30
+ "location": "Boston"
31
+ }
32
+ }
33
+ ]
34
+ }
35
+ ```
36
+
37
+ | Key | Required | Description |
38
+ |---|---|---|
39
+ | `slug` | Yes | URL slug |
40
+ | `name` | Yes | Display name |
41
+ | `cmsLabel` | No | CMS label (defaults to `name`) |
42
+ | `jobTitle` | No | Job title (CLI flags override JSON `fields` on single-entry create) |
43
+ | `description` | No | Short description |
44
+ | `emailAddress` | No | Email |
45
+ | `phoneNumber` | No | Phone |
46
+ | `bioMarkdown` | No | Bio as Markdown (converted to Rich Text `bio` field) |
47
+ | `fields` | No | Additional Contentful field values |
48
+
49
+ You can also pass a full Rich Text document on `bio` inside `fields` instead of `bioMarkdown`.
50
+
51
+ ---
52
+
53
+ ## Single-entry alternative
54
+
55
+ ```bash
56
+ cms-edit create person --slug jane-smith --name "Jane Smith" --job-title "CMO" --bio-file bio.md
57
+ cms-edit ensure person --slug jane-smith --name "Jane Smith"
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Link authors to articles
63
+
64
+ After import, link person IDs to articles in a session:
65
+
66
+ ```bash
67
+ cms-edit open --article-slug blog/my-post
68
+ cms-edit set @p0 authors <personId1>,<personId2> --links
69
+ cms-edit diff && cms-edit save
70
+ ```
71
+
72
+ Or batch-link in a `cms-edit run` ops file.
73
+
74
+ ---
75
+
76
+ ## Related commands
77
+
78
+ | Command | Purpose |
79
+ |---|---|
80
+ | `cms-edit create person` | Create one person |
81
+ | `cms-edit ensure person` | Idempotent single create |
82
+ | `cms-edit help fields` | Field overview |
@@ -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 Integrations + OAuth) or local stdio MCP.
3
+ Use this guide when editing Contentful draft content through Claude Desktop (hosted Integrations + OAuth).
4
4
 
5
5
  {{SITE_INTRO}}
6
6
 
@@ -10,10 +10,11 @@ cms-edit **cannot and will not**:
10
10
 
11
11
  - Publish or unpublish entries
12
12
  - Archive or delete published entries
13
- - Upload new assets (use Contentful UI for assets)
14
13
 
15
14
  All `save` operations create **drafts only**. A human must review and publish in Contentful.
16
15
 
16
+ **Assets:** cms-edit **can upload** draft assets (`asset upload` from file, URL, or base64). Always **search and reuse existing assets first** (`index sync`, then `asset search` or `list --type media`). Use `--if-exists-by-filename` when uploading to avoid duplicates.
17
+
17
18
  ## MCP tools
18
19
 
19
20
  | Tool | Purpose |
@@ -29,15 +30,20 @@ When a site editor pack is deployed, these MCP resources provide **site-specific
29
30
  | Resource | Purpose |
30
31
  |----------|---------|
31
32
  | `cms-edit://customer/index` | List of all customer resources |
33
+ | `cms-edit://customer/tasks-index` | Intent → task playbook map (filtered for this site) |
34
+ | `cms-edit://customer/capabilities` | Machine-readable list of what this site supports |
35
+ | `cms-edit://customer/checklist` | First-session onboarding steps |
32
36
  | `cms-edit://customer/overview` | Site name, space, staging URL, handoff rules |
33
37
  | `cms-edit://customer/routing` | Article/tag URL rules for this site |
34
38
  | `cms-edit://customer/components-index` | Component types and when to use each |
35
39
  | `cms-edit://customer/collections-index` | Collection types |
36
40
  | `cms-edit://customer/brand` | Brand voice and terminology (if configured) |
37
41
  | `cms-edit://customer/articles` | Article/publication playbook (if configured) |
38
- | `cms-edit://customer/defaults` | Featured image rules, article types, Contentful UI scope (if configured) |
42
+ | `cms-edit://customer/defaults` | Featured image rules and article types (if configured) |
43
+ | `cms-edit://customer/site-facts` | Optional canonical business facts (if configured) |
44
+ | `cms-edit://customer/task-*` | Capability playbooks (e.g. `task-media-reuse-and-upload`) |
39
45
 
40
- **Workflow:** read `cms-edit://customer/index` → `overview` → `routing` → `defaults` (if present) → `components-index` → `articles` (if creating articles) → then use `cms_edit` commands.
46
+ **Workflow:** read `tasks-index` → `capabilities` → `checklist` → `overview` → `routing` → pick a `task-*` playbook for your goal → `components-index` → then use `cms_edit` commands.
41
47
 
42
48
  ## MCP prompts
43
49
 
@@ -53,6 +59,11 @@ When a site editor pack is deployed, these MCP resources provide **site-specific
53
59
  | `cms_edit_create_from_doc` | Create a page from a freeform document (infer → confirm → dry-run) |
54
60
  | `cms_edit_create_article_from_doc` | Create an article from a freeform document |
55
61
  | `cms_edit_taxonomy` | Import or ensure taxonomy entries |
62
+ | `cms_edit_bulk_seo` | Update SEO meta descriptions (read `task-seo-descriptions`) |
63
+ | `cms_edit_bulk_find_replace` | Bulk find-replace in rich text across entries |
64
+ | `cms_edit_bulk_article_tags` | Update tags on one or more articles |
65
+ | `cms_edit_import_authors` | Create person/author entries from a list or sheet |
66
+ | `cms_edit_media` | Find existing assets or upload new ones (reuse-first) |
56
67
 
57
68
  Read the full guide anytime via the `cms-edit://guide` resource or `cms_edit_help`.
58
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/contentful-cms",
3
- "version": "2.4.0",
3
+ "version": "2.5.1",
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",
@@ -50,24 +50,22 @@
50
50
  },
51
51
  "bin": {
52
52
  "cms-edit": "./dist/bin/cms-edit.js",
53
- "cms-edit-mcp": "./dist/bin/cms-edit-mcp.js",
54
- "cms-edit-setup": "./dist/bin/cms-edit-setup.js",
55
53
  "contentful-cms": "./dist/bin/contentful-cms.js"
56
54
  },
57
55
  "files": [
58
56
  "dist",
57
+ "docs/editor-tasks",
59
58
  "docs/help",
60
59
  "docs/mcp",
61
60
  "skills",
62
61
  "*.md"
63
62
  ],
64
63
  "dependencies": {
65
- "@clack/prompts": "^1.5.1",
66
64
  "@contentful/rich-text-types": "^17.2.7",
67
65
  "@modelcontextprotocol/sdk": "^1.29.0",
68
66
  "commander": "^15.0.0",
69
67
  "contentful": "^11.12.5",
70
- "contentful-management": "^12.6.0",
68
+ "contentful-management": "^12.7.0",
71
69
  "dotenv": "^17.4.2",
72
70
  "jose": "^6.2.3",
73
71
  "picocolors": "^1.1.1",
package/skills/README.md CHANGED
@@ -17,7 +17,7 @@ pnpm --filter @se-studio/contentful-cms build
17
17
  | What | Where |
18
18
  |------|--------|
19
19
  | **Edit skill content** | `packages/skills/skills/contentful-cms-*/SKILL.md` |
20
- | **Bundled subset for npm** | This directory (`core`, `templates`, `setup`) via `scripts/sync-cms-edit-skills.mjs` |
20
+ | **Bundled subset for npm** | This directory (`core`, `editor-tasks`, `templates`, `setup`) via `scripts/sync-cms-edit-skills.mjs` |
21
21
  | **Install into a project** | `cms-edit skill install` → `.agents/skills/contentful-cms-<name>/` |
22
22
 
23
23
  Full monorepo skill sync (all marketing-site + CMS skills): `pnpm skills:sync` → `.agents/skills/` (gitignored).
@@ -7,6 +7,8 @@ description: "Use cms-edit CLI to read/edit Contentful content (open → snapsho
7
7
 
8
8
  Use this skill when you need to read or edit content in Contentful CMS using the `cms-edit` CLI tool.
9
9
 
10
+ **Before editing:** use skill **`contentful-cms-editor-tasks`** to read `tasks-index` and the matching capability playbook for this site (hosted MCP or local `cms-edit/<site>/editor-pack/`).
11
+
10
12
  ## Overview
11
13
 
12
14
  `cms-edit` lets you read and edit Contentful draft content without publishing. It uses a **snapshot → ref → edit → save** workflow:
@@ -24,10 +26,14 @@ Use this skill when you need to read or edit content in Contentful CMS using the
24
26
  - Publish any entry
25
27
  - Unpublish any entry
26
28
  - Archive or delete published entries
27
- - Upload new assets
28
29
 
29
30
  All `save` operations create **draft** versions. A human must review and publish in Contentful.
30
31
 
32
+ **Assets:** Upload **is** supported (`asset upload`). Default workflow: **search and reuse** existing assets first (`index sync` → `asset search`). When uploading:
33
+ - Use a **sensible fileName** and **descriptive title** (and alt text where the site uses it)
34
+ - Avoid oversized images — width over **2000px** is usually wasteful for web (exact limits vary by project; check `asset audit` / media review guidance)
35
+ - Prefer `--if-exists-by-filename` to avoid duplicates
36
+
31
37
  ## Prerequisites
32
38
 
33
39
  - `.contentful-cms.json` must exist in the project root (or ancestor directory)
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: contentful-cms-editor-tasks
3
+ description: "Route CMS editing intents to site task playbooks via tasks-index (hosted MCP resources or local editor-pack files)."
4
+ ---
5
+
6
+ # Skill: cms-edit editor tasks
7
+
8
+ Use this skill **before any Contentful edit** to pick the right capability playbook for the user's goal. Do not improvise workflows — read the site brain first.
9
+
10
+ ## Pit-of-success order
11
+
12
+ 1. **tasks-index** — which tasks apply on this site
13
+ 2. **capabilities** — what content types and bulk mechanisms exist
14
+ 3. **checklist** — pre-flight checks
15
+ 4. **overview** + **routing** — site rules and URL shapes
16
+ 5. **task-*** playbook — steps, confirmation gates, out-of-scope
17
+ 6. **components-index** — when creating or editing page content
18
+
19
+ ## Hosted (Claude Integrations + OAuth)
20
+
21
+ Claude cannot read `cms-edit://customer/*` URIs directly — use the MCP tools:
22
+
23
+ ```text
24
+ cms_edit ["customer", "tasks-index"]
25
+ cms_edit ["customer", "capabilities"]
26
+ cms_edit ["customer", "checklist"]
27
+ cms_edit ["customer", "task-create-article"] # example — pick from tasks-index
28
+ ```
29
+
30
+ Or `cms_edit_customer` with resource `tasks-index`, then the `task-*` name from the index.
31
+
32
+ **Never pass `--space`** on hosted MCP — the deployment is already bound to one site.
33
+
34
+ After connect, verify with: `Read the cms-edit guide and tasks-index`.
35
+
36
+ ## Local (Cursor / Grok / Codex / CLI)
37
+
38
+ Read committed files in the customer repo (paths vary by layout):
39
+
40
+ | Layout | Editor pack |
41
+ |--------|-------------|
42
+ | Single-site | `cms-edit/editor-pack/` |
43
+ | Multi-site | `cms-edit/<site>/editor-pack/` |
44
+
45
+ Minimum reads:
46
+
47
+ - `capabilities.json`
48
+ - `tasks-index.md`
49
+ - `checklist.md`
50
+ - Matching `task-*.md` for the user's intent
51
+
52
+ Then use **`contentful-cms-core`** for `cms-edit` CLI commands.
53
+
54
+ ## Confirmation gates (all tasks)
55
+
56
+ Capability playbooks require:
57
+
58
+ 1. **Propose** scope to the user — wait for approval
59
+ 2. **Dry-run** when available (`--dry-run`, `bulk-rtf-replace --dry-run`, etc.)
60
+ 3. **`diff`** before every `save`
61
+ 4. **Summarize** what changed; remind that publish is manual in Contentful
62
+
63
+ ## Media default
64
+
65
+ **Search and reuse assets first** (`index sync` → `asset search`). Upload only when no match; use `--if-exists-by-filename` when uploading.
66
+
67
+ ## When the pack is stale
68
+
69
+ Run `contentful-cms-regenerate-editor-pack` after:
70
+
71
+ - New component/collection registrations
72
+ - `docs/cms-guidelines/**` changes
73
+ - `constants.ts` routing changes
74
+
75
+ Then `cms-edit project doctor --project-config cms-edit/<site>/project.json`.
76
+
77
+ ## Related skills
78
+
79
+ | Skill | When |
80
+ |-------|------|
81
+ | `contentful-cms-core` | CLI command reference |
82
+ | `contentful-cms-setup` | First-time hosted MCP connect |
83
+ | `contentful-cms-regenerate-editor-pack` | Refresh editor-pack in git |
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "core": "Use cms-edit CLI to read/edit Contentful content (open → snapshot → read → set/rtf → diff → save).",
3
+ "editor-tasks": "Route CMS editing intents to site task playbooks via tasks-index (hosted MCP resources or local editor-pack files).",
3
4
  "templates": "Create or edit templates (preContent, postContent, menu, footer, colours) in Contentful via cms-edit.",
4
- "setup": "Guide a user through installing and configuring the cms-edit MCP server for Claude Desktop."
5
+ "setup": "Guide a user through connecting hosted cms-edit MCP for Claude (Integrations + OAuth)."
5
6
  }
@@ -1,26 +1,19 @@
1
1
  ---
2
2
  name: contentful-cms-setup
3
- description: "Guide a user through installing and configuring the cms-edit MCP server for Claude Desktop."
3
+ description: "Guide a user through connecting hosted cms-edit MCP for Claude (Integrations + OAuth)."
4
4
  ---
5
5
 
6
6
  # Skill: cms-edit Setup
7
7
 
8
- Use this skill when the user wants to install or configure the `cms-edit` MCP server so Claude Desktop can read and edit Contentful content.
8
+ Use this skill when the user wants to connect Claude to their Contentful site via **hosted cms-edit MCP**.
9
9
 
10
- ## Choose the setup path first
11
-
12
- | Path | When to use |
13
- |------|-------------|
14
- | **Hosted (Integrations)** | Content editor; SE sent an onboarding URL (e.g. `/cms-edit`); no Node.js |
15
- | **Local (setup wizard)** | Developer; multi-space; or no hosted deployment |
16
-
17
- Ask which applies if unclear.
10
+ Local stdio MCP and the setup wizard are **not supported**. Editors connect through the site's `/cms-edit` onboarding flow.
18
11
 
19
12
  ---
20
13
 
21
14
  ## Hosted setup (Claude Integrations + OAuth)
22
15
 
23
- Use when SE sent an **onboarding link** (e.g. `https://your-site.content.se.studio/cms-edit`). Do **not** run the setup wizard.
16
+ Use when SE sent an **onboarding link** (e.g. `https://your-site.content.se.studio/cms-edit`).
24
17
 
25
18
  ### Step 1: Connect to Claude
26
19
 
@@ -34,93 +27,34 @@ Full editor guide: `packages/contentful-cms/HOSTED.md`
34
27
 
35
28
  ### Step 2: Verify
36
29
 
37
- In Claude, ask to read the cms-edit guide or verify the connection. If `cms_edit` returns content, setup is complete.
30
+ In Claude, ask to read the cms-edit guide and **tasks-index**, then verify the connection. If `cms_edit` returns content, setup is complete.
31
+
32
+ Use skill **`contentful-cms-editor-tasks`** for the tasks-index → capability playbook workflow.
38
33
 
39
34
  **Reconnect:** Settings → Integrations → Connect again if the connection stops working.
40
35
 
41
36
  ---
42
37
 
43
- ## Local setup (setup wizard)
44
-
45
- ## Overview
46
-
47
- The setup wizard handles everything automatically:
48
- - Collects the Contentful Management Token
49
- - Discovers spaces and environments via the Contentful API
50
- - Writes `~/.contentful-cms.json`
51
- - Updates the Claude Desktop config to register the `cms-edit` MCP server
52
-
53
- ## Prerequisites
54
-
55
- The user needs:
56
- 1. **Node.js** installed (LTS version from [nodejs.org](https://nodejs.org))
57
- 2. **A Contentful Management Token** — see Step 1 below
58
-
59
- ## Step 1: Get a Management Token
60
-
61
- Tell the user:
62
-
63
- > To get your Contentful Management Token:
64
- > 1. Log in to [contentful.com](https://app.contentful.com)
65
- > 2. Go to **Settings → API keys**
66
- > 3. Click the **Content management tokens** tab
67
- > 4. Click **Generate personal token**, name it `Claude Desktop`, and click **Generate**
68
- > 5. Copy the token — you won't see it again
69
-
70
- Ask them to confirm they have the token before continuing.
38
+ ## Developers (CLI + skills, not local MCP)
71
39
 
72
- ## Step 2: Run the Setup Wizard
40
+ For engineering work in a site repo (Cursor, Grok, terminal):
73
41
 
74
- Tell the user to open a terminal and run:
42
+ 1. Configure `.contentful-cms.json` in the project (or `~/.contentful-cms.json`) with space credentials
43
+ 2. Run `npx skills add @se-studio/skills` or `pnpm skills:sync` in the monorepo
44
+ 3. Optionally `cms-edit skill install` for bundled cms-edit skills
45
+ 4. Read `cms-edit/<site>/editor-pack/tasks-index.md` before editing content
75
46
 
76
- ```bash
77
- npx @se-studio/contentful-cms@latest setup
78
- ```
47
+ Do **not** register a local `mcpServers.cms-edit` entry in Claude Desktop — use the hosted connector URL instead.
79
48
 
80
- Walk them through what each prompt means:
81
-
82
- | Prompt | What to enter |
83
- |--------|--------------|
84
- | **Contentful Management Token** | The token they just copied (input will be hidden) |
85
- | **Which Contentful space?** | Only appears if the token has multiple spaces — pick the one they want to connect |
86
- | **Which environment?** | Auto-selects `master`; only asks if no `master` environment exists |
87
- | **Short name for this project** | A slug like `my-project` or `om1` — used as the key in the config file |
88
- | **Staging site URL** | Optional — their Vercel preview URL (e.g. `https://my-project.vercel.app`) |
89
- | **Vercel bypass token** | Optional — only if their staging site has deployment protection |
90
-
91
- ## Step 3: Restart Claude Desktop
92
-
93
- After the wizard completes, tell the user:
94
-
95
- > Fully quit Claude Desktop and reopen it.
96
- > - **Mac:** Right-click the Dock icon → **Quit** (closing the window isn't enough)
97
- > - **Windows/Linux:** Close and reopen from the Start menu
98
-
99
- ## Step 4: Verify
100
-
101
- Once they've reopened Claude Desktop, verify the setup worked by using the `cms_edit` tool:
102
-
103
- ```
104
- cms_edit ["open", "/"]
105
- ```
106
-
107
- If it returns a page structure, setup is complete. If it errors, see Troubleshooting below.
49
+ ---
108
50
 
109
51
  ## Troubleshooting
110
52
 
111
- **"Invalid management token"**
112
- → The token may have been copied incorrectly or already expired. Generate a new one in Contentful and run the wizard again.
113
-
114
- **"No spaces found"**
115
- → The token doesn't have access to any spaces. Check Contentful's token permissions — it needs at least read access to one space.
116
-
117
- **`cms_edit` tool not available after restart**
118
- → Check the Claude Desktop config was written correctly:
119
- - Mac: `~/Library/Application Support/Claude/claude_desktop_config.json`
120
- - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
121
- - Linux: `~/.config/Claude/claude_desktop_config.json`
53
+ **OAuth / sign-in fails**
54
+ → Confirm the user was invited to the Contentful space and is signing in with the correct account.
122
55
 
123
- It should contain an `mcpServers.cms-edit` entry. If missing, run the wizard again.
56
+ **`cms_edit` tool not available**
57
+ → Reconnect via `/cms-edit` or Claude Integrations. Remove any legacy local MCP or `.mcpb` extension entries.
124
58
 
125
- **Adding another space**
126
- → Run `npx @se-studio/contentful-cms@latest setup` again — it merges the new space into the existing config.
59
+ **Connection works but wrong site**
60
+ → Each connector URL is site-specific; use the URL from the project's `/cms-edit` page.
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=cms-edit-mcp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cms-edit-mcp.d.ts","sourceRoot":"","sources":["../../src/bin/cms-edit-mcp.ts"],"names":[],"mappings":""}
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env node
2
- import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
- import { createMcpServer } from '../mcp/server.js';
4
- const server = createMcpServer();
5
- const transport = new StdioServerTransport();
6
- await server.connect(transport);
7
- process.on('SIGINT', async () => {
8
- await server.close();
9
- process.exit(0);
10
- });
11
- process.on('SIGTERM', async () => {
12
- await server.close();
13
- process.exit(0);
14
- });
15
- //# sourceMappingURL=cms-edit-mcp.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cms-edit-mcp.js","sourceRoot":"","sources":["../../src/bin/cms-edit-mcp.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;AACjC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAEhC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC9B,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IAC/B,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=cms-edit-setup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cms-edit-setup.d.ts","sourceRoot":"","sources":["../../src/bin/cms-edit-setup.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runSetupWizard } from '../setup/wizard.js';
3
- runSetupWizard().catch((err) => {
4
- console.error(err instanceof Error ? err.message : String(err));
5
- process.exit(1);
6
- });
7
- //# sourceMappingURL=cms-edit-setup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cms-edit-setup.js","sourceRoot":"","sources":["../../src/bin/cms-edit-setup.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,cAAc,EAAE,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IACtC,OAAO,CAAC,KAAK,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- /** biome-ignore-all lint/suspicious/noConsole: Console output is intentional in CLI */
3
- export declare function runSetupWizard(): Promise<void>;
4
- //# sourceMappingURL=wizard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wizard.d.ts","sourceRoot":"","sources":["../../src/setup/wizard.ts"],"names":[],"mappings":";AACA,uFAAuF;AAyIvF,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CA4LpD"}