docs: add uv-managed dependencies and uvx examples to mcp-json configuration#3843
Conversation
…uration Closes PrefectHQ#1707 - Add example for configuring mcp.json with uv-managed projects (pyproject.toml) - Add examples for running published pip packages via uvx - Update both main and v2 docs
jlowin
left a comment
There was a problem hiding this comment.
Great addition — verified --project output matches reality, and the uvx variants cover the common cases. Thanks!
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7542c35896
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "environment": { | ||
| "project": "." | ||
| } |
There was a problem hiding this comment.
Remove unsupported
environment.project config example
This example implies fastmcp install mcp-json fastmcp.json will honor environment.project, but the install path currently ignores that field: process_common_args only merges config.environment.dependencies from JSON configs (src/fastmcp/cli/install/shared.py), and install_mcp_json receives project only from the CLI --project flag (src/fastmcp/cli/install/mcp_json.py). In practice, users following this snippet will get output without --project, so the server won’t run in the intended uv project environment.
Useful? React with 👍 / 👎.
Hi there! 👋
This PR addresses #1707 by adding clearer documentation for two common uv workflows that weren't well covered in the mcp-json configuration guide:
UV-managed projects with
pyproject.toml— shows how to use--project(orfastmcp.json'senvironment.project) so users don't feel pressured to create a separaterequirements.txtjust for MCP client config.Published pip packages run with
uvx— gives concrete JSON examples for theuvxpattern that many teams use when distributing MCP servers as installable packages.What's changed
uvx" example sectiondocs/integrations/mcp-json-configuration.mdxanddocs/v2/integrations/mcp-json-configuration.mdxI hope this helps folks who publish their servers as pip packages or manage deps via
pyproject.toml. Happy to tweak anything! 😊Closes #1707