MCPcopy
hub / github.com/codeaashu/claude-code / runComputerUseMcpServer

Function runComputerUseMcpServer

src/utils/computerUse/mcpServer.ts:85–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83 * flush analytics before exit.
84 */
85export async function runComputerUseMcpServer(): Promise<void> {
86 enableConfigs()
87 initializeAnalyticsSink()
88
89 const server = await createComputerUseMcpServerForCli()
90 const transport = new StdioServerTransport()
91
92 let exiting = false
93 const shutdownAndExit = async (): Promise<void> => {
94 if (exiting) return
95 exiting = true
96 await Promise.all([shutdown1PEventLogging(), shutdownDatadog()])
97 // eslint-disable-next-line custom-rules/no-process-exit
98 process.exit(0)
99 }
100 process.stdin.on('end', () => void shutdownAndExit())
101 process.stdin.on('error', () => void shutdownAndExit())
102
103 logForDebugging('[Computer Use MCP] Starting MCP server')
104 await server.connect(transport)
105 logForDebugging('[Computer Use MCP] MCP server started')
106}
107

Callers 1

mainFunction · 0.85

Calls 7

enableConfigsFunction · 0.85
initializeAnalyticsSinkFunction · 0.85
logForDebuggingFunction · 0.85
onMethod · 0.80
shutdownAndExitFunction · 0.70
connectMethod · 0.45

Tested by

no test coverage detected