@se-studio/contentful-cms 2.4.0 → 2.5.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/CHANGELOG.md +26 -0
- package/HOSTED.md +2 -2
- package/INSTALL.md +14 -136
- package/README.md +16 -40
- package/dist/bin/contentful-cms.js +2 -12
- package/dist/bin/contentful-cms.js.map +1 -1
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +10 -8
- package/dist/cli/program.js.map +1 -1
- package/dist/commands/article-tags-from-json.d.ts +4 -0
- package/dist/commands/article-tags-from-json.d.ts.map +1 -0
- package/dist/commands/article-tags-from-json.js +54 -0
- package/dist/commands/article-tags-from-json.js.map +1 -0
- package/dist/commands/bulk-rtf-replace.d.ts +4 -0
- package/dist/commands/bulk-rtf-replace.d.ts.map +1 -0
- package/dist/commands/bulk-rtf-replace.js +103 -0
- package/dist/commands/bulk-rtf-replace.js.map +1 -0
- package/dist/commands/create-person-from-json.d.ts +4 -0
- package/dist/commands/create-person-from-json.d.ts.map +1 -0
- package/dist/commands/create-person-from-json.js +85 -0
- package/dist/commands/create-person-from-json.js.map +1 -0
- package/dist/commands/create-person.d.ts +4 -0
- package/dist/commands/create-person.d.ts.map +1 -0
- package/dist/commands/create-person.js +56 -0
- package/dist/commands/create-person.js.map +1 -0
- package/dist/commands/create-taxonomy-from-json.d.ts.map +1 -1
- package/dist/commands/create-taxonomy-from-json.js +47 -31
- package/dist/commands/create-taxonomy-from-json.js.map +1 -1
- package/dist/commands/create-taxonomy.d.ts +2 -0
- package/dist/commands/create-taxonomy.d.ts.map +1 -1
- package/dist/commands/create-taxonomy.js +7 -6
- package/dist/commands/create-taxonomy.js.map +1 -1
- package/dist/commands/ensure.d.ts.map +1 -1
- package/dist/commands/ensure.js +49 -0
- package/dist/commands/ensure.js.map +1 -1
- package/dist/commands/help.js +1 -1
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/project.d.ts.map +1 -1
- package/dist/commands/project.js +35 -0
- package/dist/commands/project.js.map +1 -1
- package/dist/contentful/article-tags-from-json.d.ts +25 -0
- package/dist/contentful/article-tags-from-json.d.ts.map +1 -0
- package/dist/contentful/article-tags-from-json.js +121 -0
- package/dist/contentful/article-tags-from-json.js.map +1 -0
- package/dist/contentful/bulk-rtf-replace.d.ts +29 -0
- package/dist/contentful/bulk-rtf-replace.d.ts.map +1 -0
- package/dist/contentful/bulk-rtf-replace.js +119 -0
- package/dist/contentful/bulk-rtf-replace.js.map +1 -0
- package/dist/contentful/entry-fields.d.ts +1 -1
- package/dist/contentful/entry-fields.d.ts.map +1 -1
- package/dist/contentful/entry-fields.js +13 -0
- package/dist/contentful/entry-fields.js.map +1 -1
- package/dist/contentful/person-create.d.ts +31 -0
- package/dist/contentful/person-create.d.ts.map +1 -0
- package/dist/contentful/person-create.js +111 -0
- package/dist/contentful/person-create.js.map +1 -0
- package/dist/editor-pack/capabilities.d.ts +82 -0
- package/dist/editor-pack/capabilities.d.ts.map +1 -0
- package/dist/editor-pack/capabilities.js +350 -0
- package/dist/editor-pack/capabilities.js.map +1 -0
- package/dist/editor-pack/generate.d.ts.map +1 -1
- package/dist/editor-pack/generate.js +57 -15
- package/dist/editor-pack/generate.js.map +1 -1
- package/dist/generated/hosted-guide.d.ts +1 -1
- package/dist/generated/hosted-guide.d.ts.map +1 -1
- package/dist/generated/hosted-guide.js +1 -1
- package/dist/generated/hosted-guide.js.map +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/hosted/customer-playbooks.d.ts.map +1 -1
- package/dist/hosted/customer-playbooks.js +3 -16
- package/dist/hosted/customer-playbooks.js.map +1 -1
- package/dist/hosted/next/pages/CmsEditPage.d.ts.map +1 -1
- package/dist/hosted/next/pages/CmsEditPage.js +1 -1
- package/dist/hosted/next/pages/CmsEditPage.js.map +1 -1
- package/dist/hosted/next/pages/CustomerPlaybooksPage.d.ts.map +1 -1
- package/dist/hosted/next/pages/CustomerPlaybooksPage.js +12 -3
- package/dist/hosted/next/pages/CustomerPlaybooksPage.js.map +1 -1
- package/dist/hosted/next/pages/HomePage.d.ts.map +1 -1
- package/dist/hosted/next/pages/HomePage.js +1 -1
- package/dist/hosted/next/pages/HomePage.js.map +1 -1
- package/dist/mcp/guide.d.ts +2 -2
- package/dist/mcp/guide.d.ts.map +1 -1
- package/dist/mcp/guide.js +10 -5
- package/dist/mcp/guide.js.map +1 -1
- package/dist/mcp/prompts/onboarding.d.ts.map +1 -1
- package/dist/mcp/prompts/onboarding.js +116 -2
- package/dist/mcp/prompts/onboarding.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/project/doctor.d.ts +9 -0
- package/dist/project/doctor.d.ts.map +1 -0
- package/dist/project/doctor.js +136 -0
- package/dist/project/doctor.js.map +1 -0
- package/docs/FUNCTIONAL_SPEC.md +1 -1
- package/docs/MEDIA_INDEX_PLAN.md +1 -1
- package/docs/SKILLS.md +3 -3
- package/docs/help/article-tags-from-json.md +62 -0
- package/docs/help/bulk-rtf-replace.md +80 -0
- package/docs/help/index.md +16 -1
- package/docs/help/person-from-json.md +82 -0
- package/docs/mcp/hosted-guide.md +15 -4
- package/package.json +2 -5
- package/skills/README.md +1 -1
- package/skills/core/SKILL.md +7 -1
- package/skills/editor-tasks/SKILL.md +83 -0
- package/skills/manifest.json +2 -1
- package/skills/setup/SKILL.md +21 -87
- package/dist/bin/cms-edit-mcp.d.ts +0 -3
- package/dist/bin/cms-edit-mcp.d.ts.map +0 -1
- package/dist/bin/cms-edit-mcp.js +0 -15
- package/dist/bin/cms-edit-mcp.js.map +0 -1
- package/dist/bin/cms-edit-setup.d.ts +0 -3
- package/dist/bin/cms-edit-setup.d.ts.map +0 -1
- package/dist/bin/cms-edit-setup.js +0 -7
- package/dist/bin/cms-edit-setup.js.map +0 -1
- package/dist/setup/wizard.d.ts +0 -4
- package/dist/setup/wizard.d.ts.map +0 -1
- package/dist/setup/wizard.js +0 -260
- 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 |
|
package/docs/mcp/hosted-guide.md
CHANGED
|
@@ -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)
|
|
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
|
|
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 `
|
|
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.
|
|
3
|
+
"version": "2.5.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",
|
|
@@ -50,8 +50,6 @@
|
|
|
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": [
|
|
@@ -62,12 +60,11 @@
|
|
|
62
60
|
"*.md"
|
|
63
61
|
],
|
|
64
62
|
"dependencies": {
|
|
65
|
-
"@clack/prompts": "^1.5.1",
|
|
66
63
|
"@contentful/rich-text-types": "^17.2.7",
|
|
67
64
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
68
65
|
"commander": "^15.0.0",
|
|
69
66
|
"contentful": "^11.12.5",
|
|
70
|
-
"contentful-management": "^12.
|
|
67
|
+
"contentful-management": "^12.7.0",
|
|
71
68
|
"dotenv": "^17.4.2",
|
|
72
69
|
"jose": "^6.2.3",
|
|
73
70
|
"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).
|
package/skills/core/SKILL.md
CHANGED
|
@@ -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 |
|
package/skills/manifest.json
CHANGED
|
@@ -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
|
|
5
|
+
"setup": "Guide a user through connecting hosted cms-edit MCP for Claude (Integrations + OAuth)."
|
|
5
6
|
}
|
package/skills/setup/SKILL.md
CHANGED
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: contentful-cms-setup
|
|
3
|
-
description: "Guide a user through
|
|
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
|
|
8
|
+
Use this skill when the user wants to connect Claude to their Contentful site via **hosted cms-edit MCP**.
|
|
9
9
|
|
|
10
|
-
|
|
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`).
|
|
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
|
|
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
|
-
##
|
|
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
|
-
|
|
40
|
+
For engineering work in a site repo (Cursor, Grok, terminal):
|
|
73
41
|
|
|
74
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
**
|
|
112
|
-
→
|
|
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
|
-
|
|
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
|
-
**
|
|
126
|
-
→
|
|
59
|
+
**Connection works but wrong site**
|
|
60
|
+
→ Each connector URL is site-specific; use the URL from the project's `/cms-edit` page.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cms-edit-mcp.d.ts","sourceRoot":"","sources":["../../src/bin/cms-edit-mcp.ts"],"names":[],"mappings":""}
|
package/dist/bin/cms-edit-mcp.js
DELETED
|
@@ -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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cms-edit-setup.d.ts","sourceRoot":"","sources":["../../src/bin/cms-edit-setup.ts"],"names":[],"mappings":""}
|
|
@@ -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"}
|
package/dist/setup/wizard.d.ts
DELETED
|
@@ -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"}
|