mcp: NewClient and NewServer take Implementation (#113)
Change the name and version arguments to NewClient and NewServer to a `*Implementation`, to future-proof against the spec. Fixes #109.
This commit is contained in:
parent
b4febf129b
commit
6c6243c0b0
1 changed files with 76 additions and 69 deletions
|
|
@ -17,7 +17,7 @@ func main() {
|
|||
ctx := context.Background()
|
||||
|
||||
// Create a new client, with no features.
|
||||
client := mcp.NewClient("mcp-client", "v1.0.0", nil)
|
||||
client := mcp.NewClient(&mcp.Implementation{Name: "mcp-client", Version: "v1.0.0"}, nil)
|
||||
|
||||
// Connect to a server over stdin/stdout
|
||||
transport := mcp.NewCommandTransport(exec.Command("myserver"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue