Skip to content

Commit d6035b4

Browse files
Merge branch 'main' into patch-1
2 parents 57f8717 + 1819bf0 commit d6035b4

Some content is hidden

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

106 files changed

+7630
-2746
lines changed

.github/pull_request_template.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
## Description
44

55
## Server Details
6-
<!-- If modifying an existing server or adding a new one, provide details -->
7-
- Server: <!-- e.g., filesystem, github, new-server-name -->
6+
<!-- If modifying an existing server, provide details -->
7+
- Server: <!-- e.g., filesystem, github -->
88
- Changes to: <!-- e.g., tools, resources, prompts -->
99

1010
## Motivation and Context
@@ -18,7 +18,6 @@
1818

1919
## Types of changes
2020
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
21-
- [ ] New MCP Server
2221
- [ ] Bug fix (non-breaking change which fixes an issue)
2322
- [ ] New feature (non-breaking change which adds functionality)
2423
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
@@ -27,7 +26,7 @@
2726
## Checklist
2827
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
2928
- [ ] I have read the [MCP Protocol Documentation](https://modelcontextprotocol.io)
30-
- [ ] My server follows MCP security best practices
29+
- [ ] My changes follows MCP security best practices
3130
- [ ] I have updated the server's README accordingly
3231
- [ ] I have tested this with an LLM client
3332
- [ ] My code follows the repository's style guidelines

.github/workflows/release.yml

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
name: Automatic Release Creation
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 10 * * *'
7+
8+
jobs:
9+
create-metadata:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
hash: ${{ steps.last-release.outputs.hash }}
13+
version: ${{ steps.create-version.outputs.version}}
14+
npm_packages: ${{ steps.create-npm-packages.outputs.npm_packages}}
15+
pypi_packages: ${{ steps.create-pypi-packages.outputs.pypi_packages}}
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Get last release hash
22+
id: last-release
23+
run: |
24+
HASH=$(git rev-list --tags --max-count=1 || echo "HEAD~1")
25+
echo "hash=${HASH}" >> $GITHUB_OUTPUT
26+
echo "Using last release hash: ${HASH}"
27+
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v5
30+
31+
- name: Create version name
32+
id: create-version
33+
run: |
34+
VERSION=$(uv run --script scripts/release.py generate-version)
35+
echo "version $VERSION"
36+
echo "version=$VERSION" >> $GITHUB_OUTPUT
37+
38+
- name: Create notes
39+
run: |
40+
HASH="${{ steps.last-release.outputs.hash }}"
41+
uv run --script scripts/release.py generate-notes --directory src/ $HASH > RELEASE_NOTES.md
42+
cat RELEASE_NOTES.md
43+
44+
- name: Release notes
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: release-notes
48+
path: RELEASE_NOTES.md
49+
50+
- name: Create python matrix
51+
id: create-pypi-packages
52+
run: |
53+
HASH="${{ steps.last-release.outputs.hash }}"
54+
PYPI=$(uv run --script scripts/release.py generate-matrix --pypi --directory src $HASH)
55+
echo "pypi_packages $PYPI"
56+
echo "pypi_packages=$PYPI" >> $GITHUB_OUTPUT
57+
58+
- name: Create npm matrix
59+
id: create-npm-packages
60+
run: |
61+
HASH="${{ steps.last-release.outputs.hash }}"
62+
NPM=$(uv run --script scripts/release.py generate-matrix --npm --directory src $HASH)
63+
echo "npm_packages $NPM"
64+
echo "npm_packages=$NPM" >> $GITHUB_OUTPUT
65+
66+
update-packages:
67+
needs: [create-metadata]
68+
if: ${{ needs.create-metadata.outputs.npm_packages != '[]' || needs.create-metadata.outputs.pypi_packages != '[]' }}
69+
runs-on: ubuntu-latest
70+
environment: release
71+
outputs:
72+
changes_made: ${{ steps.commit.outputs.changes_made }}
73+
steps:
74+
- uses: actions/checkout@v4
75+
with:
76+
fetch-depth: 0
77+
78+
- name: Install uv
79+
uses: astral-sh/setup-uv@v5
80+
81+
- name: Update packages
82+
run: |
83+
HASH="${{ needs.create-metadata.outputs.hash }}"
84+
uv run --script scripts/release.py update-packages --directory src/ $HASH
85+
86+
- name: Configure git
87+
run: |
88+
git config --global user.name "GitHub Actions"
89+
git config --global user.email "[email protected]"
90+
91+
- name: Commit changes
92+
id: commit
93+
run: |
94+
VERSION="${{ needs.create-metadata.outputs.version }}"
95+
git add -u
96+
if git diff-index --quiet HEAD; then
97+
echo "changes_made=false" >> $GITHUB_OUTPUT
98+
else
99+
git commit -m 'Automatic update of packages'
100+
git tag -a "$VERSION" -m "Release $VERSION"
101+
git push origin "$VERSION"
102+
echo "changes_made=true" >> $GITHUB_OUTPUT
103+
fi
104+
105+
publish-pypi:
106+
needs: [update-packages, create-metadata]
107+
strategy:
108+
fail-fast: false
109+
matrix:
110+
package: ${{ fromJson(needs.create-metadata.outputs.pypi_packages) }}
111+
name: Build ${{ matrix.package }}
112+
environment: release
113+
permissions:
114+
id-token: write # Required for trusted publishing
115+
runs-on: ubuntu-latest
116+
steps:
117+
- uses: actions/checkout@v4
118+
with:
119+
ref: ${{ needs.create-metadata.outputs.version }}
120+
121+
- name: Install uv
122+
uses: astral-sh/setup-uv@v5
123+
124+
- name: Set up Python
125+
uses: actions/setup-python@v5
126+
with:
127+
python-version-file: "src/${{ matrix.package }}/.python-version"
128+
129+
- name: Install dependencies
130+
working-directory: src/${{ matrix.package }}
131+
run: uv sync --frozen --all-extras --dev
132+
133+
- name: Run pyright
134+
working-directory: src/${{ matrix.package }}
135+
run: uv run --frozen pyright
136+
137+
- name: Build package
138+
working-directory: src/${{ matrix.package }}
139+
run: uv build
140+
141+
- name: Publish package to PyPI
142+
uses: pypa/gh-action-pypi-publish@release/v1
143+
with:
144+
packages-dir: src/${{ matrix.package }}/dist
145+
146+
publish-npm:
147+
needs: [update-packages, create-metadata]
148+
strategy:
149+
fail-fast: false
150+
matrix:
151+
package: ${{ fromJson(needs.create-metadata.outputs.npm_packages) }}
152+
name: Build ${{ matrix.package }}
153+
environment: release
154+
runs-on: ubuntu-latest
155+
steps:
156+
- uses: actions/checkout@v4
157+
with:
158+
ref: ${{ needs.create-metadata.outputs.version }}
159+
160+
- uses: actions/setup-node@v4
161+
with:
162+
node-version: 22
163+
cache: npm
164+
registry-url: 'https://registry.npmjs.org'
165+
166+
- name: Install dependencies
167+
working-directory: src/${{ matrix.package }}
168+
run: npm ci
169+
170+
- name: Check if version exists on npm
171+
working-directory: src/${{ matrix.package }}
172+
run: |
173+
VERSION=$(jq -r .version package.json)
174+
if npm view --json | jq -e --arg version "$VERSION" '[.[]][0].versions | contains([$version])'; then
175+
echo "Version $VERSION already exists on npm"
176+
exit 1
177+
fi
178+
echo "Version $VERSION is new, proceeding with publish"
179+
180+
- name: Build package
181+
working-directory: src/${{ matrix.package }}
182+
run: npm run build
183+
184+
- name: Publish package
185+
working-directory: src/${{ matrix.package }}
186+
run: |
187+
npm publish --access public
188+
env:
189+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
190+
191+
create-release:
192+
needs: [update-packages, create-metadata, publish-pypi, publish-npm]
193+
if: needs.update-packages.outputs.changes_made == 'true'
194+
runs-on: ubuntu-latest
195+
environment: release
196+
permissions:
197+
contents: write
198+
steps:
199+
- uses: actions/checkout@v4
200+
201+
- name: Download release notes
202+
uses: actions/download-artifact@v4
203+
with:
204+
name: release-notes
205+
206+
- name: Create release
207+
env:
208+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN}}
209+
run: |
210+
VERSION="${{ needs.create-metadata.outputs.version }}"
211+
gh release create "$VERSION" \
212+
--title "Release $VERSION" \
213+
--notes-file RELEASE_NOTES.md
214+
215+
- name: Docker MCP images
216+
uses: peter-evans/repository-dispatch@v3
217+
with:
218+
token: ${{ secrets.DOCKER_TOKEN }}
219+
repository: docker/labs-ai-tools-for-devs
220+
event-type: build-mcp-images
221+
client-payload: '{"ref": "${{ needs.create-metadata.outputs.version }}"}'

.github/workflows/typescript.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- uses: actions/setup-node@v4
3636
with:
37-
node-version: 18
37+
node-version: 22
3838
cache: npm
3939

4040
- name: Install dependencies
@@ -64,7 +64,7 @@ jobs:
6464
- uses: actions/checkout@v4
6565
- uses: actions/setup-node@v4
6666
with:
67-
node-version: 18
67+
node-version: 22
6868
cache: npm
6969
registry-url: "https://registry.npmjs.org"
7070

@@ -74,6 +74,6 @@ jobs:
7474

7575
- name: Publish package
7676
working-directory: src/${{ matrix.package }}
77-
run: npm publish # --provenance
77+
run: npm publish --access public
7878
env:
7979
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

CONTRIBUTING.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@ Thank you for your interest in contributing to the Model Context Protocol (MCP)
55
## Types of Contributions
66

77
### 1. New Servers
8-
Adding a new server is a valuable way to contribute. Before creating a new server:
8+
9+
The repository contains reference implementations, as well as a list of community servers.
10+
We generally don't accept new servers into the repository. We do accept pull requests to the [README.md](./README.md)
11+
adding a reference to your servers.
12+
13+
Please keep lists in alphabetical order to minimize merge conflicts when adding new items.
914

1015
- Check the [modelcontextprotocol.io](https://modelcontextprotocol.io) documentation
1116
- Ensure your server doesn't duplicate existing functionality
1217
- Consider whether your server would be generally useful to others
1318
- Follow [security best practices](https://modelcontextprotocol.io/docs/concepts/transports#security-considerations) from the MCP documentation
19+
- Create a PR adding a link to your server to the [README.md](./README.md).
1420

1521
### 2. Improvements to Existing Servers
1622
Enhancements to existing servers are welcome! This includes:

0 commit comments

Comments
 (0)