Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ jobs:
run: pnpm install

- name: Build
run: pnpm run build
run: pnpm run build

- name: Verify server.json version metadata
run: pnpm run check:server-json
14 changes: 1 addition & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,7 @@ jobs:
run: ./mcp-publisher login github-oidc

- name: Sync MCP Registry version
run: |
node -e "
const fs = require('fs');
const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'));
const manifest = JSON.parse(fs.readFileSync('server.json', 'utf8'));
manifest.version = packageJson.version;
for (const pkg of manifest.packages ?? []) {
if (pkg.registryType === 'npm' && pkg.identifier === 'firecrawl-mcp') {
pkg.version = packageJson.version;
}
}
fs.writeFileSync('server.json', JSON.stringify(manifest, null, 2) + '\n');
"
run: pnpm run sync:server-json

- name: Publish to MCP Registry
run: ./mcp-publisher publish
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"lint": "eslint src/**/*.ts",
"lint:fix": "eslint src/**/*.ts --fix",
"format": "prettier --write .",
"sync:server-json": "node scripts/sync-server-json.mjs",
"check:server-json": "node scripts/check-server-json-version.mjs",
"prepare": "npm run build",
"publish-prod": "npm run build && npm publish",
"publish-beta": "npm run build && npm publish --tag beta"
Expand Down
32 changes: 32 additions & 0 deletions scripts/check-server-json-version.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import fs from "node:fs";

const packageJson = JSON.parse(fs.readFileSync("package.json", "utf8"));
const manifest = JSON.parse(fs.readFileSync("server.json", "utf8"));

const errors = [];

if (manifest.version !== packageJson.version) {
errors.push(
`server.json version (${manifest.version}) does not match package.json (${packageJson.version})`,
);
}

const npmPackage = (manifest.packages ?? []).find(
(pkg) => pkg.registryType === "npm" && pkg.identifier === "firecrawl-mcp",
);

if (!npmPackage) {
errors.push("server.json is missing firecrawl-mcp npm package entry");
} else if (npmPackage.version !== packageJson.version) {
errors.push(
`server.json packages[firecrawl-mcp].version (${npmPackage.version}) does not match package.json (${packageJson.version})`,
);
}

if (errors.length > 0) {
console.error("server.json version check failed:\n- " + errors.join("\n- "));
console.error("\nRun: pnpm run sync:server-json");
process.exit(1);
}

console.log(`server.json version matches package.json (${packageJson.version})`);
16 changes: 16 additions & 0 deletions scripts/sync-server-json.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import fs from "node:fs";

const packageJson = JSON.parse(fs.readFileSync("package.json", "utf8"));
const manifest = JSON.parse(fs.readFileSync("server.json", "utf8"));

manifest.version = packageJson.version;

for (const pkg of manifest.packages ?? []) {
if (pkg.registryType === "npm" && pkg.identifier === "firecrawl-mcp") {
pkg.version = packageJson.version;
}
}

fs.writeFileSync("server.json", JSON.stringify(manifest, null, 2) + "\n");

console.log(`Synced server.json to package.json version ${packageJson.version}`);
4 changes: 2 additions & 2 deletions server.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "io.github.firecrawl/firecrawl-mcp-server",
"title": "Firecrawl MCP Server",
"description": "MCP server for Firecrawl — search, scrape, and interact with the web.",
"version": "3.7.5",
"version": "3.22.2",
"repository": {
"url": "https://github.com/firecrawl/firecrawl-mcp-server.git",
"source": "github"
Expand All @@ -12,7 +12,7 @@
{
"registryType": "npm",
"identifier": "firecrawl-mcp",
"version": "3.22.1",
"version": "3.22.2",
"transport": {
"type": "stdio"
},
Expand Down