MCPcopy Index your code
hub / github.com/codeaashu/claude-code / checkMcpServerHealth

Function checkMcpServerHealth

src/cli/handlers/mcp.tsx:26–39  ·  view source on GitHub ↗
(name: string, server: ScopedMcpServerConfig)

Source from the content-addressed store, hash-verified

24import { getPlatform } from '../../utils/platform.js';
25import { cliError, cliOk } from '../exit.js';
26async 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)
42export async function mcpServeHandler({

Callers 2

mcpListHandlerFunction · 0.85
mcpGetHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected