elasticsearch-mcp-server 0.1.1__tar.gz → 0.1.2__tar.gz
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.
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/PKG-INFO +1 -1
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/pyproject.toml +1 -1
- elasticsearch_mcp_server-0.1.1/src/elasticsearch_mcp_server/tools/base.py → elasticsearch_mcp_server-0.1.2/src/elasticsearch_mcp_server/es_client.py +6 -1
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/src/elasticsearch_mcp_server/server.py +1 -1
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/src/elasticsearch_mcp_server/tools/cluster.py +4 -3
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/src/elasticsearch_mcp_server/tools/document.py +4 -3
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/src/elasticsearch_mcp_server/tools/index.py +4 -3
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/uv.lock +2 -2
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/.env +0 -0
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/.gitignore +0 -0
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/.python-version +0 -0
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/LICENSE +0 -0
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/README.md +0 -0
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/docker-compose.yml +0 -0
- {elasticsearch_mcp_server-0.1.1 → elasticsearch_mcp_server-0.1.2}/src/elasticsearch_mcp_server/__init__.py +0 -0
|
@@ -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
|
|
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,8 +1,9 @@
|
|
|
1
|
-
|
|
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(
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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(
|
|
6
|
+
class IndexTools(ElasticsearchClient):
|
|
6
7
|
def register_tools(self, mcp: Any):
|
|
7
8
|
"""Register index-related tools."""
|
|
8
9
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|