Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.buildkite
.github
.nvmrc
dist
docs
renovate.json
scripts
node_modules
catalog-info.yaml
yarn.lock
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM docker.elastic.co/wolfi/chainguard-base:latest@sha256:3d19648819612728a676ab4061edfb3283bd7117a22c6c4479ee1c1d51831832

RUN apk --no-cache add nodejs npm

WORKDIR /app
COPY . ./
RUN npm install && npm run build

ENTRYPOINT ["npm", "start"]
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ The Elasticsearch MCP Server supports configuration options to connect to your E
> [!NOTE]
> You must provide either an API key or both username and password for authentication.


| Environment Variable | Description | Required |
|---------------------|-------------|----------|
| `ES_URL` | Your Elasticsearch instance URL | Yes |
Expand All @@ -79,23 +78,25 @@ The Elasticsearch MCP Server supports configuration options to connect to your E
| `ES_CA_CERT` | Path to custom CA certificate for Elasticsearch SSL/TLS | No |
| `ES_PATH_PREFIX` | Path prefix for Elasticsearch instance exposed at a non-root path | No |


### Developing Locally

> [!NOTE]
> If you want to modify or extend the MCP Server, follow these local development steps.

1. **Use the correct Node.js version**

```bash
nvm use
```

2. **Install Dependencies**

```bash
npm install
```

3. **Build the Project**

```bash
npm run build
```
Expand Down Expand Up @@ -123,6 +124,7 @@ The Elasticsearch MCP Server supports configuration options to connect to your E
```

5. **Debugging with MCP Inspector**

```bash
ES_URL=your-elasticsearch-url ES_API_KEY=your-api-key npm run inspector
```
Expand All @@ -136,6 +138,23 @@ The Elasticsearch MCP Server supports configuration options to connect to your E
🔍 MCP Inspector is up and running at http://localhost:5173 🚀
```

#### Docker image

A `Dockerfile` is available if you would like to build and run the server in a container. To build, run:

```sh
docker build -t mcp-server-elasticsearch .
```

And to run, rather than using the `npx` command above or a custom `node` or `npm` command, run:

```sh
docker run -i \
-e ES_URL=<url> \
-e ES_API_KEY=<key> \
mcp-server-elasticsearch
```

## Contributing

We welcome contributions from the community! For details on how to contribute, please see [Contributing Guidelines](/docs/CONTRIBUTING.md).
Expand Down