Skip to main content
Glama

Elasticsearch MCP Server

Apache 2.0
127
  • Apple
from typing import Dict, List from fastmcp import FastMCP class AliasTools: def __init__(self, search_client): self.search_client = search_client def register_tools(self, mcp: FastMCP): @mcp.tool() def list_aliases() -> List[Dict]: """List all aliases.""" return self.search_client.list_aliases() @mcp.tool() def get_alias(index: str) -> Dict: """ Get alias information for a specific index. Args: index: Name of the index """ return self.search_client.get_alias(index=index) @mcp.tool() def put_alias(index: str, name: str, body: Dict) -> Dict: """ Create or update an alias for a specific index. Args: index: Name of the index name: Name of the alias body: Alias configuration """ return self.search_client.put_alias(index=index, name=name, body=body) @mcp.tool() def delete_alias(index: str, name: str) -> Dict: """ Delete an alias for a specific index. Args: index: Name of the index name: Name of the alias """ return self.search_client.delete_alias(index=index, name=name)

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/cr7258/elasticsearch-mcp-server'

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