feat: interactive MCP console (mcpctl console <project>)
Ink-based TUI that shows exactly what an LLM sees through MCP. Browse tools/resources/prompts, execute them, and see raw JSON-RPC traffic in a protocol log. Supports gated session flow with begin_session, raw JSON-RPC input, and session reconnect. - McpSession class wrapping HTTP transport with typed methods - 12 React/Ink components (header, protocol-log, menu, tool/resource/prompt views, etc.) - 21 unit tests for McpSession against a mock MCP server - Fish + Bash completions with project name argument - bun compile with --external react-devtools-core Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ import { createLoginCommand, createLogoutCommand } from './commands/auth.js';
|
||||
import { createAttachServerCommand, createDetachServerCommand, createApproveCommand } from './commands/project-ops.js';
|
||||
import { createMcpCommand } from './commands/mcp.js';
|
||||
import { createPatchCommand } from './commands/patch.js';
|
||||
import { createConsoleCommand } from './commands/console/index.js';
|
||||
import { ApiClient, ApiError } from './api-client.js';
|
||||
import { loadConfig } from './config/index.js';
|
||||
import { loadCredentials } from './auth/index.js';
|
||||
@@ -173,6 +174,10 @@ export function createProgram(): Command {
|
||||
getProject: () => program.opts().project as string | undefined,
|
||||
}), { hidden: true });
|
||||
|
||||
program.addCommand(createConsoleCommand({
|
||||
getProject: () => program.opts().project as string | undefined,
|
||||
}));
|
||||
|
||||
return program;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user