Skip to content

Commit 260771e

Browse files
committed
update readme
1 parent 578446a commit 260771e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func main() {
7373
client := mcp.NewClient(&mcp.Implementation{Name: "mcp-client", Version: "v1.0.0"}, nil)
7474

7575
// Connect to a server over stdin/stdout
76-
transport := mcp.NewCommandTransport(exec.Command("myserver"))
76+
transport := &mcp.CommandTransport{Command: exec.Command("myserver")}
7777
session, err := client.Connect(ctx, transport, nil)
7878
if err != nil {
7979
log.Fatal(err)
@@ -127,7 +127,7 @@ func main() {
127127

128128
mcp.AddTool(server, &mcp.Tool{Name: "greet", Description: "say hi"}, SayHi)
129129
// Run the server over stdin/stdout, until the client disconnects
130-
if err := server.Run(context.Background(), mcp.NewStdioTransport()); err != nil {
130+
if err := server.Run(context.Background(), &mcp.StdioTransport{}); err != nil {
131131
log.Fatal(err)
132132
}
133133
}

0 commit comments

Comments
 (0)