Skip to content

Commit 161f584

Browse files
committed
merge commit - v2
2 parents a57840c + f82c997 commit 161f584

File tree

225 files changed

+13084
-5298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+13084
-5298
lines changed

.changeset/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it
4+
[in our repository](https://github.com/changesets/changesets)
5+
6+
We have a quick list of common questions to get you started engaging with this project in [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "modelcontextprotocol/typescript-sdk" }],
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": ["@modelcontextprotocol/examples-client", "@modelcontextprotocol/examples-server", "@modelcontextprotocol/examples-shared"]
11+
}

.changeset/tender-snails-fold.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@modelcontextprotocol/client': patch
3+
'@modelcontextprotocol/server': patch
4+
---
5+
6+
Initial 2.0.0-alpha.0 client and server package

.github/workflows/main.yml

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,47 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/checkout@v4
20-
- uses: actions/setup-node@v4
19+
- uses: actions/checkout@v6
20+
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v4
23+
id: pnpm-install
24+
with:
25+
run_install: false
26+
- uses: actions/setup-node@v6
2127
with:
2228
node-version: 24
23-
cache: npm
29+
cache: pnpm
30+
cache-dependency-path: pnpm-lock.yaml
2431

25-
- run: npm ci
26-
- run: npm run check
27-
- run: npm run build
32+
- run: pnpm install
33+
- run: pnpm run check:all
34+
- run: pnpm run build:all
2835

2936
test:
3037
runs-on: ubuntu-latest
3138
strategy:
3239
fail-fast: false
3340
matrix:
34-
node-version: [18, 24]
41+
node-version: [20, 22, 24]
3542

3643
steps:
37-
- uses: actions/checkout@v4
38-
- uses: actions/setup-node@v4
44+
- uses: actions/checkout@v6
45+
46+
- name: Install pnpm
47+
uses: pnpm/action-setup@v4
48+
id: pnpm-install
49+
with:
50+
run_install: false
51+
- uses: actions/setup-node@v6
3952
with:
4053
node-version: ${{ matrix.node-version }}
41-
cache: npm
54+
cache: pnpm
55+
cache-dependency-path: pnpm-lock.yaml
56+
57+
- run: pnpm install
4258

43-
- run: npm ci
44-
- run: npm test
59+
- run: pnpm test:all
4560

4661
publish:
4762
runs-on: ubuntu-latest
@@ -55,13 +70,19 @@ jobs:
5570

5671
steps:
5772
- uses: actions/checkout@v4
73+
74+
- name: Install pnpm
75+
uses: pnpm/action-setup@v4
76+
id: pnpm-install
77+
with:
78+
run_install: false
5879
- uses: actions/setup-node@v4
5980
with:
6081
node-version: 24
61-
cache: npm
82+
cache: pnpm
83+
cache-dependency-path: pnpm-lock.yaml
6284
registry-url: 'https://registry.npmjs.org'
63-
64-
- run: npm ci
85+
- run: pnpm install
6586

6687
- name: Determine npm tag
6788
id: npm-tag
@@ -84,6 +105,6 @@ jobs:
84105
echo "tag=" >> $GITHUB_OUTPUT
85106
fi
86107
87-
- run: npm publish --provenance --access public ${{ steps.npm-tag.outputs.tag }}
108+
- run: pnpm publish --provenance --access public ${{ steps.npm-tag.outputs.tag }}
88109
env:
89110
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Publish Any Commit
2+
23
permissions:
34
contents: read
5+
46
on:
57
pull_request:
68
push:
@@ -14,14 +16,26 @@ jobs:
1416
runs-on: ubuntu-latest
1517

1618
steps:
17-
- uses: actions/checkout@v4
18-
- uses: actions/setup-node@v4
19+
- uses: actions/checkout@v6
20+
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
run_install: false
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v6
1928
with:
2029
node-version: 24
21-
cache: npm
30+
cache: pnpm
31+
cache-dependency-path: pnpm-lock.yaml
32+
registry-url: 'https://registry.npmjs.org'
33+
34+
- name: Install dependencies
35+
run: pnpm install
36+
37+
- name: Build packages
38+
run: pnpm run build:all
2239

23-
- run: npm ci
24-
- name: Build
25-
run: npm run build
26-
- name: Publish
27-
run: npx pkg-pr-new publish
40+
- name: Publish preview packages
41+
run: pnpm dlx pkg-pr-new publish --packageManager=npm --pnpm './packages/server' './packages/client'

.github/workflows/release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
12+
concurrency: ${{ github.workflow }}-${{ github.ref }}
13+
14+
jobs:
15+
release:
16+
name: Release
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v6
20+
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
run_install: false
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v6
28+
with:
29+
node-version: 24
30+
cache: pnpm
31+
cache-dependency-path: pnpm-lock.yaml
32+
registry-url: 'https://registry.npmjs.org'
33+
34+
- name: Install dependencies
35+
run: pnpm install
36+
37+
- name: Create Release Pull Request or Publish to npm
38+
id: changesets
39+
uses: changesets/action@v1
40+
with:
41+
publish: pnpm run build:all && pnpm changeset publish
42+
env:
43+
GITHUB_TOKEN: ${{ github.token }}
44+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
45+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/update-spec-types.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,35 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
19+
20+
- name: Install pnpm
21+
uses: pnpm/action-setup@v4
22+
id: pnpm-install
23+
with:
24+
run_install: false
1925

2026
- name: Setup Node.js
21-
uses: actions/setup-node@v4
27+
uses: actions/setup-node@v6
2228
with:
23-
node-version: '24'
29+
node-version: 24
30+
cache: pnpm
31+
cache-dependency-path: pnpm-lock.yaml
2432

2533
- name: Install dependencies
26-
run: npm ci
34+
run: pnpm install
2735

2836
- name: Fetch latest spec types
29-
run: npm run fetch:spec-types
37+
run: pnpm run fetch:spec-types
3038

3139
- name: Check for changes
3240
id: check_changes
3341
run: |
34-
if git diff --quiet src/spec.types.ts; then
42+
if git diff --quiet packages/core/src/types/spec.types.ts; then
3543
echo "has_changes=false" >> $GITHUB_OUTPUT
3644
else
3745
echo "has_changes=true" >> $GITHUB_OUTPUT
38-
LATEST_SHA=$(grep "Last updated from commit:" src/spec.types.ts | cut -d: -f2 | tr -d ' ')
46+
LATEST_SHA=$(grep "Last updated from commit:" packages/core/src/types/spec.types.ts | cut -d: -f2 | tr -d ' ')
3947
echo "sha=$LATEST_SHA" >> $GITHUB_OUTPUT
4048
fi
4149
@@ -48,12 +56,12 @@ jobs:
4856
git config user.email "github-actions[bot]@users.noreply.github.com"
4957
5058
git checkout -B update-spec-types
51-
git add src/spec.types.ts
59+
git add packages/core/src/types/spec.types.ts
5260
git commit -m "chore: update spec.types.ts from upstream"
5361
git push -f origin update-spec-types
5462
5563
# Create PR if it doesn't exist, or update if it does
56-
PR_BODY="This PR updates \`src/spec.types.ts\` from the Model Context Protocol specification.
64+
PR_BODY="This PR updates \`packages/core/src/types/spec.types.ts\` from the Model Context Protocol specification.
5765
5866
Source file: https://github.com/modelcontextprotocol/modelcontextprotocol/blob/${{ steps.check_changes.outputs.sha }}/schema/draft/schema.ts
5967

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,4 @@ dist/
133133

134134
# IDE
135135
.idea/
136+
.cursor/

0 commit comments

Comments
 (0)