MCPcopy Create free account
hub / github.com/modelcontextprotocol/go-sdk / handler

Interface handler

mcp/transport.go:158–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158type handler interface {
159 handle(ctx context.Context, req *jsonrpc.Request) (any, error)
160}
161
162// connect wires a transport to a binder. logger must be non-nil; it receives
163// jsonrpc2 internal errors that would otherwise be dropped (see #218).

Callers 2

readResourceMethod · 0.85
mainFunction · 0.85

Implementers 3

ServerSessionmcp/server.go
LoggingHandlermcp/logging.go
ClientSessionmcp/client.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…