@goodfellow-cms/mcp 0.5.0 → 0.6.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/README.md +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/stdio.js +9 -5
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Work on a [Goodfellow](https://goodfellow-cms.github.io/goodfellow-cms/) site from Claude. An [MCP](https://modelcontextprotocol.io) server with Goodfellow's tools: Claude reads a site's pages, items and settings, sees what blocks it has, makes changes in a draft, takes screenshots, and publishes the draft or submits it for review.
|
|
4
4
|
|
|
5
|
-
See [Work with Claude](https://goodfellow-cms.github.io/goodfellow-cms/docs/claude) for setting it up. This package runs the tools on your own computer, signed in with a GitHub or
|
|
5
|
+
See [Work with Claude](https://goodfellow-cms.github.io/goodfellow-cms/docs/claude) for setting it up. This package runs the tools on your own computer, signed in with a GitHub, GitLab or Bitbucket token that stays there.
|
|
6
6
|
|
|
7
7
|
## Claude Code
|
|
8
8
|
|
package/dist/index.d.ts
CHANGED
|
@@ -56,10 +56,10 @@ export declare const INSTRUCTIONS = "These tools edit websites built with Goodfe
|
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/index.d.ts
|
|
58
58
|
/** A site's id for the tools: its host, then its repository, such as `github:parish/site`. */
|
|
59
|
-
export type SiteId = `github:${string}` | `gitlab:${string}`;
|
|
59
|
+
export type SiteId = `github:${string}` | `gitlab:${string}` | `bitbucket:${string}`;
|
|
60
60
|
/** Splits a site's id into its host and repository, or `undefined` if it isn't one. */
|
|
61
61
|
export declare function parseSiteId(id: string): {
|
|
62
|
-
host: "github" | "gitlab";
|
|
62
|
+
host: "github" | "gitlab" | "bitbucket";
|
|
63
63
|
repo: string;
|
|
64
64
|
} | undefined;
|
|
65
65
|
/** An MCP server with Goodfellow's tools. Connect it to a transport. */
|
package/dist/index.js
CHANGED
|
@@ -861,10 +861,10 @@ img[src$=".svg" i] { width: 100%; }
|
|
|
861
861
|
*/
|
|
862
862
|
/** Splits a site's id into its host and repository, or `undefined` if it isn't one. */
|
|
863
863
|
function parseSiteId(id) {
|
|
864
|
-
const match = /^(github|gitlab):([\w.-]+(?:\/[\w.-]+)+)$/.exec(id.trim());
|
|
864
|
+
const match = /^(github|gitlab|bitbucket):([\w.-]+(?:\/[\w.-]+)+)$/.exec(id.trim());
|
|
865
865
|
if (!match) return void 0;
|
|
866
866
|
const [, host, repo] = match;
|
|
867
|
-
if (host
|
|
867
|
+
if (host !== "gitlab" && repo?.split("/").length !== 2) return void 0;
|
|
868
868
|
return {
|
|
869
869
|
host,
|
|
870
870
|
repo: repo ?? ""
|
package/dist/stdio.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { _ as readSettings, a as entryLanguages, c as listMedia, d as pageAddress, f as readCollection, g as readPage, h as readMenus, i as entryAddresses, l as listPages, m as readLayout, n as ToolError, o as isMediaAddress, p as readEntry, r as contentFiles, s as listCollections, t as localScreenshots, u as mediaImage, v as takenAddresses } from "./screenshots-yES3bUkH.js";
|
|
3
|
+
import { bitbucket } from "@goodfellow-cms/bitbucket";
|
|
3
4
|
import { github } from "@goodfellow-cms/github";
|
|
4
5
|
import { gitlab } from "@goodfellow-cms/gitlab";
|
|
5
6
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -651,10 +652,10 @@ function registerTools(server, context) {
|
|
|
651
652
|
*/
|
|
652
653
|
/** Splits a site's id into its host and repository, or `undefined` if it isn't one. */
|
|
653
654
|
function parseSiteId(id) {
|
|
654
|
-
const match = /^(github|gitlab):([\w.-]+(?:\/[\w.-]+)+)$/.exec(id.trim());
|
|
655
|
+
const match = /^(github|gitlab|bitbucket):([\w.-]+(?:\/[\w.-]+)+)$/.exec(id.trim());
|
|
655
656
|
if (!match) return void 0;
|
|
656
657
|
const [, host, repo] = match;
|
|
657
|
-
if (host
|
|
658
|
+
if (host !== "gitlab" && repo?.split("/").length !== 2) return void 0;
|
|
658
659
|
return {
|
|
659
660
|
host,
|
|
660
661
|
repo: repo ?? ""
|
|
@@ -686,10 +687,10 @@ function fail(message) {
|
|
|
686
687
|
}
|
|
687
688
|
const siteId = process.env.GOODFELLOW_SITE?.trim() || process.argv[2];
|
|
688
689
|
const token = process.env.GOODFELLOW_TOKEN?.trim();
|
|
689
|
-
if (!siteId) fail("Set GOODFELLOW_SITE to the site's repository, such as github:owner/site
|
|
690
|
+
if (!siteId) fail("Set GOODFELLOW_SITE to the site's repository, such as github:owner/site, gitlab:group/site or bitbucket:workspace/site.");
|
|
690
691
|
const site = parseSiteId(siteId);
|
|
691
|
-
if (!site) fail(`${siteId} isn't a site. Write it as github:owner/site
|
|
692
|
-
if (!token) fail("Set GOODFELLOW_TOKEN to a GitHub or
|
|
692
|
+
if (!site) fail(`${siteId} isn't a site. Write it as github:owner/site, gitlab:group/site or bitbucket:workspace/site.`);
|
|
693
|
+
if (!token) fail("Set GOODFELLOW_TOKEN to a GitHub, GitLab or Bitbucket token that can edit the site.");
|
|
693
694
|
const storage = {
|
|
694
695
|
local: memoryStorage(),
|
|
695
696
|
session: memoryStorage()
|
|
@@ -698,6 +699,9 @@ const host = site.host === "github" ? github({
|
|
|
698
699
|
repo: site.repo,
|
|
699
700
|
signIn: false,
|
|
700
701
|
storage
|
|
702
|
+
}) : site.host === "bitbucket" ? bitbucket({
|
|
703
|
+
repo: site.repo,
|
|
704
|
+
storage
|
|
701
705
|
}) : gitlab({
|
|
702
706
|
project: site.repo,
|
|
703
707
|
...process.env.GITLAB_URL && { url: process.env.GITLAB_URL },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodfellow-cms/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Work on a Goodfellow site from Claude: read and change its pages, entries and settings, see them in screenshots, and publish them or submit them for review.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"goodfellow",
|
|
@@ -37,10 +37,11 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@goodfellow-cms/ai": "0.
|
|
41
|
-
"@goodfellow-cms/core": "0.
|
|
42
|
-
"@goodfellow-cms/
|
|
43
|
-
"@goodfellow-cms/
|
|
40
|
+
"@goodfellow-cms/ai": "0.6.0",
|
|
41
|
+
"@goodfellow-cms/core": "0.6.0",
|
|
42
|
+
"@goodfellow-cms/bitbucket": "0.6.0",
|
|
43
|
+
"@goodfellow-cms/github": "0.6.0",
|
|
44
|
+
"@goodfellow-cms/gitlab": "0.6.0",
|
|
44
45
|
"@modelcontextprotocol/sdk": "1.32.1",
|
|
45
46
|
"zod": "4.6.6"
|
|
46
47
|
},
|
|
@@ -48,8 +49,8 @@
|
|
|
48
49
|
"playwright-core": "1.63.0"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
|
-
"@goodfellow-cms/blocks": "0.
|
|
52
|
-
"@goodfellow-cms/react": "0.
|
|
52
|
+
"@goodfellow-cms/blocks": "0.6.0",
|
|
53
|
+
"@goodfellow-cms/react": "0.6.0",
|
|
53
54
|
"@puckeditor/core": "0.23.0",
|
|
54
55
|
"@types/node": "^22.19.0",
|
|
55
56
|
"fflate": "0.8.3"
|