From 1d790aad469f5ff35a025af665b678ff7e8ec6d5 Mon Sep 17 00:00:00 2001 From: Prophet731 Date: Sun, 15 Mar 2026 23:41:24 -0400 Subject: [PATCH] feat: support npx install from git URL Add prepare script so TypeScript compiles automatically when installed via git. Update README and MCP client config examples to use git+https://git.ezscale.cloud/EZSCALE/virtfusion-mcp.git URLs. Co-Authored-By: Claude Opus 4.6 (1M context) --- README.md | 22 +++++++++++++++++----- package.json | 6 ++++++ 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index dfdb63a..5a3ce60 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,18 @@ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that wr ## Installation +### Via npx (no install needed) + +```bash +npx git+https://git.ezscale.cloud/EZSCALE/virtfusion-mcp.git +``` + +### Global install + +```bash +npm install -g git+https://git.ezscale.cloud/EZSCALE/virtfusion-mcp.git +``` + ### From source ```bash @@ -49,8 +61,8 @@ Add to your `claude_desktop_config.json`: { "mcpServers": { "virtfusion": { - "command": "node", - "args": ["/path/to/virtfusion-mcp/dist/index.js"], + "command": "npx", + "args": ["-y", "git+https://git.ezscale.cloud/EZSCALE/virtfusion-mcp.git"], "env": { "VIRTFUSION_API_URL": "https://cp.example.com/api/v1", "VIRTFUSION_API_TOKEN": "your-api-token" @@ -63,7 +75,7 @@ Add to your `claude_desktop_config.json`: ### Claude Code ```bash -claude mcp add virtfusion -- node /path/to/virtfusion-mcp/dist/index.js \ +claude mcp add virtfusion -- npx -y git+https://git.ezscale.cloud/EZSCALE/virtfusion-mcp.git \ -e VIRTFUSION_API_URL=https://cp.example.com/api/v1 \ -e VIRTFUSION_API_TOKEN=your-api-token ``` @@ -76,8 +88,8 @@ Add to your `.vscode/mcp.json`: { "servers": { "virtfusion": { - "command": "node", - "args": ["/path/to/virtfusion-mcp/dist/index.js"], + "command": "npx", + "args": ["-y", "git+https://git.ezscale.cloud/EZSCALE/virtfusion-mcp.git"], "env": { "VIRTFUSION_API_URL": "https://cp.example.com/api/v1", "VIRTFUSION_API_TOKEN": "your-api-token" diff --git a/package.json b/package.json index e6fee8f..d79a3eb 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,14 @@ "bin": { "virtfusion-mcp": "dist/index.js" }, + "files": [ + "dist", + "README.md", + "LICENSE" + ], "scripts": { "build": "tsc", + "prepare": "npm run build", "start": "node dist/index.js", "dev": "tsx src/index.ts", "extract-endpoints": "tsx scripts/extract-endpoints.ts",