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:
22
README.md
22
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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user