elasticsearch-mcp-server 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of elasticsearch-mcp-server might be problematic. Click here for more details.

@@ -2,8 +2,9 @@ import logging
2
2
  import os
3
3
  from dotenv import load_dotenv
4
4
  from elasticsearch import Elasticsearch
5
+ import warnings
5
6
 
6
- class BaseTools:
7
+ class ElasticsearchClient:
7
8
  def __init__(self, logger: logging.Logger):
8
9
  self.logger = logger
9
10
  self.es_client = self._create_elasticsearch_client()
@@ -28,6 +29,10 @@ class BaseTools:
28
29
  def _create_elasticsearch_client(self) -> Elasticsearch:
29
30
  """Create and return an Elasticsearch client using configuration from environment."""
30
31
  config = self._get_es_config()
32
+
33
+ # Disable SSL warnings
34
+ warnings.filterwarnings("ignore", message=".*TLS with verify_certs=False is insecure.*",)
35
+
31
36
  return Elasticsearch(
32
37
  config["host"],
33
38
  basic_auth=(config["username"], config["password"]),
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python3
2
2
  import logging
3
3
  from fastmcp import FastMCP
4
- from tools import IndexTools, DocumentTools, ClusterTools
4
+ from elasticsearch_mcp_server import IndexTools, DocumentTools, ClusterTools
5
5
 
6
6
  class ElasticsearchMCPServer:
7
7
  def __init__(self):
@@ -1,8 +1,9 @@
1
- from typing import Any
1
+ import logging
2
+ from typing import Dict, Any
3
+ from ..es_client import ElasticsearchClient
2
4
  from mcp.types import TextContent
3
- from .base import BaseTools
4
5
 
5
- class ClusterTools(BaseTools):
6
+ class ClusterTools(ElasticsearchClient):
6
7
  def register_tools(self, mcp: Any):
7
8
  """Register cluster-related tools."""
8
9
 
@@ -1,8 +1,9 @@
1
- from typing import Any
1
+ import logging
2
+ from typing import Dict, Any
3
+ from ..es_client import ElasticsearchClient
2
4
  from mcp.types import TextContent
3
- from .base import BaseTools
4
5
 
5
- class DocumentTools(BaseTools):
6
+ class DocumentTools(ElasticsearchClient):
6
7
  def register_tools(self, mcp: Any):
7
8
  """Register document-related tools."""
8
9
 
@@ -1,8 +1,9 @@
1
- from typing import Any
1
+ import logging
2
+ from typing import Dict, Any
3
+ from ..es_client import ElasticsearchClient
2
4
  from mcp.types import TextContent
3
- from .base import BaseTools
4
5
 
5
- class IndexTools(BaseTools):
6
+ class IndexTools(ElasticsearchClient):
6
7
  def register_tools(self, mcp: Any):
7
8
  """Register index-related tools."""
8
9
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: elasticsearch-mcp-server
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: MCP Server for interacting with Elasticsearch
5
5
  License: Apache License
6
6
  Version 2.0, January 2004
@@ -0,0 +1,11 @@
1
+ elasticsearch_mcp_server/__init__.py,sha256=5FVylVoTvoYDIMpnO0rUYSUQg9T4CBcFjcYlgm9gvuQ,177
2
+ elasticsearch_mcp_server/es_client.py,sha256=n7RYcB97DgCIkrY1ryP4Ubq3IJxfnKqzvXMXRCbOXr8,1510
3
+ elasticsearch_mcp_server/server.py,sha256=ACQBXOWc4l0SK4dC_fMGlGVc8ahpa3fNLrI3o-wBh2k,1186
4
+ elasticsearch_mcp_server/tools/cluster.py,sha256=bGShKKDCgHW0GZoPd8ty__yX1Yn_dTwOH4hGGQsO5l8,1849
5
+ elasticsearch_mcp_server/tools/document.py,sha256=PDD63Etp1MS0G8N3IDg1j-hG41r5OFe4adlotnyuZHU,1075
6
+ elasticsearch_mcp_server/tools/index.py,sha256=Zgc90bVNH18LaHs4CXIRDAdcAdJyxx_RN788xZjLA-A,2174
7
+ elasticsearch_mcp_server-0.1.2.dist-info/METADATA,sha256=30NAjg0DBa90MxvI4kH3C8i7m4fItPo6K9IXtIbhCpU,15647
8
+ elasticsearch_mcp_server-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
+ elasticsearch_mcp_server-0.1.2.dist-info/entry_points.txt,sha256=sAW_y-4MkO9T00GbIb_tLQikrTPF94uHU1YkbWMj65g,75
10
+ elasticsearch_mcp_server-0.1.2.dist-info/licenses/LICENSE,sha256=DBsjuP5FR51d9kaUdXlVBuBv3cQ_I_adq9gefYQ9FcY,11339
11
+ elasticsearch_mcp_server-0.1.2.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- elasticsearch_mcp_server/__init__.py,sha256=5FVylVoTvoYDIMpnO0rUYSUQg9T4CBcFjcYlgm9gvuQ,177
2
- elasticsearch_mcp_server/server.py,sha256=7naw1-fAxtUE1gOk4LYz2WkZSz6-HnOEiS0Q97rJRFk,1167
3
- elasticsearch_mcp_server/tools/base.py,sha256=O1vRJCV3EUu9ZJRBuU9lUMcYaUL8dW717Eb03R4HFbo,1353
4
- elasticsearch_mcp_server/tools/cluster.py,sha256=kdV6B5j7tNzz27CO0d2DeGrExQwuL6TTO4DW9iD_oLk,1802
5
- elasticsearch_mcp_server/tools/document.py,sha256=yPGcR3nKf528895-9wSQqrIAy1dkkE0v5jHyZnhYTtk,1028
6
- elasticsearch_mcp_server/tools/index.py,sha256=ALgZZJMPqiHWs26tJIEoa0PtNBbIEeU_g0ar__Vqy9w,2127
7
- elasticsearch_mcp_server-0.1.1.dist-info/METADATA,sha256=_GfV0tsHQnUk2S7AAEjx-OBfONnLLxJz1HVwyEceOiE,15647
8
- elasticsearch_mcp_server-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
- elasticsearch_mcp_server-0.1.1.dist-info/entry_points.txt,sha256=sAW_y-4MkO9T00GbIb_tLQikrTPF94uHU1YkbWMj65g,75
10
- elasticsearch_mcp_server-0.1.1.dist-info/licenses/LICENSE,sha256=DBsjuP5FR51d9kaUdXlVBuBv3cQ_I_adq9gefYQ9FcY,11339
11
- elasticsearch_mcp_server-0.1.1.dist-info/RECORD,,