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
|
|
@ -16,7 +16,7 @@ var nextProgressToken atomic.Int64
|
|||
// This middleware function adds a progress token to every outgoing request
|
||||
// from the client.
|
||||
func Example_progressMiddleware() {
|
||||
c := mcp.NewClient("test", "v1", nil)
|
||||
c := mcp.NewClient(testImpl, nil)
|
||||
c.AddSendingMiddleware(addProgressToken[*mcp.ClientSession])
|
||||
_ = c
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue