Skip to content

Add uvx and uv transport support for Python MCP servers#3

Open
radkoa wants to merge 1 commit into
pro-vi:masterfrom
radkoa:fix/uvx-transport-support
Open

Add uvx and uv transport support for Python MCP servers#3
radkoa wants to merge 1 commit into
pro-vi:masterfrom
radkoa:fix/uvx-transport-support

Conversation

@radkoa

@radkoa radkoa commented Jan 14, 2026

Copy link
Copy Markdown

Summary

  • Add UvxStdioTransport detection for uvx package commands (Python equivalent of npx)
  • Add UvStdioTransport detection for uv run script.py commands
  • Pass parent environment variables to all stdio transports (npx, uvx, uv, python)
    • This ensures credentials set via env in MCP client config reach upstream servers
  • Update README with Python MCP server configuration example (mcp-atlassian)
  • Add documentation about environment variable passthrough
  • Add unit tests for transport input validation

Test plan

  • All 19 tests pass (pytest -v)
  • Verified UvxStdioTransport instantiation works correctly
  • End-to-end test with mcp-atlassian via uvx - successfully loads Jira tools

Related

Fixes #2

🤖 Generated with Claude Code

- Add UvxStdioTransport for `uvx package` commands
- Add UvStdioTransport for `uv run script.py` commands
- Pass parent environment variables to all stdio transports (npx, uvx, uv, python)
  This ensures credentials set via `env` in MCP client config reach upstream servers
- Update README with Python MCP server example (mcp-atlassian)
- Add documentation about environment variable passthrough
- Add unit tests for transport input validation

Tested with mcp-atlassian via uvx - successfully loads Jira tools.

Fixes pro-vi#2

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@Finndersen Finndersen left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Would be great to get this merged! @pro-vi



async def _connect_stdio(fastmcp: Any, command: str, args: Optional[List[str]]) -> Any:
import os

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Move to top of module

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python MCP servers via uvx/uv not working - wrong transport selected

2 participants