Skip to content
MCP server

esmole

Read-only Elasticsearch 7 and 8 access where the agent manages connections at runtime

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
0.2.0
Listing updated
1 day ago

About esmole

esmole is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.

esmole-mcp lets an agent add, edit and remove Elasticsearch clusters through tools during a session instead of editing client config. A request like connect to the logs cluster through a bastion, readonly, calls add_connection, and the entry is saved to a per-project .esmole.json or a global store that is re-read on every call, so no restart is needed.

It supports Elasticsearch 7.x and 8.x with API key or basic auth, any number of named clusters, and SSH tunnels using password, key or agent auth with host keys checked against known_hosts or a pinned fingerprint. Readonly connections allow only a list of read endpoints, with absolute timeouts, a 10 MB response cap and a 40 KB result cap so a large aggregation does not flood context.

Credentials are never echoed back and invalid entries are reported instead of silently skipped. It needs Node 22 or newer.

Install

Run in a terminal

claude mcp add esmole-mcp -- npx -y esmole-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "esmole-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "esmole-mcp"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "esmole-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "esmole-mcp"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "esmole-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "esmole-mcp"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "esmole-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "esmole-mcp"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "esmole-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "esmole-mcp"
      ]
    }
  }
}

What it does

Runtime connections
Add and remove clusters from the agent.
SSH tunnels
Password, key or agent auth with host key checks.
Readonly mode
Allowlist of read endpoints only.
Response caps
10 MB responses, 40 KB results.
Per-project config
Project file or global store, hot-reloaded.
Hidden credentials
Secrets are not echoed.

Good for

  • Query logs on a cluster behind a bastion host
  • Explore index sizes without leaving the chat
  • Switch between several clusters per project
  • Avoid accidental writes with readonly mode

Pricing

Open source

Free npm package.

esmole FAQ

What versions are supported?

Elasticsearch 7.x and 8.x.

Do I edit client config?

No, connections are managed by tools and reload on each call.

What Node version?

22 or newer.

Is there a SQL variant?

The README points to dbmole-mcp for PostgreSQL and MySQL.

Is esmole free?

Yes. esmole is open source, so you can use and self-host it for free.

How do I add esmole to Claude Code?

Run this command in your terminal: claude mcp add esmole-mcp -- npx -y esmole-mcp

What are the best alternatives to esmole?

The closest alternatives to esmole are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to esmole

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools