Documentation
¶
Overview ¶
Package server2 implements a simple MCP server that implements a few tools - The "hello_world" tool from the library sample - A "time" tool that returns the current time - A "slow" tool that waits N seconds, notifying the client of progress - A "headers" tool that returns all HTTP headers it received
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunServer ¶
func RunServer(transport, port string, streamOpts ...server.StreamableHTTPOption) (StartupFunc, ShutdownFunc, error)
RunServer create a server that can be started and stopped
Types ¶
type ShutdownFunc ¶
type ShutdownFunc func() error
ShutdownFunc is used for functions that stop running servers
type StartupFunc ¶
type StartupFunc func() error
StartupFunc is used for functions that will start a server and block until it is finished
Click to show internal directories.
Click to hide internal directories.