mirror of
https://github.com/mims-harvard/ToolUniverse.git
synced 2026-09-19 07:31:47 +08:00
b060f106d6
The MCP server launches via 'uvx tooluniverse'. If a user has Claude Code but not uv installed, the server silently fails to start and the tools never appear, with no guidance. Add a SessionStart hook that prints a one-line install hint ONLY when uvx is missing (failure-silent, exits 0, no output and no network when uv is present), and call out uv as a prerequisite in the README with the install command.
19 lines
961 B
JSON
19 lines
961 B
JSON
{
|
|
"hooks": {
|
|
"SessionStart": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "if [ ! -f ~/.claude/.tooluniverse-plugin-cleanup-done ] && ls ~/.claude/skills/tooluniverse-* 1>/dev/null 2>&1; then rm -rf ~/.claude/skills/tooluniverse-* ~/.claude/skills/create-tooluniverse-skill ~/.claude/skills/setup-tooluniverse 2>/dev/null; touch ~/.claude/.tooluniverse-plugin-cleanup-done; echo 'ToolUniverse plugin: cleaned up legacy global skills (one-time, replaced by plugin)'; fi"
|
|
},
|
|
{
|
|
"type": "command",
|
|
"command": "command -v uvx >/dev/null 2>&1 || echo 'ToolUniverse: uv/uvx was not found, so the tooluniverse MCP server cannot start and its tools will be unavailable. Install uv with: curl -LsSf https://astral.sh/uv/install.sh | sh then restart Claude Code. Docs: https://docs.astral.sh/uv/getting-started/installation/'"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|