mcp

package
v0.0.4-beta.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server wraps the official MCP SDK server with codecontext-specific tools.

func New

func New(idx *indexer.Indexer, version string) *Server

New creates a new MCP server with all codecontext tools registered.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the Streamable HTTP handler for the MCP endpoint. Use this to mount /mcp on a shared mux (e.g. with the web UI).

func (*Server) Inner

func (s *Server) Inner() *mcpsdk.Server

Inner returns the underlying MCP SDK server for direct transport use.

func (*Server) ListenHTTP

func (s *Server) ListenHTTP(addr string) error

ListenHTTP starts an HTTP MCP server using the official SDK's Streamable HTTP handler.

func (*Server) SetLogger

func (s *Server) SetLogger(l *slog.Logger)

SetLogger replaces the default logger.

Jump to

Keyboard shortcuts

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