Elasticsearch MCP server — query logs with or without SSH tunnel
Project description
Elasticsearch MCP Server
Query Elasticsearch logs directly from Claude Cowork — with or without an SSH tunnel.
Installation
1. Install the plugin
Get es-mcp from the Cowork plugin marketplace and install it.
2. Install uv
The MCP server runs via uvx, which requires uv to be installed on your machine:
# Windows
powershell -ExecutionPolicy Bypass -c "irm https://astral.sh/uv/install.ps1 | iex"
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
3. Configure the MCP server
Open claude_desktop_config.json:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Add the entry inside "mcpServers": { }:
{
"mcpServers": {
"elasticsearch-logs": {
"command": "uvx",
"args": ["artisan-es-reader-plugin@latest", "artisan-es-reader-plugin"],
"env": {
"ES_HOST": "localhost",
"ES_PORT": "9200",
"ES_USERNAME": "your-es-username",
"ES_PASSWORD": "your-es-password",
"ES_USE_SSL": "true",
"ES_VERIFY_CERTS": "false",
"SSH_HOST": "your-bastion-ip",
"SSH_PORT": "22",
"SSH_USERNAME": "ubuntu",
"SSH_PEM_FILE": "C:\\Users\\your-name\\path\\to\\key.pem",
"SSH_REMOTE_ES_HOST": "localhost",
"SSH_REMOTE_ES_PORT": "9200",
"SSH_LOCAL_PORT": "0"
}
}
}
}
Each team member only needs to fill in these personal values:
| Variable | Description |
|---|---|
ES_USERNAME |
Elasticsearch username |
ES_PASSWORD |
Elasticsearch password |
SSH_HOST |
Bastion / jump host IP or hostname |
SSH_PEM_FILE |
Absolute path to your local PEM key file |
Windows paths must use double backslashes in JSON:
C:\\Users\\your-name\\key.pem
4. Restart Cowork
The SSH tunnel starts automatically on first tool use.
Notes
ES_HOSTis only used for direct connections. WhenSSH_HOSTis set, traffic routes through the tunnel andES_HOSTis ignored.ES_USE_SSL: settrueif your Elasticsearch runs HTTPS.ES_VERIFY_CERTS: setfalsefor self-signed certificates.SSH_LOCAL_PORT:0= auto-pick a free local port.- To connect without SSH tunnel, leave
SSH_HOSTempty.
Updating
For users
Updates are automatic — just restart Cowork and uvx will pull the latest version from PyPI.
For maintainers
- Make changes to
src/es_mcp/server.py - Bump the version in
pyproject.toml - Build and publish:
python -m build twine upload dist/*
- Users get the new version automatically on next Cowork restart — no action needed on their end
Available tools
| Tool | What it does |
|---|---|
list_indices |
List indices (supports glob pattern) |
search_logs |
Full-text search with filters, sort, pagination |
get_recent_errors |
Error-level entries from the last N minutes |
get_index_mapping |
Field schema for an index |
run_aggregation |
Run a custom ES aggregation |
connection_info |
Show active connection / tunnel status |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file artisan_es_reader_plugin-0.1.0.tar.gz.
File metadata
- Download URL: artisan_es_reader_plugin-0.1.0.tar.gz
- Upload date:
- Size: 33.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfac456992de835450a81307f544f1cfce82ae93978622246bcb3d775acac0ec
|
|
| MD5 |
0d84e3e9ebac3f4b02697b64b4f7811c
|
|
| BLAKE2b-256 |
78e102091cf37ed4ca3832be3f6a387bea53fdb7470ff2de58df67c38e285e60
|
File details
Details for the file artisan_es_reader_plugin-0.1.0-py3-none-any.whl.
File metadata
- Download URL: artisan_es_reader_plugin-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fe674d41ea67fff56a027752578878cbefd4d0ac6b9dc2a70900c5c0be58541
|
|
| MD5 |
f27b9004b6a1e800a9e5d96086e262d5
|
|
| BLAKE2b-256 |
9c2b9ece7b6fc6f402f8cddb28bc8267319210c0b6dfdf52f3cc60aa7d66cebc
|