Skip to content

Commit e4d43cb

Browse files
Merge pull request modelcontextprotocol#482 from DongHuiTiao/fix-docs
docs(typescript-quickstart): ensure proper async handling in Node.js MCP client demo
2 parents d5d83d4 + c775464 commit e4d43cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/quickstart/client.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ async connectToServer(serverScriptPath: string) {
598598
command,
599599
args: [serverScriptPath],
600600
});
601-
this.mcp.connect(this.transport);
601+
await this.mcp.connect(this.transport);
602602

603603
const toolsResult = await this.mcp.listTools();
604604
this.tools = toolsResult.tools.map((tool) => {

0 commit comments

Comments
 (0)