-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
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✅- 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
UvxStdioTransportandUvStdioTransportfor 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:])Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels