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:
Jonathan Amsterdam 2025-07-10 16:57:38 -04:00 • committed by GitHub
commit 6c6243c0b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,7 +40,7 @@ func main() {
// Create the MCP Server instance and assign the handler.
// No server running, just showing the configuration.
_ = mcp.NewServer("myServer", "v1.0.0", &mcp.ServerOptions{
_ = mcp.NewServer(&mcp.Implementation{Name: "server"}, &mcp.ServerOptions{
CompletionHandler: myCompletionHandler,
})