Skip to content

Commit d2530ce

Browse files
authored
Merge branch 'main' into stream_closed
2 parents d7e7b46 + 321498a commit d2530ce

File tree

37 files changed

+1533
-221
lines changed

37 files changed

+1533
-221
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
23+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
24+
- uses: actions/cache@v4
25+
with:
26+
key: mkdocs-material-${{ env.cache_id }}
27+
path: .cache
28+
restore-keys: |
29+
mkdocs-material-
30+
31+
- run: uv sync --frozen --group docs
32+
- run: uv run --no-sync mkdocs gh-deploy --force

.github/workflows/publish-pypi.yml

Lines changed: 51 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,24 @@ 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
1719

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

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

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/
26+
- name: Upload artifacts
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: release-dists
30+
path: dist/
3431

3532
checks:
3633
uses: ./.github/workflows/shared.yml
@@ -42,14 +39,42 @@ jobs:
4239
needs:
4340
- release-build
4441
permissions:
45-
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
42+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
4643

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

.github/workflows/shared.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,11 @@ jobs:
1414
with:
1515
enable-cache: true
1616

17-
- name: "Set up Python"
18-
uses: actions/setup-python@v5
19-
with:
20-
python-version-file: ".python-version"
21-
2217
- name: Install the project
23-
run: uv sync --frozen --all-extras --dev
18+
run: uv sync --frozen --all-extras --dev --python 3.12
2419

2520
- name: Run ruff format check
26-
run: uv run --frozen ruff check .
21+
run: uv run --no-sync ruff check .
2722

2823
typecheck:
2924
runs-on: ubuntu-latest
@@ -35,19 +30,17 @@ jobs:
3530
with:
3631
enable-cache: true
3732

38-
- name: "Set up Python"
39-
uses: actions/setup-python@v5
40-
with:
41-
python-version-file: ".python-version"
42-
4333
- name: Install the project
44-
run: uv sync --frozen --all-extras --dev
34+
run: uv sync --frozen --all-extras --dev --python 3.12
4535

4636
- name: Run pyright
47-
run: uv run --frozen pyright
37+
run: uv run --no-sync pyright
4838

49-
build:
39+
test:
5040
runs-on: ubuntu-latest
41+
strategy:
42+
matrix:
43+
python-version: ["3.10", "3.11", "3.12", "3.13"]
5144

5245
steps:
5346
- uses: actions/checkout@v4
@@ -57,13 +50,8 @@ jobs:
5750
with:
5851
enable-cache: true
5952

60-
- name: "Set up Python"
61-
uses: actions/setup-python@v5
62-
with:
63-
python-version-file: ".python-version"
64-
6553
- name: Install the project
66-
run: uv sync --frozen --all-extras --dev
54+
run: uv sync --frozen --all-extras --dev --python ${{ matrix.python-version }}
6755

6856
- name: Run pytest
69-
run: uv run --frozen pytest
57+
run: uv run --no-sync pytest

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,5 @@ cython_debug/
165165
#.idea/
166166

167167
# vscode
168-
.vscode/
168+
.vscode/
169+
**/CLAUDE.local.md

.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ uv add "mcp[cli]"
8181

8282
Alternatively, for projects using pip for dependencies:
8383
```bash
84-
pip install mcp
84+
pip install "mcp[cli]"
8585
```
8686

8787
### Running the standalone MCP development tools
@@ -357,7 +357,7 @@ You can mount the SSE server to an existing ASGI server using the `sse_app` meth
357357

358358
```python
359359
from starlette.applications import Starlette
360-
from starlette.routes import Mount, Host
360+
from starlette.routing import Mount, Host
361361
from mcp.server.fastmcp import FastMCP
362362

363363

docs/api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: mcp

docs/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# MCP Server
2+
3+
This is the MCP Server implementation in Python.
4+
5+
It only contains the [API Reference](api.md) for the time being.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
GROQ_API_KEY=gsk_1234567890
1+
LLM_API_KEY=gsk_1234567890
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
22

3-
from server import main
3+
from .server import main
44

55
sys.exit(main())

0 commit comments

Comments
 (0)