go-sdk/mcp/mcp.go
Rob Findley 1204b93a85 internal/mcp: add batching support
Update the jsonrpc2 MCP framer to support both incoming and outgoing
batches. In order to achieve this, we must correlate the framed Reader
and Writer, which is not explicitly supported by the jsonrpc2 API, but
does work. A note is left to revisit the Framer interface.

Change-Id: If060cb5822da067833db20d58f5f112a0528da91
Reviewed-on: https://go-review.googlesource.com/c/tools/+/667295
Reviewed-by: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-04-22 14:39:09 -07:00

22 lines
979 B
Go

// Copyright 2025 The Go MCP SDK Authors. All rights reserved.
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
// The mcp package provides an SDK for writing model context protocol clients
// and servers. It is a work-in-progress. As of writing, it is a prototype to
// explore the design space of client/server lifecycle and binding.
//
// To get started, create an MCP client or server with [NewClient] or
// [NewServer], then add features to your client or server using Add<feature>
// methods, then connect to a peer using a [Transport] instance and a call to
// [Client.Connect] or [Server.Connect].
//
// TODO:
// - Support cancellation.
// - Support pagination.
// - Support all client/server operations.
// - Support Streamable HTTP transport.
// - Support multiple versions of the spec.
// - Implement proper JSON schema support, with both client-side and
// server-side validation..
package mcp