fix(traffic-route): fix build failure and import path in Python MCP server#404
Open
Alex-eng-ux wants to merge 1 commit into
Open
fix(traffic-route): fix build failure and import path in Python MCP server#404Alex-eng-ux wants to merge 1 commit into
Alex-eng-ux wants to merge 1 commit into
Conversation
…rt path - Remove `readme = "../README.md"` from pyproject.toml to fix DistutilsOptionError when building via uvx - Fix server.py: wrong import path `vcloud.veenedge.mcp_server` should be `vcloud.traffic_route.mcp_server` - Fix server.py: replace `asyncio.run(mcp.run())` with `mcp.run()` for compatibility with newer MCP SDK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix two issues in the TrafficRoute Python MCP server that prevent it from building and running correctly.
Changes
1. pyproject.toml - Fix build failure with uvx
The
readme = "../README.md"references a file in the parent directory. When building viauvx --from git+..., setuptools's security check blocks access to files outside the package directory, causingDistutilsOptionError.Fix: Remove the
readmefield. The package can still be documented via other means.2. server.py - Fix import path and run method
from vcloud.veenedge.mcp_server import create_mcp_server— the modulevcloud.veenedgedoes not exist. The correct import isfrom vcloud.traffic_route.mcp_server import create_mcp_server.asyncio.run(mcp.run())fails withTypeError: An asyncio.Future, a coroutine or an awaitable is requiredon newer MCP SDK versions. Changed tomcp.run()which works correctly.Testing
Tested locally with
uvx --from <local_path> mcp-server-traffic-route— the server starts successfully and accepts MCP stdio protocol connections.