Documentation
¶
Overview ¶
Package server implements the MCP server functionality for Elasticsearch integration. It provides both stdio and Streamable HTTP protocol support for the Model Context Protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElasticsearchMCPServer ¶
type ElasticsearchMCPServer struct {
// contains filtered or unexported fields
}
ElasticsearchMCPServer represents the main MCP server for Elasticsearch operations
func NewElasticsearchMCPServer ¶
func NewElasticsearchMCPServer(cfg *config.Config) (*ElasticsearchMCPServer, error)
NewElasticsearchMCPServer creates a new instance of the Elasticsearch MCP server with the provided configuration. It initializes the Elasticsearch client, creates the tools collection, and sets up the MCP server with all tools registered.
func (*ElasticsearchMCPServer) GetInfo ¶
func (s *ElasticsearchMCPServer) GetInfo() map[string]interface{}
GetInfo returns information about the server configuration and status. This can be useful for debugging and monitoring purposes.
func (*ElasticsearchMCPServer) Start ¶
func (s *ElasticsearchMCPServer) Start() error
Start launches the MCP server using the configured protocol (stdio, http, or sse). The method blocks until the server is stopped or encounters an error.
func (*ElasticsearchMCPServer) Stop ¶
func (s *ElasticsearchMCPServer) Stop() error
Stop gracefully shuts down the MCP server and cleans up resources.