Skip to content

docs: add uv-managed dependencies and uvx examples to mcp-json configuration#3843

Merged
jlowin merged 2 commits intoPrefectHQ:mainfrom
vincent067:docs/uv-uvx-mcp-json-config
Apr 12, 2026
Merged

docs: add uv-managed dependencies and uvx examples to mcp-json configuration#3843
jlowin merged 2 commits intoPrefectHQ:mainfrom
vincent067:docs/uv-uvx-mcp-json-config

Conversation

@vincent067
Copy link
Copy Markdown
Contributor

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:

  1. UV-managed projects with pyproject.toml — shows how to use --project (or fastmcp.json's environment.project) so users don't feel pressured to create a separate requirements.txt just for MCP client config.

  2. Published pip packages run with uvx — gives concrete JSON examples for the uvx pattern that many teams use when distributing MCP servers as installable packages.

What's changed

  • Added "UV-Managed Project Dependencies" example section
  • Added "Published Packages with uvx" example section
  • Mirrored the changes in both docs/integrations/mcp-json-configuration.mdx and docs/v2/integrations/mcp-json-configuration.mdx

I hope this helps folks who publish their servers as pip packages or manage deps via pyproject.toml. Happy to tweak anything! 😊


Closes #1707

…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
@marvin-context-protocol marvin-context-protocol Bot added documentation Updates to docs, examples, or guides. Primary change is documentation-related. fastmcp.json Functionality related to fastmcp.json or FastMCPConfig files. labels Apr 11, 2026
Copy link
Copy Markdown
Member

@jlowin jlowin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition — verified --project output matches reality, and the uvx variants cover the common cases. Thanks!

@jlowin jlowin merged commit 673e6bb into PrefectHQ:main Apr 12, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +395 to +397
"environment": {
"project": "."
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Updates to docs, examples, or guides. Primary change is documentation-related. fastmcp.json Functionality related to fastmcp.json or FastMCPConfig files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

please clarify in docs how to configure mcp-json for uv managed dependencies and for pip packages run with uvx

2 participants