elasticsearch7-mcp: Instructions file for Claude Code

CLAUDE.md

elasticsearch7-mcp CLAUDE.md is an instructions file for Claude Code from agrica/elasticsearch7-mcp. It costs 10,416 tokens per session, scanned A, original, MIT.

A repository guidance document for an Elasticsearch 7 MCP server, a service that lets AI clients use Elasticsearch tools through the Model Context Protocol.

In plain words
What is it for?
Use it when installing dependencies, building, testing, type-checking, or debugging the Elasticsearch MCP server.
Why use it?
It gives Claude Code project-specific commands, constraints, and debugging guidance for working safely in that codebase.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is agrica/elasticsearch7-mcp's own configuration. It tells Claude Code how to work on elasticsearch7-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything elasticsearch7-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to agrica/elasticsearch7-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/agrica/elasticsearch7-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/agrica/elasticsearch7-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for elasticsearch7-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/agrica/elasticsearch7-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/agrica/elasticsearch7-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/agrica/elasticsearch7-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/agrica/elasticsearch7-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for elasticsearch7-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/agrica/elasticsearch7-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/agrica/elasticsearch7-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10,416 This file is loaded in full into every session.
When invoked 10,416 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.10416 $0.10416
Opus 5 $0.05208 $0.05208
Sonnet 5 $0.02083 $0.02083
Haiku 4.5 $0.01042 $0.01042

Measured 6d ago against content hash d2c3c4a9991d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

elasticsearch7-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 328 lines

How it starts

The opening of the file, as written. The whole thing — 328 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project

MCP (Model Context Protocol) server that exposes an Elasticsearch cluster as tools to MCP clients (Claude Desktop, Cursor). Published as elasticsearch7-mcp; also distributed via Smithery and Docker. Communicates over stdio only — never write to stdout outside the MCP protocol; diagnostics go to console.error.

This is a renamed fork of @awesome-ai/elasticsearch-mcp, retargeted at Elasticsearch 7.x. See docs/superpowers/specs/2026-08-24-elasticsearch-7x-compat-design.md for the migration design and the verified facts behind it.

Commands

nvm use               # Node 24.19.0 (.nvmrc) — the active LTS, which @types/node tracks
pnpm install          # pnpm ONLY — see the lockfile note below
pnpm run build        # tsc + chmod +x dist/*.js
pnpm test             # vitest run — 345 tests, mocked at the client connection layer
pnpm run test:watch   # vitest in watch mode
pnpm run typecheck    # tsc --strict over src, test and root files (vitest does NOT type-check)
pnpm run watch        # tsc --watch

# The image, as CI builds and checks it:
docker build -t elasticsearch7-mcp:dev .
printf '%s' "$HANDSHAKE" | docker run --rm -i -e ES_HOST=http://localhost:9200 elasticsearch7-mcp:dev

# Runtime verification against a real 7.x cluster (read-only by default):
ES_HOST=http://localhost:9200 ES_API_KEY=your-key pnpm run smoke

# What one tool call costs the caller's context, at cluster scale:
pnpm run build && pnpm run measure
ES_HOST=http://localhost:9200 node scripts/smoke.mjs --write smoke-test   # also write tools

# Interactive debugging:
ES_HOST=http://localhost:9200 ES_API_KEY=your-key pnpm run inspector

There is no linter and no formatter. Three layers of checking, all run in CI:

  1. pnpm run typechecktsc --strict. Note the split: pnpm run build uses tsconfig.json, which covers only root files plus whatever index.ts reaches; tsconfig.test.json adds test/** and src/** explicitly. vitest transpiles without type-checking, so a test file's type errors are invisible until typecheck runs.
  2. pnpm test — vitest against @elastic/elasticsearch-mock, intercepting at the client's connection layer. That layer matters: the tests assert the request that actually goes on the wire, so they fail when the query DSL is not nested under body — a faked client object would accept it silently. Verified by mutation: removing the body nesting or reading docsCount instead of docs.count makes 6 tests fail.
  3. pnpm run smoke — the only check that talks to a real cluster; requires pnpm run build first, since it imports the built output.

Read the full file on GitHub · 328 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago Changed · +5 lines · +108 tokens per session d2c3c4a9991d
  2. 10d ago First seen · 323 lines · 10,308 tokens per session scan A e3c4b8a105c6

Subscribe to this mod's changes

elasticsearch7-mcp CLAUDE.md is an instructions file published in the GitHub repository agrica/elasticsearch7-mcp (0 stars, last pushed 7d ago), licensed MIT. It adds 10,416 tokens to every session, about $0.0521 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens