Documentation
¶
Overview ¶
Package mcptest provides helpers to drive a registered MCP server over the SDK's in-memory transport, for end-to-end tool tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSession ¶
NewSession connects an in-memory client to s and returns the client session. The server connects on a background goroutine; the session is closed via tb.Cleanup. The client advertises no elicitation capability, so elicitation-gated write tools fail — use NewSessionWithElicitation for those.
func NewSessionWithElicitation ¶
func NewSessionWithElicitation( tb testing.TB, s *mcp.Server, handler func( context.Context, *mcp.ElicitRequest, ) (*mcp.ElicitResult, error), ) *mcp.ClientSession
NewSessionWithElicitation is like NewSession but wires handler as the client's elicitation handler, advertising the capability so write tools registered via toolkit.AddWrite can complete.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.