@@ -922,11 +922,12 @@ program
922922 await server . start ( ) ;
923923 // Server will run until terminated
924924 } else {
925- // Default: show info about MCP mode
926- console . log ( chalk . bold ( '\nCodeGraph MCP Server\n' ) ) ;
927- info ( 'Use --mcp flag to start the MCP server' ) ;
928- console . log ( '\nTo use with Claude Code, add to your MCP configuration:' ) ;
929- console . log ( chalk . dim ( `
925+ // Default: show info about MCP mode.
926+ // Use stderr so stdout stays clean for any piped/stdio usage.
927+ console . error ( chalk . bold ( '\nCodeGraph MCP Server\n' ) ) ;
928+ console . error ( chalk . blue ( 'ℹ' ) + ' Use --mcp flag to start the MCP server' ) ;
929+ console . error ( '\nTo use with Claude Code, add to your MCP configuration:' ) ;
930+ console . error ( chalk . dim ( `
930931{
931932 "mcpServers": {
932933 "codegraph": {
@@ -936,15 +937,15 @@ program
936937 }
937938}
938939` ) ) ;
939- console . log ( 'Available tools:' ) ;
940- console . log ( chalk . cyan ( ' codegraph_search' ) + ' - Search for code symbols' ) ;
941- console . log ( chalk . cyan ( ' codegraph_context' ) + ' - Build context for a task' ) ;
942- console . log ( chalk . cyan ( ' codegraph_callers' ) + ' - Find callers of a symbol' ) ;
943- console . log ( chalk . cyan ( ' codegraph_callees' ) + ' - Find what a symbol calls' ) ;
944- console . log ( chalk . cyan ( ' codegraph_impact' ) + ' - Analyze impact of changes' ) ;
945- console . log ( chalk . cyan ( ' codegraph_node' ) + ' - Get symbol details' ) ;
946- console . log ( chalk . cyan ( ' codegraph_files' ) + ' - Get project file structure' ) ;
947- console . log ( chalk . cyan ( ' codegraph_status' ) + ' - Get index status' ) ;
940+ console . error ( 'Available tools:' ) ;
941+ console . error ( chalk . cyan ( ' codegraph_search' ) + ' - Search for code symbols' ) ;
942+ console . error ( chalk . cyan ( ' codegraph_context' ) + ' - Build context for a task' ) ;
943+ console . error ( chalk . cyan ( ' codegraph_callers' ) + ' - Find callers of a symbol' ) ;
944+ console . error ( chalk . cyan ( ' codegraph_callees' ) + ' - Find what a symbol calls' ) ;
945+ console . error ( chalk . cyan ( ' codegraph_impact' ) + ' - Analyze impact of changes' ) ;
946+ console . error ( chalk . cyan ( ' codegraph_node' ) + ' - Get symbol details' ) ;
947+ console . error ( chalk . cyan ( ' codegraph_files' ) + ' - Get project file structure' ) ;
948+ console . error ( chalk . cyan ( ' codegraph_status' ) + ' - Get index status' ) ;
948949 }
949950 } catch ( err ) {
950951 captureException ( err ) ;
0 commit comments