Discover Packages
github.com/vaayne/mcphub
internal
testserver
package
Version:
v0.2.4
Opens a new window with list of versions in this module.
Published: Mar 13, 2026
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package testserver provides a simple MCP test server for automated testing.
It can run as either stdio or HTTP server.
StartHTTP starts the test server as HTTP and returns the URL.
The server is automatically stopped when the test completes.
StdioCmd returns the command and args needed to run the test server in stdio mode.
This requires the testserver binary to be built first (go build ./cmd/testserver).
The returned command can be used with config.MCPServer.
Server is a simple MCP test server with predefined tools.
New creates a new test server with predefined tools.
RunHTTP runs the server as an HTTP server on the given address.
Returns the actual address the server is listening on.
RunStdio runs the server using stdio transport.
This is typically called from a test binary or main function.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.