You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-16Lines changed: 23 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Elasticsearch MCP Server
2
2
3
3
> [!CAUTION]
4
-
>
4
+
>
5
5
> **WARNING: this is MCP server is EXPERIMENTAL.**
6
6
7
7
Connect to your Elasticsearch data directly from any MCP Client using the Model Context Protocol (MCP).
@@ -28,6 +28,12 @@ Versions `8.x` and `9.x` are officially supported. Earlier versions may partiall
28
28
29
29
## Installation & Setup
30
30
31
+
> [!NOTE]
32
+
>
33
+
> Versions 0.3.1 and earlier were installed via `npm`. These versions are deprecated and no longer supported. The following instructions only apply to 0.4.0 and later.
34
+
>
35
+
> To view instructions for versions 0.3.1 and earlier, see the [README for v0.3.1](https://github.com/elastic/mcp-server-elasticsearch/tree/v0.3.1).
36
+
31
37
This MCP server is provided as a Docker image at `docker.elastic.co/mcp/elasticsearch`
32
38
that supports MCP's stdio, SSE and streamable-HTTP protocols.
33
39
@@ -52,10 +58,11 @@ Options:
52
58
### Using the stdio protocol
53
59
54
60
The MCP server needs environment variables to be set:
55
-
*`ES_URL`, the URL of your Elasticsearch cluster
56
-
*`ES_API_KEY`, the Elasticsearch API key. We **strongly recommend** creating an API key
57
-
with limited privileges so that the LLM only has access to the data and operations
58
-
required for the usage context.
61
+
62
+
*`ES_URL`: the URL of your Elasticsearch cluster
63
+
* For authentication use either an API key or basic authentication:
64
+
* API key: `ES_API_KEY`
65
+
* Basic auth: `ES_USERNAME` and `ES_PASSWORD`
59
66
* Optionally, `ES_SSL_SKIP_VERIFY` set to `true` skips SSL/TLS certificate verification when connecting
60
67
to Elasticsearch. The ability to provide a custom certificate will be added in a later version.
61
68
@@ -73,10 +80,10 @@ The configuration for Claude Desktop is as follows:
73
80
"elasticsearch-mcp-server": {
74
81
"command": "docker",
75
82
"args": [
76
-
"run", "-i", "--rm",
77
-
"-e", "ES_URL", "-e", "ES_API_KEY",
78
-
"docker.elastic.co/mcp/elasticsearch",
79
-
"stdio"
83
+
"run", "-i", "--rm",
84
+
"-e", "ES_URL", "-e", "ES_API_KEY",
85
+
"docker.elastic.co/mcp/elasticsearch",
86
+
"stdio"
80
87
],
81
88
"env": {
82
89
"ES_URL": "<elasticsearch-cluster-url>",
@@ -92,27 +99,28 @@ The configuration for Claude Desktop is as follows:
92
99
Note: streamable-HTTP is recommended, as [SSE is deprecated](https://modelcontextprotocol.io/docs/concepts/transports#server-sent-events-sse-deprecated).
93
100
94
101
The MCP server needs environment variables to be set:
102
+
95
103
*`ES_URL`, the URL of your Elasticsearch cluster
104
+
* For authentication use either an API key or basic authentication:
105
+
* API key: `ES_API_KEY`
106
+
* Basic auth: `ES_USERNAME` and `ES_PASSWORD`
96
107
* Optionally, `ES_SSL_SKIP_VERIFY` set to `true` skips SSL/TLS certificate verification when connecting
97
108
to Elasticsearch. The ability to provide a custom certificate will be added in a later version.
98
109
99
-
The MCP client must also be configured with an `Authorization` header containing the Elasticsearch
100
-
cluster's API key
101
-
102
110
The MCP server is started in http mode with this command:
103
111
104
112
```bash
105
-
docker run --rm -e ES_URL -p 8080:8080 docker.elastic.co/mcp/elasticsearch http
Copy file name to clipboardExpand all lines: docs/CONTRIBUTING.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,6 @@ Elasticsearch MCP Server is open source, and we love to receive contributions fr
8
8
9
9
There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests or writing code.
10
10
11
-
12
11
Contributions are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) under the [project's license](../LICENSE).
13
12
14
13
Please note that this project follows the [Elastic's Open Source Community Code of Conduct][code-of-conduct].
@@ -34,13 +33,14 @@ You can use either:
34
33
35
34
1.**Elastic Cloud** - Use an existing Elasticsearch deployment and your API key
36
35
2.**Local Elasticsearch** - Run Elasticsearch locally using the [start-local](https://www.elastic.co/guide/en/elasticsearch/reference/current/run-elasticsearch-locally.html) script:
36
+
37
37
```bash
38
38
curl -fsSL https://elastic.co/start-local | sh
39
39
```
40
40
41
41
This starts Elasticsearch and Kibana with Docker:
42
-
- Elasticsearch: http://localhost:9200
43
-
- Kibana: http://localhost:5601
42
+
- Elasticsearch: <http://localhost:9200>
43
+
- Kibana: <http://localhost:5601>
44
44
45
45
> [!NOTE]
46
46
> The `start-local` setup is for development only. It uses basic authentication and disables HTTPS.
0 commit comments