Skip to main content
Glama
imlewc

Elasticsearch 7.x MCP Server

by imlewc

es-ping

Check connectivity and verify the Elasticsearch 7.x server is responsive. Use this tool to test server availability before performing search operations.

Instructions

Ping Elasticsearch server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reqYes

Implementation Reference

  • Registration of the 'es-ping' tool, binding it to the _handle_ping method.
    self.server.tool(name="es-ping", description="Ping Elasticsearch server")(self._handle_ping)
  • The main handler function for the es-ping tool. It calls ping() on the Elasticsearch client and returns the success status or an error message.
    def _handle_ping(self, req: Dict[str, Any]) -> Dict[str, Any]: """Handle ping request to Elasticsearch.""" try: result = self.es_client.ping() return {"success": result} except Exception as e: self.logger.error(f"Error pinging Elasticsearch: {str(e)}") return {"success": False, "error": str(e)}

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/imlewc/elasticsearch7-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server