PlugWiki
Elasticsearch MCP (rajwardhanshinde) logo

Elasticsearch MCP by rajwardhanshinde: Setup for Claude, Cursor and More

CommunityLocal

Lets Claude, Cursor and other assistants search and change data in your Elasticsearch cluster, and export results to CSV.

This is a community server by rajwardhanshinde, not made by Elastic. It runs on your computer and connects to your cluster with an API key, or with a username and password for a self-hosted cluster.

It can add, change and delete documents as well as search them, and there is no read-only switch. Our advice: give it an API key that can only read the indices you want to expose, and keep it away from production data you cannot restore.

Good for

  • Developers who want to query Elasticsearch indices in plain language
  • Analysts who need aggregations or CSV exports from an index
  • Teams on Elastic Cloud or a self-hosted cluster who can give the assistant a limited API key

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install Elasticsearch MCP (rajwardhanshinde)

Claude Code

  1. 1

    Copy this prompt.

    Add the Elasticsearch MCP (rajwardhanshinde) server to Claude Code. Run this command:
    
    claude mcp add rajwardhanshinde-elasticsearch -e ELASTIC_CLOUD_ID=<ELASTIC_CLOUD_ID> -e ELASTIC_API_KEY=<ELASTIC_API_KEY> -- npx -y elasticsearch-mcp
    
    Ask me for ELASTIC_CLOUD_ID, ELASTIC_API_KEY and only put the values in that config, nowhere else.
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

Built from the package data we hold. Not yet tested by us.

Tools

  • Lists your Elasticsearch indices

    Returns the indices in the cluster, filtered by a pattern such as logs-*. System indices that start with a dot are left out unless you ask for them, and you can sort by name, size or document count.

    Try: “List the indices that start with logs- and sort them by size.”

    Network · fetch_indices

  • Searches an index

    Runs a query in Elasticsearch query language against one index. It accepts paging, sorting, aggregations, highlighting and a list of fields to return.

    Try: “Search sales-data for 2024 orders and total the revenue by month.”

    Network · search_elasticsearch

  • Creates an index

    Creates a new index with the mappings, settings and aliases you give it.

    Try: “Create an index called products with a text field for the name and a number field for the price.”

    Write · create_index

  • Adds one document to an index

    Stores a single document in an index, with an optional ID and a choice of refresh behaviour.

    Try: “Add this customer record to the customers index.”

    Write · insert_data

  • Changes an existing document

    Updates a document by ID, either by merging in new field values or by running a script. Script text is checked against a list of blocked patterns before it is sent.

    Try: “Set the status field to shipped on order 1042.”

    Write · update_document

  • Deletes documents

    Deletes one document by ID, or every document that matches a query. The delete-by-query form can remove many documents in one call.

    Try: “Delete all documents in test-events where status is draft.”

    Delete · delete_document

  • Saves search results as a CSV file

    Runs a query and writes the matching rows to a CSV file in the folder where the server was started, with optional gzip compression and a row limit. The file name is cleaned to letters, digits, dots, dashes and underscores.

    Try: “Export active users from user-analytics to a CSV with email and country.”

    Write · export_to_csv

Read from the source code

Permissions

high risk · 3 things to watch

High risk

The assistant can search, add, change and delete data in your Elasticsearch cluster. Use an API key that can only read the indices you need, because there is no read-only switch.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It can delete many documents with one query

    delete_document accepts a query and removes every match. Use an API key without delete rights on indices you cannot rebuild. github.com

  • It can change and add data

    insert_data, update_document and create_index write to your cluster, and update_document can run a script. Our advice: scope the API key to read-only unless you want edits. github.com

  • Export writes a file on your computer

    export_to_csv saves a CSV (or gzip) file in the folder the server starts in. Check that folder before you export private data. github.com

Security advisories

No published security advisories as of Nov 1, 2026.

Technical details
Turning on read-onlyNo read-only switch is documented or in the config source. Our advice: use an Elasticsearch API key restricted to read access, so write calls are refused by the cluster.
Talks toYour Elasticsearch cluster
Sign-in and keysReads ELASTIC_CLOUD_ID with ELASTIC_API_KEY, or ELASTIC_NODE with an API key or ELASTIC_USERNAME and ELASTIC_PASSWORD, from the environment you set in your client config.

Questions

Is this the official Elasticsearch MCP server?

No. It is a community project by rajwardhanshinde, not made by Elastic. Elastic's own server is a separate project with its own page: Elasticsearch MCP (Elastic).

Do I need an Elastic Cloud account?

No. Elastic Cloud works with a cloud ID and API key. A self-hosted cluster works with ELASTIC_NODE plus an API key or a username and password.

Can it run read-only?

No. There is no read-only switch in the config. Use an Elasticsearch API key that only has read access, and writes will be refused by the cluster.

Can it delete my data?

Yes. It can delete one document by ID or every document matching a query, so use a key without delete rights if you want to prevent that.

Does it run locally or in the cloud?

It runs on your computer and connects to your cluster over the network. Search results go to your AI assistant like any other tool output.

Where does the CSV export go?

It saves a file in the folder where the server was started. The file name is cleaned to letters, digits, dots, dashes and underscores.

How do I add it to Claude or Cursor?

Use the install box above and fill in your cluster details. For a self-hosted cluster, replace the cloud ID with ELASTIC_NODE and add your credentials.

Information

updated Nov 2, 2026

Publisher
Community
Package
elasticsearch-mcp
Registry
npm
Transport
stdio
Auth
API key
Version
0.1.3
License
MIT
Last commit
Aug 4, 2025

GitHubnpmChangelogIssues

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 3
  1. github.com · github.com
  2. github.com · github.com
  3. github.com · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.