Documentation
¶
Overview ¶
Package testserver is a small but real MCP server. It backs `make dev`, the end-to-end test and the proxy unit tests, so that agentgate is always exercised against an actual MCP implementation rather than a mock of one.
Index ¶
Constants ¶
const Name = "agentgate-echo"
Name is the implementation name the demo server reports.
Variables ¶
This section is empty.
Functions ¶
func Ended ¶ added in v0.4.0
Ended reports whether err, as a stdio server's Run returns it, only says that the client closed the connection, which is how a stdio session ends. The SDK reports the end of input inside its "server is closing" error as text, so it is recognised by its wording too.
func Hidden ¶ added in v0.4.0
Hidden spells s in Unicode tag characters, which render as nothing at all but are read by a model like any other text: the "ASCII smuggling" trick a poisoned web page uses to talk to the agent behind the user's back.
func New ¶
New returns a demo MCP server with one tool per behaviour agentgate needs to be able to handle: a plain result, a structured result, a slow call, a tool error, and a result that contains something a redaction rule should catch.
Nothing here touches the filesystem or runs a command; write_file and exec only describe what they would have done.
Types ¶
This section is empty.