Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/test/mcp/src/stdio.ts
3520 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
6
import { getServer } from './multiplex';
7
8
const transport: StdioServerTransport = new StdioServerTransport();
9
(async () => {
10
const server = await getServer();
11
await server.connect(transport);
12
})().catch(err => {
13
transport.close();
14
console.error('Error occurred while connecting to server:', err);
15
process.exit(1);
16
});
17
18