mcp

package
v0.0.244 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMCPServer

func NewMCPServer(serverCtx context.Context, process claudepkg.Prompter) *server.MCPServer

NewMCPServer returns the raw MCPServer with tools registered, for use when wrapping with custom middleware (e.g. OAuth). The serverCtx controls the lifetime of background goroutines; it should be cancelled during server shutdown.

func NewServer

func NewServer(serverCtx context.Context, process claudepkg.Prompter) *server.StreamableHTTPServer

NewServer returns a StreamableHTTPServer that serves MCP at /mcp. The serverCtx controls the lifetime of background goroutines; it should be cancelled during server shutdown.

func RegisterTools

func RegisterTools(serverCtx context.Context, s *server.MCPServer, process claudepkg.Prompter)

RegisterTools registers all MCP tools on the given server. The serverCtx controls the lifetime of background drain goroutines spawned by non-blocking prompt submissions; it should be cancelled during server shutdown to ensure goroutines are not orphaned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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