Documentation
¶
Overview ¶
Package mock turns a recorded session into an MCP server that answers with what the real servers answered at the time. Point an agent, a test or a new policy at it and it sees the same tools and gets the same results, with nothing real behind them: no filesystem, no network, no side effects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// Strict answers a call nothing was recorded for — same tool, same
// arguments — with an error. Without it, such a call gets the next
// recorded result of the same tool.
Strict bool
// Version is advertised as the server's version.
Version string
}
Options shape the mock.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a recorded session, served.
func New ¶
New builds a mock from a session's calls and its catalog snapshot. A nil catalog — a session recorded before snapshots existed — means the tools are made up from the calls, with a schema that accepts anything.