testserver

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2026 License: GPL-3.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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

func Ended(err error) bool

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

func Hidden(s string) string

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

func New() *mcp.Server

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL