The OpenSearch MCP Server provides a Model Context Protocol (MCP) server implementation that enables interaction with OpenSearch clusters. It allows you to search documents, analyze indices, and manage your cluster through a user-friendly interface.
Start the OpenSearch cluster using Docker Compose:
docker-compose up -d
This command launches a 3-node OpenSearch cluster and Kibana with the following default credentials:
You can access Kibana from http://localhost:5601
To use the OpenSearch MCP Server with Claude Desktop, you'll need to add the appropriate configuration.
Locate your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
Add the following configuration to the file (replace path/to/src/opensearch_mcp_server
with the actual path):
{
"mcpServers": {
"opensearch": {
"command": "uv",
"args": [
"--directory",
"path/to/src/opensearch_mcp_server",
"run",
"opensearch-mcp-server"
],
"env": {
"OPENSEARCH_HOST": "https://localhost:9200",
"OPENSEARCH_USERNAME": "opensearch",
"OPENSEARCH_PASSWORD": "test123"
}
}
}
}
After setting up the MCP server, you can interact with your OpenSearch cluster through Claude using natural language commands such as:
You can utilize all the features mentioned above through conversational queries, making it easier to work with your OpenSearch data without writing complex queries manually.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.