other
Elastic MCP, CLI, and Lua Integration for AI Agents
Elastic integration docs for AI agents: MCP gateway setup, Elastic CLI commands, Lua API reference, credentials, and function schemas.
7 functions 5 read 2 write Username and password auth
Elastic for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
elastic- route_slug
elastic- package
elastic- auth_strategy
basicUsername and password- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. Elastic CLIHeadless setup and direct function calls. Elastic MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Elastic MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Elastic.
Claude Code Elastic MCP setup for Claude Code. Cursor Elastic MCP setup for Cursor. Codex Elastic MCP setup for Codex. OpenAI Agents Elastic MCP setup for OpenAI Agents SDK. Claude Agent SDK Elastic MCP setup for Claude Agent SDK. Vercel AI SDK Elastic MCP setup for Vercel AI SDK. LangChain Elastic MCP setup for LangChain. LangGraph Elastic MCP setup for LangGraph. CrewAI Elastic MCP setup for CrewAI. MCP clients Elastic MCP setup for Generic MCP Clients.
Elastic CLI Matrix
Use these pages for direct Elastic CLI workflows in scripts, CI, cron, and agent wrappers.
CI Elastic CLI for CI. Cron Jobs Elastic CLI for cron jobs. Shell Scripts Elastic CLI for shell scripts. Headless Automation Elastic CLI for headless automation. Coding Agents Elastic CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
elastic.elastic_list_indices | Read read | 0 | List all indices in the Elasticsearch cluster. Returns index names, health status, document counts, and sizes. |
elastic.elastic_get_index | Read read | 1 | Get detailed information about a specific Elasticsearch index, including mappings, settings, and aliases. |
elastic.elastic_create_index | Write write | 2 | Create a new Elasticsearch index with optional settings and mappings. |
elastic.elastic_search_documents | Read read | 4 | Search for documents in an Elasticsearch index. Supports full query DSL including match, term, bool, and aggregation queries. |
elastic.elastic_index_document | Write write | 3 | Create or update a document in an Elasticsearch index. Provide an ID to update an existing document, or omit it to let Elasticsearch auto-generate one. |
elastic.elastic_get_document | Read read | 2 | Retrieve a single document from an Elasticsearch index by its ID. |
elastic.elastic_cluster_health | Read read | 0 | Get the health status of the Elasticsearch cluster, including status (green/yellow/red), number of nodes, and shard information. |