mcp-search-gateway
Exposes Elasticsearch clusters as tools so LLMs can run search queries, index and delete documents by ID, list indices, and check cluster health against an Elasticsearch backend.
Exposes OpenSearch clusters as tools so LLMs can run search queries, index and delete documents by ID, list indices, and check cluster health, with support for basic, API key, and AWS SigV4 authentication.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-search-gateway
Production-ready MCP server that exposes OpenSearch and Elasticsearch clusters as Model Context Protocol tools, enabling local and remote LLMs to search, index, and manage your search infrastructure.
Features
Dual backend — supports both OpenSearch and Elasticsearch from a single image
10 MCP tools — search, index, delete, list indices, cluster health (5 per backend)
Multi-arch Docker images —
linux/amd64+linux/arm64viadocker buildxFlexible auth — basic, API key, AWS SigV4 (IAM / IRSA)
LLM integrations — Claude Desktop, Ollama, Vertex AI, Amazon Bedrock
Hardened image — non-root user, read-only FS, Trivy-scanned
CI/CD — GitHub Actions (GHCR) + Bitbucket Pipelines (JFrog Artifactory)
Related MCP server: Elasticsearch MCP Server
Quick Start
Docker (recommended)
# 1. Clone the repo
git clone https://github.com/WhoisMonesh/mcp-search-gateway.git
cd mcp-search-gateway
# 2. Start OpenSearch + Dashboards + MCP Gateway
docker compose -f examples/docker-compose/opensearch-mcp.yml up -d
# 3. Verify health
curl http://localhost:8080/health
# {"status":"ok","backend":"opensearch"}From source
npm install
MCP_CONFIG=config/opensearch.local.yaml npm startPull the image
docker pull ghcr.io/whoismonesh/mcp-search-gateway:latestRepository Structure
mcp-search-gateway/
├── .github/
│ └── workflows/
│ ├── docker-multiarch-build.yml # Build & push multi-arch image to GHCR
│ └── lint-test.yml # ESLint + Jest CI
├── config/
│ ├── opensearch.local.yaml # Local OpenSearch config
│ ├── opensearch.aws.yaml # Amazon OpenSearch Service (IAM)
│ └── elasticsearch.local.yaml # Local Elasticsearch config
├── docker/
│ └── Dockerfile # Hardened multi-stage build
├── docs/
│ ├── architecture.md # System design & component overview
│ ├── configuration.md # Full config reference
│ └── llm-integration.md # LLM integration guides
├── examples/
│ └── docker-compose/
│ ├── opensearch-mcp.yml # OpenSearch + Dashboards + MCP
│ └── elasticsearch-mcp.yml # Elasticsearch + Kibana + MCP
├── src/
│ ├── server.js # MCP JSON-RPC 2.0 server
│ ├── config.js # YAML config loader & validator
│ ├── client.js # Search client adapter
│ └── tools/
│ ├── search.js # Search tools
│ ├── index.js # Index document tools
│ ├── indices.js # List indices tools
│ ├── cluster.js # Cluster health tools
│ └── delete.js # Delete document tools
├── bitbucket-pipelines.yml # Bitbucket + JFrog Artifactory CI
├── package.json
└── README.mdMCP Tools
Tool | Description |
| Execute a search query against an OpenSearch index |
| Index a document into OpenSearch |
| Delete a document by ID from OpenSearch |
| List all OpenSearch indices |
| Get OpenSearch cluster health status |
| Execute a search query against an Elasticsearch index |
| Index a document into Elasticsearch |
| Delete a document by ID from Elasticsearch |
| List all Elasticsearch indices |
| Get Elasticsearch cluster health status |
Configuration
Create a YAML config file and point MCP_CONFIG to it:
# config/opensearch.local.yaml
backend: opensearch
node: https://localhost:9200
auth:
type: basic
username: admin
password: admin
tls:
verify: falseSee docs/configuration.md for the full reference including AWS IAM / API key auth.
LLM Integration
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"opensearch": {
"command": "docker",
"args": ["run", "--rm", "-i",
"-v", "/path/to/config:/config:ro",
"-e", "MCP_CONFIG=/config/opensearch.local.yaml",
"ghcr.io/whoismonesh/mcp-search-gateway:latest"]
}
}
}Ollama
docker run -d -p 8080:8080 \
-e MCP_CONFIG=/config/opensearch.local.yaml \
-e MCP_TRANSPORT=http \
-v ./config:/config:ro \
ghcr.io/whoismonesh/mcp-search-gateway:latestSee docs/llm-integration.md for Vertex AI and Amazon Bedrock guides.
Docker Build
The multi-arch image is built automatically on every tag push:
# Manual multi-arch build
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/whoismonesh/mcp-search-gateway:latest \
-f docker/Dockerfile \
--push .CI/CD
Pipeline | Trigger | Output |
GitHub Actions ( | Push to | Multi-arch image on GHCR |
GitHub Actions ( | Every PR & push | ESLint + Jest results |
Bitbucket Pipelines ( | Push to | Multi-arch image on JFrog Artifactory |
Contributing
Fork the repository
Create a feature branch:
git checkout -b feat/my-featureRun tests:
npm testSubmit a pull request
License
MIT © WhoisMonesh
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage Bonsai Elasticsearch and OpenSearch clusters, and search their data.
Agent-driven search: build, import, tune, search, and score result quality — all over MCP.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with OpenSearch clusters to monitor cluster health, manage indices, and perform data searches. It provides a standardized interface for real-time OpenSearch operations within MCP-compatible environments like Open WebUI.-
- AlicenseNot gradedqualityDmaintenanceExposes Elasticsearch semantic search capabilities as MCP tools, enabling ELSER, kNN, and hybrid search with automatic index setup.MIT
- AlicenseBqualityFmaintenanceEnables interaction with OpenSearch clusters, providing tools to list indices, retrieve mappings, search using query DSL, and get shard information.41Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with OpenSearch clusters for searching indices, retrieving mappings, and managing shards through the MCP protocol.Apache 2.0