Skip to content

Commit 647d924

Browse files
Merge branch 'main' into sebastian/patch-remove-addition-slash
2 parents 5710318 + 21b85cd commit 647d924

File tree

11 files changed

+507
-15
lines changed

11 files changed

+507
-15
lines changed

.dockerignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Version control
2+
.git
3+
.gitignore
4+
5+
# Node.js
6+
node_modules
7+
npm-debug.log
8+
9+
# Build artifacts
10+
client/dist
11+
client/build
12+
server/dist
13+
server/build
14+
15+
# Environment variables
16+
.env
17+
.env.local
18+
.env.development
19+
.env.test
20+
.env.production
21+
22+
# Editor files
23+
.vscode
24+
.idea
25+
26+
# Logs
27+
logs
28+
*.log
29+
30+
# Testing
31+
coverage
32+
33+
# Docker
34+
Dockerfile
35+
.dockerignore

.github/workflows/main.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
# - run: npm ci
2727
- run: npm install --no-package-lock
2828

29+
- name: Check version consistency
30+
run: npm run check-version
31+
2932
- name: Check linting
3033
working-directory: ./client
3134
run: npm run lint
@@ -62,3 +65,52 @@ jobs:
6265
- run: npm run publish-all
6366
env:
6467
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
68+
69+
publish-github-container-registry:
70+
runs-on: ubuntu-latest
71+
if: github.event_name == 'release'
72+
environment: release
73+
needs: build
74+
permissions:
75+
contents: read
76+
packages: write
77+
attestations: write
78+
id-token: write
79+
steps:
80+
- uses: actions/checkout@v4
81+
82+
- name: Log in to the Container registry
83+
uses: docker/login-action@v3
84+
with:
85+
registry: ghcr.io
86+
username: ${{ github.actor }}
87+
password: ${{ secrets.GITHUB_TOKEN }}
88+
89+
- name: Extract metadata (tags, labels) for Docker
90+
id: meta
91+
uses: docker/metadata-action@v5
92+
with:
93+
images: ghcr.io/${{ github.repository }}
94+
95+
- name: Set up QEMU
96+
uses: docker/setup-qemu-action@v3
97+
98+
- name: Set up Docker Buildx
99+
uses: docker/setup-buildx-action@v3
100+
101+
- name: Build and push Docker image
102+
id: push
103+
uses: docker/build-push-action@v6
104+
with:
105+
context: .
106+
push: true
107+
platforms: linux/amd64,linux/arm64
108+
tags: ${{ steps.meta.outputs.tags }}
109+
labels: ${{ steps.meta.outputs.labels }}
110+
111+
- name: Generate artifact attestation
112+
uses: actions/attest-build-provenance@v2
113+
with:
114+
subject-name: ghcr.io/${{ github.repository }}
115+
subject-digest: ${{ steps.push.outputs.digest }}
116+
push-to-registry: true

Dockerfile

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Build stage
2+
FROM node:24-slim AS builder
3+
4+
# Set working directory
5+
WORKDIR /app
6+
7+
# Copy package files for installation
8+
COPY package*.json ./
9+
COPY .npmrc ./
10+
COPY client/package*.json ./client/
11+
COPY server/package*.json ./server/
12+
COPY cli/package*.json ./cli/
13+
14+
# Install dependencies
15+
RUN npm ci --ignore-scripts
16+
17+
# Copy source files
18+
COPY . .
19+
20+
# Build the application
21+
RUN npm run build
22+
23+
# Production stage
24+
FROM node:24-slim
25+
26+
WORKDIR /app
27+
28+
# Copy package files for production
29+
COPY package*.json ./
30+
COPY .npmrc ./
31+
COPY client/package*.json ./client/
32+
COPY server/package*.json ./server/
33+
COPY cli/package*.json ./cli/
34+
35+
# Install only production dependencies
36+
RUN npm ci --omit=dev --ignore-scripts
37+
38+
# Copy built files from builder stage
39+
COPY --from=builder /app/client/dist ./client/dist
40+
COPY --from=builder /app/client/bin ./client/bin
41+
COPY --from=builder /app/server/build ./server/build
42+
COPY --from=builder /app/cli/build ./cli/build
43+
44+
# Set default port values as environment variables
45+
ENV CLIENT_PORT=6274
46+
ENV SERVER_PORT=6277
47+
48+
# Document which ports the application uses internally
49+
EXPOSE ${CLIENT_PORT} ${SERVER_PORT}
50+
51+
# Use ENTRYPOINT with CMD for arguments
52+
ENTRYPOINT ["npm", "start"]

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-cli",
3-
"version": "0.14.2",
3+
"version": "0.14.3",
44
"description": "CLI for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-client",
3-
"version": "0.14.2",
3+
"version": "0.14.3",
44
"description": "Client-side application for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",

package-lock.json

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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector",
3-
"version": "0.14.2",
3+
"version": "0.14.3",
44
"description": "Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",
@@ -43,9 +43,9 @@
4343
"check-version": "node scripts/check-version-consistency.js"
4444
},
4545
"dependencies": {
46-
"@modelcontextprotocol/inspector-cli": "^0.14.2",
47-
"@modelcontextprotocol/inspector-client": "^0.14.2",
48-
"@modelcontextprotocol/inspector-server": "^0.14.2",
46+
"@modelcontextprotocol/inspector-cli": "^0.14.3",
47+
"@modelcontextprotocol/inspector-client": "^0.14.3",
48+
"@modelcontextprotocol/inspector-server": "^0.14.3",
4949
"@modelcontextprotocol/sdk": "^1.12.1",
5050
"concurrently": "^9.0.1",
5151
"open": "^10.1.0",

scripts/README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Version Management Scripts
2+
3+
This directory contains scripts for managing version consistency across the monorepo.
4+
5+
## Scripts
6+
7+
### update-version.js
8+
9+
Updates the version across all package.json files in the monorepo and updates package-lock.json.
10+
11+
**Usage:**
12+
13+
```bash
14+
npm run update-version <new-version>
15+
# Example:
16+
npm run update-version 0.14.3
17+
```
18+
19+
This script will:
20+
21+
1. Update the version in all package.json files (root, client, server, cli)
22+
2. Update workspace dependencies in the root package.json
23+
3. Run `npm install` to update package-lock.json
24+
4. Provide next steps for committing and tagging
25+
26+
### check-version-consistency.js
27+
28+
Checks that all packages have consistent versions and that package-lock.json is up to date.
29+
30+
**Usage:**
31+
32+
```bash
33+
npm run check-version
34+
```
35+
36+
This script checks:
37+
38+
1. All package.json files have the same version
39+
2. Workspace dependencies in root package.json match the current version
40+
3. package-lock.json version matches package.json
41+
4. Workspace packages in package-lock.json have the correct versions
42+
43+
This check runs automatically in CI on every PR and push to main.
44+
45+
## CI Integration
46+
47+
The version consistency check is integrated into the GitHub Actions workflow (`.github/workflows/main.yml`) and will fail the build if:
48+
49+
- Package versions are inconsistent
50+
- package-lock.json is out of sync
51+
52+
## Common Workflows
53+
54+
### Bumping version for a release:
55+
56+
```bash
57+
# Update to new version
58+
npm run update-version 0.15.0
59+
60+
# Verify everything is correct
61+
npm run check-version
62+
63+
# Commit the changes
64+
git add -A
65+
git commit -m "chore: bump version to 0.15.0"
66+
67+
# Create a tag
68+
git tag 0.15.0
69+
70+
# Push changes and tag
71+
git push && git push --tags
72+
```

0 commit comments

Comments
 (0)