Skip to content

Conversation

robinroy03
Copy link

Motivation and Context

Solved #25. Earlier when the user did a command like uv run client.py "C:\Users\Robin Roy\Desktop\quickstart-resources\weather-server-python\weather.py" it'll throw ModuleNotFoundError because the spawned process was unable to use the .venv libs. I modified uv to use the libs.

How Has This Been Tested?

I tested it locally for the problems #23 and #24.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally (no tests)
  • I have added appropriate error handling
  • I have added or updated documentation as needed

@robinroy03 robinroy03 mentioned this pull request Apr 29, 2025
@a-akimov
Copy link
Collaborator

@robinroy03 Thank you for your contribution! I see that currently this PR has changes that are related to the proposed "module not found" fix, as well as general formatting changes across the python client file. To make it easier for reviewers to review and accept your changes, and also for the history, could you please split this PR into 2: one with a fix, and another one with formatting changes?

@robinroy03 robinroy03 requested a review from dsp-ant September 30, 2025 14:13
path = Path(server_script_path).resolve()
server_params = StdioServerParameters(
command="uv",
args=["--directory", path.parent, "run", path.name],
Copy link
Collaborator

Choose a reason for hiding this comment

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

@robinroy03 currently this example fails because path.parent should be a string. Suggest changing to:

args=["--directory", str(path.parent), "run", path.name],

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.

3 participants