UNPKG

genkit-cli

Version:

CLI for interacting with the Google Genkit AI framework

24 lines 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mcp = void 0; const utils_1 = require("@genkit-ai/tools-common/utils"); const commander_1 = require("commander"); const server_1 = require("../mcp/server"); exports.mcp = new commander_1.Command('mcp') .option('--project-root [projectRoot]', 'Project root') .option('-d, --debug [path]', 'debug to file') .option('--timeout [timeout]', 'Timeout for runtime to start (ms). Default 30000.') .option('--explicitProjectRoot', 'Whether runtime dependent tools need projectRoot specified. Needed for use with Google Antigravity', false) .description('run MCP stdio server (EXPERIMENTAL, subject to change)') .action(async (options) => { (0, utils_1.forceStderr)(); if (options.debug) { (0, utils_1.debugToFile)(typeof options.debug === 'string' ? options.debug : undefined); } await (0, server_1.startMcpServer)({ projectRoot: options.projectRoot ?? (await (0, utils_1.findProjectRoot)()), explicitProjectRoot: options.explicitProjectRoot ?? false, timeout: options.timeout ? parseInt(options.timeout, 10) : undefined, }); }); //# sourceMappingURL=mcp.js.map