Skip to content

Commit bfc1dcb

Browse files
committed
Merge branch 'main' into issue_602
2 parents 7a9aad9 + 7b1078b commit bfc1dcb

File tree

203 files changed

+26843
-2133
lines changed

Some content is hidden

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

203 files changed

+26843
-2133
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Applied 120 line-length rule to all files: https://github.com/modelcontextprotocol/python-sdk/pull/856
2+
543961968c0634e93d919d509cce23a1d6a56c21

.github/ISSUE_TEMPLATE/bug.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: 🐛 MCP Python SDK Bug
2+
description: Report a bug or unexpected behavior in the MCP Python SDK
3+
labels: ["need confirmation"]
4+
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: Thank you for contributing to the MCP Python SDK! ✊
9+
10+
- type: checkboxes
11+
id: checks
12+
attributes:
13+
label: Initial Checks
14+
description: Just making sure you're using the latest version of MCP Python SDK.
15+
options:
16+
- label: I confirm that I'm using the latest version of MCP Python SDK
17+
required: true
18+
- label: I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue
19+
required: true
20+
21+
- type: textarea
22+
id: description
23+
attributes:
24+
label: Description
25+
description: |
26+
Please explain what you're seeing and what you would expect to see.
27+
28+
Please provide as much detail as possible to make understanding and solving your problem as quick as possible. 🙏
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: example
34+
attributes:
35+
label: Example Code
36+
description: >
37+
If applicable, please add a self-contained,
38+
[minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example)
39+
demonstrating the bug.
40+
41+
placeholder: |
42+
from mcp.server.fastmcp import FastMCP
43+
44+
...
45+
render: Python
46+
47+
- type: textarea
48+
id: version
49+
attributes:
50+
label: Python & MCP Python SDK
51+
description: |
52+
Which version of Python and MCP Python SDK are you using?
53+
render: Text
54+
validations:
55+
required: true

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: true
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: 🚀 MCP Python SDK Feature Request
2+
description: "Suggest a new feature for the MCP Python SDK"
3+
labels: ["feature request"]
4+
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: Thank you for contributing to the MCP Python SDK! ✊
9+
10+
- type: textarea
11+
id: description
12+
attributes:
13+
label: Description
14+
description: |
15+
Please give as much detail as possible about the feature you would like to suggest. 🙏
16+
17+
You might like to add:
18+
* A demo of how code might look when using the feature
19+
* Your use case(s) for the feature
20+
* Reference to other projects that have a similar feature
21+
validations:
22+
required: true
23+
24+
- type: textarea
25+
id: references
26+
attributes:
27+
label: References
28+
description: |
29+
Please add any links or references that might help us understand your feature request better. 📚

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: ❓ MCP Python SDK Question
2+
description: "Ask a question about the MCP Python SDK"
3+
labels: ["question"]
4+
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: Thank you for reaching out to the MCP Python SDK community! We're here to help! 🤝
9+
10+
- type: textarea
11+
id: question
12+
attributes:
13+
label: Question
14+
description: |
15+
Please provide as much detail as possible about your question. 🙏
16+
17+
You might like to include:
18+
* Code snippets showing what you've tried
19+
* Error messages you're encountering (if any)
20+
* Expected vs actual behavior
21+
* Your use case and what you're trying to achieve
22+
validations:
23+
required: true
24+
25+
- type: textarea
26+
id: context
27+
attributes:
28+
label: Additional Context
29+
description: |
30+
Please provide any additional context that might help us better understand your question, such as:
31+
* Your MCP Python SDK version
32+
* Your Python version
33+
* Relevant configuration or environment details 📝

.github/workflows/check-lock.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish Docs manually
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
docs-publish:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Configure Git Credentials
14+
run: |
15+
git config user.name github-actions[bot]
16+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v3
20+
with:
21+
enable-cache: true
22+
version: 0.7.2
23+
24+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
25+
- uses: actions/cache@v4
26+
with:
27+
key: mkdocs-material-${{ env.cache_id }}
28+
path: .cache
29+
restore-keys: |
30+
mkdocs-material-
31+
32+
- run: uv sync --frozen --group docs
33+
- run: uv run --frozen --no-sync mkdocs gh-deploy --force

.github/workflows/publish-pypi.yml

Lines changed: 53 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,25 @@ jobs:
1010
runs-on: ubuntu-latest
1111
needs: [checks]
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v4
1414

15-
- name: Install uv
16-
uses: astral-sh/setup-uv@v3
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v3
17+
with:
18+
enable-cache: true
19+
version: 0.7.2
1720

18-
- name: "Set up Python"
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version-file: ".python-version"
21+
- name: Set up Python 3.12
22+
run: uv python install 3.12
2223

23-
- name: Install the project
24-
run: uv sync --frozen --all-extras --dev
24+
- name: Build
25+
run: uv build
2526

26-
- name: Build
27-
run: uv build
28-
29-
- name: Upload artifacts
30-
uses: actions/upload-artifact@v4
31-
with:
32-
name: release-dists
33-
path: dist/
27+
- name: Upload artifacts
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: release-dists
31+
path: dist/
3432

3533
checks:
3634
uses: ./.github/workflows/shared.yml
@@ -42,14 +40,43 @@ jobs:
4240
needs:
4341
- release-build
4442
permissions:
45-
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
43+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
4644

4745
steps:
48-
- name: Retrieve release distributions
49-
uses: actions/download-artifact@v4
50-
with:
51-
name: release-dists
52-
path: dist/
53-
54-
- name: Publish package distributions to PyPI
55-
uses: pypa/gh-action-pypi-publish@release/v1
46+
- name: Retrieve release distributions
47+
uses: actions/download-artifact@v4
48+
with:
49+
name: release-dists
50+
path: dist/
51+
52+
- name: Publish package distributions to PyPI
53+
uses: pypa/gh-action-pypi-publish@release/v1
54+
55+
docs-publish:
56+
runs-on: ubuntu-latest
57+
needs: ["pypi-publish"]
58+
permissions:
59+
contents: write
60+
steps:
61+
- uses: actions/checkout@v4
62+
- name: Configure Git Credentials
63+
run: |
64+
git config user.name github-actions[bot]
65+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
66+
67+
- name: Install uv
68+
uses: astral-sh/setup-uv@v3
69+
with:
70+
enable-cache: true
71+
version: 0.7.2
72+
73+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
74+
- uses: actions/cache@v4
75+
with:
76+
key: mkdocs-material-${{ env.cache_id }}
77+
path: .cache
78+
restore-keys: |
79+
mkdocs-material-
80+
81+
- run: uv sync --frozen --group docs
82+
- run: uv run --frozen --no-sync mkdocs gh-deploy --force

0 commit comments

Comments
 (0)