Open Elastic Search Usage Guide¶
Overview¶
This guide shows how to use the Open Elastic Search with different MCP clients and integration methods.
Tool Discovery¶
Available Tools¶
list_indices¶
Description: List all indices.
Parameters: - No parameters required
get_index¶
Description: Returns information (mappings, settings, aliases) about one or more indices.
Args:
index: Name of the index
Parameters:
- index
(string) (required): No description
create_index¶
Description: Create a new index.
Args:
index: Name of the index
body: Optional index configuration including mappings and settings
Parameters:
- index
(string) (required): No description
- body
(string) (optional): No description
delete_index¶
Description: Delete an index.
Args:
index: Name of the index
Parameters:
- index
(string) (required): No description
search_documents¶
Description: Search for documents.
Args:
index: Name of the index
body: Search query
Parameters:
- index
(string) (required): No description
- body
(object) (required): No description
index_document¶
Description: Creates or updates a document in the index.
Args:
index: Name of the index
document: Document data
id: Optional document ID
Parameters:
- index
(string) (required): No description
- document
(object) (required): No description
- id
(string) (optional): No description
get_document¶
Description: Get a document by ID.
Args:
index: Name of the index
id: Document ID
Parameters:
- index
(string) (required): No description
- id
(string) (required): No description
delete_document¶
Description: Delete a document by ID.
Args:
index: Name of the index
id: Document ID
Parameters:
- index
(string) (required): No description
- id
(string) (required): No description
delete_by_query¶
Description: Deletes documents matching the provided query.
Args:
index: Name of the index
body: Query to match documents for deletion
Parameters:
- index
(string) (required): No description
- body
(object) (required): No description
get_cluster_health¶
Description: Returns basic information about the health of the cluster.
Parameters: - No parameters required
get_cluster_stats¶
Description: Returns high-level overview of cluster statistics.
Parameters: - No parameters required
list_aliases¶
Description: List all aliases.
Parameters: - No parameters required
get_alias¶
Description: Get alias information for a specific index.
Args:
index: Name of the index
Parameters:
- index
(string) (required): No description
put_alias¶
Description: Create or update an alias for a specific index.
Args:
index: Name of the index
name: Name of the alias
body: Alias configuration
Parameters:
- index
(string) (required): No description
- name
(string) (required): No description
- body
(object) (required): No description
delete_alias¶
Description: Delete an alias for a specific index.
Args:
index: Name of the index
name: Name of the alias
Parameters:
- index
(string) (required): No description
- name
(string) (required): No description
general_api_request¶
Description: Perform a general HTTP API request. Use this tool for any Elasticsearch/OpenSearch API that does not have a dedicated tool.
Args:
method: HTTP method (GET, POST, PUT, DELETE, etc.)
path: API endpoint path
params: Query parameters
body: Request body
Parameters:
- method
(string) (required): No description
- path
(string) (required): No description
- params
(string) (optional): No description
- body
(string) (optional): No description
Usage Examples¶
# Start interactive mode
mcp_platform interactive
# Deploy the template (if not already deployed)
mcpp> deploy open-elastic-search
# List available tools after deployment
mcpp> tools open-elastic-search
Then call tools:
import asyncio
from mcp_platform.client import MCPClient
async def use_open_elastic_search():
client = MCPClient()
# Start the server
deployment = client.start_server("open-elastic-search", {})
if deployment["success"]:
deployment_id = deployment["deployment_id"]
try:
# Discover available tools
tools = client.list_tools("open-elastic-search")
print(f"Available tools: {[t['name'] for t in tools]}")
# Call list_indices
result = client.call_tool("open-elastic-search", "list_indices", {})
print(f"list_indices result: {result}")
# Call get_index
result = client.call_tool("open-elastic-search", "get_index", {'index': 'example_value'})
print(f"get_index result: {result}")
finally:
# Clean up
client.stop_server(deployment_id)
else:
print("Failed to start server")
# Run the example
asyncio.run(use_open_elastic_search())
Integration Examples¶
Add this configuration to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Install the MCP extension and add this to your VS Code settings (.vscode/settings.json
):
Configuration¶
For template-specific configuration options, see the main template documentation. Common configuration methods:
Troubleshooting¶
Common Issues¶
-
Template not found: Ensure the template name is correct
-
Connection issues: Check if the server is running
-
Tool discovery fails: Try refreshing the tool cache
Debug Mode¶
Enable debug logging for troubleshooting:
For more help, see the main documentation or open an issue in the repository.