Repository navigation
fix(run/mcp-server): pin uv image, update to Python 3.14 & fastmcp 4.2.6, cast PORT to int - #15000
wietsevenema wants to merge 2 commits into
Conversation
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
e5ceac0 to
3565169
Compare
|
Hi @iennae, could you please take a look at this PR when you have a moment? It pins the |
…2.6, cast PORT to int
- Pin uv in Dockerfile to ghcr.io/astral-sh/uv:0.13.10 instead of :latest.
- Update pyproject.toml and README.md from EOL Python 3.10 to >=3.14 (matching FROM python:3.14-slim).
- Bump fastmcp to 4.2.6 (and required opentelemetry-* to 1.45.2) and regenerate uv.lock.
- Cast PORT to int in server.py (int(os.getenv('PORT', 8080))) to fix uvicorn's %d startup logging TypeError.
3565169 to
3c736f3
Compare
|
can you fix the linting? |
…outside region tags
|
Done in e01795a! Formatted |
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
| # limitations under the License. | ||
|
|
||
| # Ignore flake8 for this file because setup_opentelemetry() must run above the | ||
| # nested [START cloudrun_mcpserver] region tag (causing E402/I100/I201 on the |
There was a problem hiding this comment.
I suspect the snippet-bot check is failing because this particular comment houses the region tag's initialization. [START cloudrun_mcpserver]
There was a problem hiding this comment.
yes; and it's going to actually cause a problem because region tags are comments. @wietsevenema you need to remove the region tag from this spot.
Description
Updates the Cloud Run remote MCP server sample (
run/mcp-server/) to keep its dependencies current, pinned, and aligned with the Dockerfile and tutorial:uvinDockerfile: Replaceghcr.io/astral-sh/uv:latestwithghcr.io/astral-sh/uv:0.13.10.>=3.14: Alignpyproject.tomlandREADME.mdwithFROM python:3.14-slim(moving off EOL Python 3.10).fastmcpto4.2.6: Updatefastmcp(and its requiredopentelemetry-*==1.45.2dependency) inpyproject.tomland regenerateuv.lock.PORTtointinserver.py: Passport=int(os.getenv("PORT", 8080))so uvicorn logs cleanly on startup without a%dformatTypeError.Testing
run/mcp-server/from source to Cloud Run (--no-allow-unauthenticated).python:3.14-slim,uv:0.13.10,fastmcp==4.2.6) and startup logs (Uvicorn running on http://0.0.0.0:8080, no logging errors).addandsubtracttool calls viagcloud run services proxyanduv run test_server.py.