Compare commits

...

2 Commits

Author SHA1 Message Date
kappa
868141876e Enable npx execution for MCP server
Remove import.meta.url entry point guard that prevented npx from
invoking main(), and bump version to 0.1.7.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 22:35:43 +09:00
kappa
31d0e9b97f Fix npm package deployment and usage documentation
🔧 Resolve npmjs deployment issue:
- Add npm global installation guide (npm install -g @ironclads/incus-mcp)
- Update Claude Desktop configuration with two options
- Fix mcp-config-example.json to use global binary
- Update CLAUDE.md with correct remote server list (removed lambda)

 npm package now works correctly with global installation
📚 Documentation updated with clear installation options

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 21:53:37 +09:00
6 changed files with 49 additions and 11 deletions

View File

@@ -56,8 +56,8 @@ The `.claude/settings.local.json` file enables all configured MCP servers for Cl
### Remote Server Support ### Remote Server Support
The server automatically works with all configured Incus remotes: The server automatically works with all configured Incus remotes:
- **remote1**: Example primary remote server - **jp1**: Japan remote server (100.109.123.1:8443)
- **remote2**: Example secondary remote server - **kr1**: Korea remote server (100.84.111.28:8443)
- **local**: Local Incus daemon - **local**: Local Incus daemon
- **images**: LinuxContainers.org image server - **images**: LinuxContainers.org image server
- **docker**: Docker Hub OCI registry - **docker**: Docker Hub OCI registry

View File

@@ -36,6 +36,16 @@ Seamlessly works with all your configured Incus remotes:
## 🚀 Quick Start ## 🚀 Quick Start
### Installation from NPM (Recommended)
```bash
# Global installation (recommended for Claude Desktop)
npm install -g @ironclads/incus-mcp
# Verify installation
incus-mcp --version
which incus-mcp
```
### Installation from Source ### Installation from Source
```bash ```bash
# Clone the repository # Clone the repository
@@ -78,6 +88,21 @@ npm start
Add to your Claude Desktop MCP configuration (`~/.config/claude-desktop/config.json`): Add to your Claude Desktop MCP configuration (`~/.config/claude-desktop/config.json`):
#### Option 1: Using Global NPM Installation (Recommended)
```json
{
"mcpServers": {
"incus": {
"command": "incus-mcp",
"env": {
"PATH": "/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin"
}
}
}
}
```
#### Option 2: Using Local Installation
```json ```json
{ {
"mcpServers": { "mcpServers": {

View File

@@ -1,8 +1,7 @@
{ {
"mcpServers": { "mcpServers": {
"incus": { "incus": {
"command": "node", "command": "incus-mcp",
"args": ["/Users/kaffa/mcp-servers/incus-mcp/build/index.js"],
"env": { "env": {
"PATH": "/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin" "PATH": "/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin"
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ironclads/incus-mcp", "name": "@ironclads/incus-mcp",
"version": "0.1.6", "version": "0.1.7",
"description": "MCP server for Incus container management", "description": "MCP server for Incus container management",
"main": "build/index.js", "main": "build/index.js",
"type": "module", "type": "module",

View File

@@ -343,9 +343,7 @@ async function main() {
await server.run(); await server.run();
} }
if (import.meta.url === `file://${process.argv[1]}`) { main().catch((error) => {
main().catch((error) => { console.error('Server error:', error);
console.error('Server error:', error); process.exit(1);
process.exit(1); });
});
}

16
test-npmjs/package.json Normal file
View File

@@ -0,0 +1,16 @@
{
"name": "test-npmjs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "commonjs",
"dependencies": {
"@ironclads/incus-mcp": "^0.1.6"
}
}