(name: string, server: ScopedMcpServerConfig)
| 24 | import { getPlatform } from '../../utils/platform.js'; |
| 25 | import { cliError, cliOk } from '../exit.js'; |
| 26 | async function checkMcpServerHealth(name: string, server: ScopedMcpServerConfig): Promise<string> { |
| 27 | try { |
| 28 | const result = await connectToServer(name, server); |
| 29 | if (result.type === 'connected') { |
| 30 | return '✓ Connected'; |
| 31 | } else if (result.type === 'needs-auth') { |
| 32 | return '! Needs authentication'; |
| 33 | } else { |
| 34 | return '✗ Failed to connect'; |
| 35 | } |
| 36 | } catch (_error) { |
| 37 | return '✗ Connection error'; |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | // mcp serve (lines 4512–4532) |
| 42 | export async function mcpServeHandler({ |
no outgoing calls
no test coverage detected