Update incus MCP server with enhanced functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kappa
2025-08-10 20:53:25 +09:00
parent 05fa1e110e
commit 7c4343362b
2 changed files with 13 additions and 2 deletions

View File

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

View File

@@ -132,11 +132,22 @@ class IncusServer {
const output = await execIncusCommand(command);
const instances = JSON.parse(output);
// 간단한 요약 형태로 변환하여 토큰 사용량 최적화
const summary = instances.map((instance: any) => ({
name: instance.name,
status: instance.status,
type: instance.type,
os: instance.config?.['image.os'] || 'Unknown',
ip: instance.state?.network?.eth0?.addresses?.find((addr: any) => addr.family === 'inet')?.address || 'No IP',
memory_usage: instance.state?.memory?.usage ? Math.round(instance.state.memory.usage / 1024 / 1024) + 'MB' : 'N/A',
processes: instance.state?.processes || 0
}));
return {
content: [
{
type: 'text',
text: `Found ${instances.length} instances:\n${JSON.stringify(instances, null, 2)}`,
text: `Found ${instances.length} instances:\n${JSON.stringify(summary, null, 2)}`,
},
],
};