Skip to content

Commit 60edd79

Browse files
authored
Merge pull request #83 from mapbox/ctufts/bump-package-version
Package/server/manifest Version Bump
2 parents dbb4537 + 73ea377 commit 60edd79

6 files changed

Lines changed: 91 additions & 16 deletions

File tree

CLAUDE.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,39 @@ When creating pull requests:
9090

9191
When preparing a new release:
9292

93-
```bash
94-
# Prepare CHANGELOG for release (replaces "Unreleased" with version and date)
95-
npm run changelog:prepare-release 1.0.0
96-
97-
# Review changes, then commit and tag
98-
git add CHANGELOG.md
99-
git commit -m "Release v1.0.0"
100-
git tag v1.0.0
101-
git push && git push --tags
102-
```
93+
1. **Bump the version in `package.json`** to the new version (e.g., `1.0.0`)
94+
2. **Sync versions** across `manifest.json` and `server.json`:
95+
```bash
96+
node scripts/sync-manifest-version.cjs
97+
```
98+
3. **Prepare the changelog** (replaces "Unreleased" with version and date):
99+
```bash
100+
npm run changelog:prepare-release 1.0.0
101+
```
102+
4. **Commit, tag, and push:**
103+
```bash
104+
git add package.json manifest.json server.json CHANGELOG.md
105+
git commit -m "Release v1.0.0"
106+
git tag v1.0.0
107+
git push && git push --tags
108+
```
109+
5. **Publish via the [mcp-server-publisher](https://github.com/mapbox/mcp-server-publisher) workflow:**
110+
- Go to Actions > "Manual Release MCP Server to NPM and MCP Registry"
111+
- Select `mcp-devkit-server` from the repository dropdown
112+
- Enter the version (must match `package.json` exactly)
113+
- The workflow builds, tests, publishes to NPM (`@mapbox/mcp-devkit-server`), publishes to the MCP Registry, creates a DXT package, and creates a GitHub release
103114

104115
The `changelog:prepare-release` script automatically:
105116

106117
- Replaces "## Unreleased" with "## {version} - {date}"
107118
- Adds a new empty "## Unreleased" section at the top
108119
- Validates version format and CHANGELOG structure
109120

121+
The `sync-manifest-version` script automatically:
122+
123+
- Reads the version from `package.json`
124+
- Updates `manifest.json` and `server.json` (including `packages[0].version`) if they differ
125+
110126
## Important Constraints
111127

112128
- **Tool naming:** Tool names (MCP identifiers) must be `snake_case_tool` (e.g., `list_styles_tool`). TypeScript class names follow `PascalCaseTool` convention (e.g., `ListStylesTool`)

README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ https://github.com/user-attachments/assets/8b1b8ef2-9fba-4951-bc9a-beaed4f6aff6
4545
- [Environment Variables](#environment-variables-1)
4646
- [VERBOSE_ERRORS](#verbose_errors)
4747
- [Troubleshooting](#troubleshooting)
48+
- [Release Process](#release-process)
4849
- [Contributing](#contributing)
4950

5051
## Quick Start
@@ -1337,6 +1338,64 @@ export CLIENT_NEEDS_RESOURCE_FALLBACK=true
13371338

13381339
**Solution:** The GeoJSON preview tool may be slow with very large files. Consider simplifying geometries or using smaller datasets for preview purposes.
13391340

1341+
## Release Process
1342+
1343+
Follow these steps to publish a new release:
1344+
1345+
1. **Bump the version in `package.json`** to the target version (e.g., `1.0.0`).
1346+
1347+
2. **Sync versions** across `manifest.json` and `server.json`:
1348+
1349+
```bash
1350+
node scripts/sync-manifest-version.cjs
1351+
```
1352+
1353+
This reads the version from `package.json` and updates `manifest.json` and `server.json` (including `packages[0].version`) to match.
1354+
1355+
3. **Prepare the changelog** — this replaces the "Unreleased" heading with the version and date:
1356+
1357+
```bash
1358+
npm run changelog:prepare-release 1.0.0
1359+
```
1360+
1361+
4. **Commit, tag, and push:**
1362+
1363+
```bash
1364+
git add package.json manifest.json server.json CHANGELOG.md
1365+
git commit -m "Release v1.0.0"
1366+
git tag v1.0.0
1367+
git push && git push --tags
1368+
```
1369+
1370+
5. **Publish via the [mcp-server-publisher](https://github.com/mapbox/mcp-server-publisher) workflow:**
1371+
- Go to the Actions tab in the `mcp-server-publisher` repo
1372+
- Select "Manual Release MCP Server to NPM and MCP Registry"
1373+
- Choose `mcp-devkit-server` from the repository dropdown
1374+
- Enter the version — it **must exactly match** the `package.json` version
1375+
- Leave the branch field empty for stable releases (or specify a branch for dev releases)
1376+
- The workflow will: build, test, publish to NPM (`@mapbox/mcp-devkit-server`), publish to the MCP Registry, create a DXT package, and create a GitHub Release
1377+
1378+
### Version Files
1379+
1380+
The following files must have matching versions before publishing:
1381+
1382+
| File | Fields |
1383+
| --------------- | -------------------------------- |
1384+
| `package.json` | `version` (source of truth) |
1385+
| `manifest.json` | `version` |
1386+
| `server.json` | `version`, `packages[0].version` |
1387+
1388+
The `sync-manifest-version.cjs` script handles syncing these automatically from `package.json`.
1389+
1390+
### Dev Releases
1391+
1392+
To publish a pre-release from a feature branch:
1393+
1394+
1. Set the version in `package.json` with a pre-release suffix (e.g., `1.0.0-dev` or `1.0.0-beta`)
1395+
2. Run `node scripts/sync-manifest-version.cjs`
1396+
3. In the publisher workflow, enter the version and specify the branch name
1397+
4. The package will be published to NPM under the `dev` tag (won't affect `latest`)
1398+
13401399
## Contributing
13411400

13421401
We welcome contributions to the Mapbox Development MCP Server! Please review our documentation:

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"dxt_version": "0.1",
33
"name": "@mapbox/mcp-devkit-server",
44
"display_name": "Mapbox MCP DevKit Server",
5-
"version": "0.4.7",
5+
"version": "0.5.0",
66
"description": "Mapbox MCP devkit server",
77
"author": {
88
"name": "Mapbox, Inc."

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mapbox/mcp-devkit-server",
3-
"version": "0.4.7",
3+
"version": "0.5.0",
44
"description": "Mapbox MCP devkit server",
55
"mcpName": "io.github.mapbox/mcp-devkit-server",
66
"main": "./dist/commonjs/index.js",

server.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"url": "https://github.com/mapbox/mcp-devkit-server",
77
"source": "github"
88
},
9-
"version": "0.4.7",
9+
"version": "0.5.0",
1010
"packages": [
1111
{
1212
"registryType": "npm",
1313
"registryBaseUrl": "https://registry.npmjs.org",
1414
"runtimeHint": "npx",
15-
"version": "0.4.7",
15+
"version": "0.5.0",
1616
"identifier": "@mapbox/mcp-devkit-server",
1717
"transport": {
1818
"type": "stdio"

0 commit comments

Comments
 (0)