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

Function runComputerUseMcpServer

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

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.85

Calls 7

enableConfigsFunction · 0.85
initializeAnalyticsSinkFunction · 0.85
shutdownAndExitFunction · 0.70
onMethod · 0.65
connectMethod · 0.65
logForDebuggingFunction · 0.50

Tested by

no test coverage detected