251220:1705 On going update to 1.7.0: Revise Schema
Some checks failed
Spec Validation / validate-markdown (push) Has been cancelled
Spec Validation / validate-diagrams (push) Has been cancelled
Spec Validation / check-todos (push) Has been cancelled

This commit is contained in:
admin
2025-12-20 17:05:08 +07:00
parent c5d39c8605
commit 9ab41058d8
7 changed files with 2350 additions and 2503 deletions

32
scripts/start-mcp.js Normal file
View File

@@ -0,0 +1,32 @@
// scripts/start-mcp.js
const { spawn } = require('child_process');
const path = require('path');
const os = require('os');
// Resolve the external config file (outside the repo)
const configPath = path.resolve(os.homedir(), '.gemini', 'antigravity', 'mcp_config.json');
// Load the JSON config (will throw if invalid)
const config = require(configPath);
function runServer(name, command, args, env = {}) {
console.log(`▶️ Starting ${name}`);
const fullCmd = process.platform === 'win32' ? `${command}.cmd` : command;
const proc = spawn(fullCmd, args, {
stdio: 'inherit',
env: { ...process.env, ...env },
cwd: process.cwd(),
shell: true,
});
proc.on('close', (code) => {
if (code !== 0) {
console.error(`${name} exited with code ${code}`);
} else {
console.log(`${name} finished`);
}
});
}
Object.entries(config.mcpServers).forEach(([name, srv]) => {
runServer(name, srv.command, srv.args, srv.env);
});