Problem
When using mcp-filter to wrap Python-based MCP servers launched via uvx (e.g., mcp-atlassian), the filter fails to discover any tools. The upstream server starts but returns 0 tools.
Root Cause
In src/mcp_filter/upstream.py, the _connect_stdio() function detects transport type based on the command:
npx → NpxStdioTransport ✅
python or .py → PythonStdioTransport ✅
- Everything else →
NodeStdioTransport ❌
The problem is that uvx (Python package runner, similar to npx for Python) falls into the "everything else" category and incorrectly uses NodeStdioTransport, which doesn't work properly with Python MCP servers.
Expected Behavior
Commands like:
mcp-filter run -t stdio --stdio-command uvx --stdio-arg mcp-atlassian ...
Should use FastMCP's UvxStdioTransport (which exists and works correctly).
Environment
- FastMCP provides both
UvxStdioTransport and UvStdioTransport for this purpose
- Verified by checking available transports:
from fastmcp.client import *
# Available: NpxStdioTransport, PythonStdioTransport, UvxStdioTransport, UvStdioTransport, ...
Affected Use Cases
Any Python-based MCP server that users want to filter:
- mcp-atlassian
- Other Python MCP servers installed via pip/uv
Suggested Fix
Add detection for uvx and uv commands in _connect_stdio():
elif command == "uvx":
transport = UvxStdioTransport(tool_name=args[0], tool_args=args[1:])
elif command == "uv":
# Handle "uv run script.py" pattern
transport = UvStdioTransport(command=args[1], args=args[2:])
Problem
When using mcp-filter to wrap Python-based MCP servers launched via
uvx(e.g.,mcp-atlassian), the filter fails to discover any tools. The upstream server starts but returns 0 tools.Root Cause
In
src/mcp_filter/upstream.py, the_connect_stdio()function detects transport type based on the command:npx→NpxStdioTransport✅pythonor.py→PythonStdioTransport✅NodeStdioTransport❌The problem is that
uvx(Python package runner, similar tonpxfor Python) falls into the "everything else" category and incorrectly usesNodeStdioTransport, which doesn't work properly with Python MCP servers.Expected Behavior
Commands like:
Should use FastMCP's
UvxStdioTransport(which exists and works correctly).Environment
UvxStdioTransportandUvStdioTransportfor this purposeAffected Use Cases
Any Python-based MCP server that users want to filter:
Suggested Fix
Add detection for
uvxanduvcommands in_connect_stdio():