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) <noreply@anthropic.com>
This commit is contained in:
2026-03-15 23:41:24 -04:00
parent 3d0eed4f17
commit f0c3ad1f54
2 changed files with 23 additions and 5 deletions

View File

@@ -23,6 +23,18 @@ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that wr
## Installation ## 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 ### From source
```bash ```bash
@@ -49,8 +61,8 @@ Add to your `claude_desktop_config.json`:
{ {
"mcpServers": { "mcpServers": {
"virtfusion": { "virtfusion": {
"command": "node", "command": "npx",
"args": ["/path/to/virtfusion-mcp/dist/index.js"], "args": ["-y", "git+https://git.ezscale.cloud/EZSCALE/virtfusion-mcp.git"],
"env": { "env": {
"VIRTFUSION_API_URL": "https://cp.example.com/api/v1", "VIRTFUSION_API_URL": "https://cp.example.com/api/v1",
"VIRTFUSION_API_TOKEN": "your-api-token" "VIRTFUSION_API_TOKEN": "your-api-token"
@@ -63,7 +75,7 @@ Add to your `claude_desktop_config.json`:
### Claude Code ### Claude Code
```bash ```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_URL=https://cp.example.com/api/v1 \
-e VIRTFUSION_API_TOKEN=your-api-token -e VIRTFUSION_API_TOKEN=your-api-token
``` ```
@@ -76,8 +88,8 @@ Add to your `.vscode/mcp.json`:
{ {
"servers": { "servers": {
"virtfusion": { "virtfusion": {
"command": "node", "command": "npx",
"args": ["/path/to/virtfusion-mcp/dist/index.js"], "args": ["-y", "git+https://git.ezscale.cloud/EZSCALE/virtfusion-mcp.git"],
"env": { "env": {
"VIRTFUSION_API_URL": "https://cp.example.com/api/v1", "VIRTFUSION_API_URL": "https://cp.example.com/api/v1",
"VIRTFUSION_API_TOKEN": "your-api-token" "VIRTFUSION_API_TOKEN": "your-api-token"

View File

@@ -7,8 +7,14 @@
"bin": { "bin": {
"virtfusion-mcp": "dist/index.js" "virtfusion-mcp": "dist/index.js"
}, },
"files": [
"dist",
"README.md",
"LICENSE"
],
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"prepare": "npm run build",
"start": "node dist/index.js", "start": "node dist/index.js",
"dev": "tsx src/index.ts", "dev": "tsx src/index.ts",
"extract-endpoints": "tsx scripts/extract-endpoints.ts", "extract-endpoints": "tsx scripts/extract-endpoints.ts",