Documentation
¶
Overview ¶
Package server provides the MCP server implementation for the OpenStreetMap integration.
Index ¶
Constants ¶
const ( // ServerName is the name of the MCP server ServerName = "osm-mcp-server" // ServerVersion is the version of the MCP server ServerVersion = "0.1.0" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler represents the HTTP server handler
func NewHandler ¶
NewHandler creates a new server handler
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server encapsulates the MCP server with OpenStreetMap tools.
func (*Server) Run ¶
Run starts the MCP server using stdin/stdout for communication. This method blocks until the server is stopped or an error occurs.
func (*Server) RunWithContext ¶
RunWithContext starts the MCP server and allows for graceful shutdown via context. This method blocks until the context is canceled or an error occurs.
func (*Server) Shutdown ¶
func (s *Server) Shutdown()
Shutdown initiates a graceful shutdown of the server. It does not block and returns immediately. Using sync.Once to ensure we don't close an already closed channel.
func (*Server) WaitForShutdown ¶
func (s *Server) WaitForShutdown()
WaitForShutdown blocks until the server has fully shut down.