Skip to content

Fix: Use absolute path to uv executable when installing MCP server (closes #478) #481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

rossheat
Copy link

Fix Claude Desktop MCP server startup failures by using absolute path to uv executable

Motivation and Context

This change fixes issue #478 where MCP servers fail to start in Claude Desktop with "spawn uv ENOENT" errors. The problem occurs because the MCP SDK hardcodes "uv" as the command without using the full path, and Claude Desktop can't find the executable in its PATH when launched.

How Has This Been Tested?

Tested by installing an MCP server with the modified code and verifying that Claude Desktop can start it without ENOENT errors. Also verified that it falls back gracefully when the uv path can't be determined.

Breaking Changes

None. This is a strictly internal improvement that requires no changes from users.

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
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

The change adds a find_uv_path() utility function that tries to locate the full path to the uv executable using platform-appropriate commands (which on Unix-like systems, where on Windows). If the path is found, it's used in the command configuration; otherwise, it falls back to the current behavior.

@ihrpr ihrpr added this to the r-05-25 milestone Apr 29, 2025
@ihrpr
Copy link
Contributor

ihrpr commented May 8, 2025

thank you! closing as it's duplicate #440

@ihrpr ihrpr closed this May 8, 2025
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.

2 participants