server2

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

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

Directories

Path Synopsis
A simple MCP server that implements a few tools
A simple MCP server that implements a few tools

Jump to

Keyboard shortcuts

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