opensearch-mcp-server 2.0.3__tar.gz → 2.0.5__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.
Files changed (54) hide show
  1. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/Dockerfile +1 -1
  2. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/Makefile +2 -2
  3. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/PKG-INFO +24 -26
  4. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/README.md +21 -22
  5. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/python-sdk-anthropic/config.py +1 -1
  6. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/pyproject.toml +3 -4
  7. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/smithery.yaml +3 -3
  8. opensearch_mcp_server-2.0.5/src/server.py +124 -0
  9. opensearch_mcp_server-2.0.5/src/version.py +1 -0
  10. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/uv.lock +161 -23
  11. opensearch_mcp_server-2.0.3/src/server.py +0 -75
  12. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/.env.example +0 -0
  13. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/.github/workflows/pypi-publish.yaml +0 -0
  14. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/.github/workflows/release.yml +0 -0
  15. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/.gitignore +0 -0
  16. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/.python-version +0 -0
  17. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/CONTRIBUTING.md +0 -0
  18. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/LICENSE +0 -0
  19. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/cliff.toml +0 -0
  20. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/docker-compose-elasticsearch.yml +0 -0
  21. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/docker-compose-opensearch.yml +0 -0
  22. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/python-sdk-anthropic/.gitignore +0 -0
  23. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/python-sdk-anthropic/__init__.py +0 -0
  24. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/python-sdk-anthropic/client.py +0 -0
  25. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/spring-ai/README.md +0 -0
  26. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/spring-ai/build.gradle +0 -0
  27. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/spring-ai/gradle/wrapper/gradle-wrapper.jar +0 -0
  28. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/spring-ai/gradle/wrapper/gradle-wrapper.properties +0 -0
  29. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/spring-ai/gradle.properties +0 -0
  30. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/spring-ai/gradlew +0 -0
  31. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/spring-ai/gradlew.bat +0 -0
  32. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/spring-ai/settings.gradle +0 -0
  33. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/spring-ai/src/main/java/spring/ai/mcp/spring_ai_mcp/Application.java +0 -0
  34. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/spring-ai/src/main/resources/application.yml +0 -0
  35. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/spring-ai/src/main/resources/mcp-servers-config.json +0 -0
  36. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/mcp_client/spring-ai/src/test/java/spring/ai/mcp/spring_ai_mcp/SpringAiMcpApplicationTests.java +0 -0
  37. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/__init__.py +0 -0
  38. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/clients/__init__.py +0 -0
  39. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/clients/base.py +0 -0
  40. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/clients/common/__init__.py +0 -0
  41. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/clients/common/alias.py +0 -0
  42. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/clients/common/client.py +0 -0
  43. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/clients/common/cluster.py +0 -0
  44. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/clients/common/document.py +0 -0
  45. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/clients/common/general.py +0 -0
  46. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/clients/common/index.py +0 -0
  47. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/clients/exceptions.py +0 -0
  48. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/tools/__init__.py +0 -0
  49. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/tools/alias.py +0 -0
  50. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/tools/cluster.py +0 -0
  51. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/tools/document.py +0 -0
  52. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/tools/general.py +0 -0
  53. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/tools/index.py +0 -0
  54. {opensearch_mcp_server-2.0.3 → opensearch_mcp_server-2.0.5}/src/tools/register.py +0 -0
@@ -19,7 +19,7 @@ RUN hatch build && pip install dist/*.whl
19
19
 
20
20
  # Set environment variables required for the MCP server
21
21
  # These can be overridden at runtime with docker run --env
22
- ENV ELASTICSEARCH_HOST="https://localhost:9200"
22
+ ENV ELASTICSEARCH_HOSTS="https://localhost:9200"
23
23
  ENV ELASTICSEARCH_USERNAME="elastic"
24
24
  ENV ELASTICSEARCH_PASSWORD="test123"
25
25
 
@@ -10,9 +10,9 @@ release:
10
10
  data = tomli.load(open("pyproject.toml", "rb")); \
11
11
  data["project"]["version"] = "$(version:v%=%)"; \
12
12
  tomli_w.dump(data, open("pyproject.toml", "wb"))'
13
- @git add pyproject.toml
13
+ @python -c 'open("src/version.py", "w").write("__version__ = \"$(version:v%=%)\"\n")'
14
14
  @uv sync
15
- @git add uv.lock
15
+ @git add .
16
16
  @git commit -m "release: update version to $(version:v%=%)"
17
17
  @git push origin main
18
18
  @git tag $(version)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opensearch-mcp-server
3
- Version: 2.0.3
3
+ Version: 2.0.5
4
4
  Summary: MCP Server for interacting with Elasticsearch and OpenSearch
5
5
  License: Apache License
6
6
  Version 2.0, January 2004
@@ -207,19 +207,21 @@ License-File: LICENSE
207
207
  Requires-Python: >=3.10
208
208
  Requires-Dist: anthropic==0.49.0
209
209
  Requires-Dist: elasticsearch==8.17.2
210
- Requires-Dist: fastmcp==0.4.1
211
- Requires-Dist: mcp==1.6.0
210
+ Requires-Dist: fastmcp==2.8.0
211
+ Requires-Dist: mcp==1.9.2
212
212
  Requires-Dist: opensearch-py==2.8.0
213
213
  Requires-Dist: python-dotenv==1.1.0
214
- Requires-Dist: toml==0.10.2
215
214
  Requires-Dist: tomli-w==1.2.0
216
215
  Requires-Dist: tomli==2.2.1
217
216
  Description-Content-Type: text/markdown
218
217
 
218
+
219
219
  # Elasticsearch/OpenSearch MCP Server
220
220
 
221
221
  [![smithery badge](https://smithery.ai/badge/elasticsearch-mcp-server)](https://smithery.ai/server/elasticsearch-mcp-server)
222
222
 
223
+ [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/cr7258-elasticsearch-mcp-server-badge.png)](https://mseep.ai/app/cr7258-elasticsearch-mcp-server)
224
+
223
225
  ## Overview
224
226
 
225
227
  A Model Context Protocol (MCP) server implementation that provides Elasticsearch and OpenSearch interaction. This server enables searching documents, analyzing indices, and managing cluster through a set of tools.
@@ -283,19 +285,11 @@ The default Elasticsearch username is `elastic` and password is `test123`. The d
283
285
 
284
286
  You can access Kibana/OpenSearch Dashboards from http://localhost:5601.
285
287
 
286
- ## Usage with Claude Desktop
287
-
288
- ### Option 1: Installing via Smithery
288
+ ## Stdio
289
289
 
290
- To install Elasticsearch Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/elasticsearch-mcp-server):
291
-
292
- ```bash
293
- npx -y @smithery/cli install elasticsearch-mcp-server --client claude
294
- ```
290
+ ### Option 1: Using uvx
295
291
 
296
- ### Option 2: Using uvx
297
-
298
- Using `uvx` will automatically install the package from PyPI, no need to clone the repository locally. Add the following configuration to Claude Desktop's config file `claude_desktop_config.json`.
292
+ Using `uvx` will automatically install the package from PyPI, no need to clone the repository locally. Add the following configuration to 's config file `claude_desktop_config.json`.
299
293
 
300
294
  ```json
301
295
  // For Elasticsearch
@@ -333,7 +327,7 @@ Using `uvx` will automatically install the package from PyPI, no need to clone t
333
327
  }
334
328
  ```
335
329
 
336
- ### Option 3: Using uv with local development
330
+ ### Option 2: Using uv with local development
337
331
 
338
332
  Using `uv` requires cloning the repository locally and specifying the path to the source code. Add the following configuration to Claude Desktop's config file `claude_desktop_config.json`.
339
333
 
@@ -379,20 +373,24 @@ Using `uv` requires cloning the repository locally and specifying the path to th
379
373
  }
380
374
  ```
381
375
 
382
- - On macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
383
- - On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
376
+ ## SSE
384
377
 
385
- Restart Claude Desktop to load the new MCP server.
378
+ ```bash
379
+ # By default, the SSE MCP server will serve on http://127.0.0.1:8000/sse
380
+ uv run src/server.py elasticsearch --transport sse
386
381
 
387
- Now you can interact with your Elasticsearch/OpenSearch cluster through Claude using natural language commands like:
388
- - "List all indices in the cluster"
389
- - "How old is the student Bob?"
390
- - "Show me the cluster health status"
382
+ # The host, port, and path can be specified using the --host, --port, and --path options
383
+ uv run src/server.py elasticsearch --transport sse --host 0.0.0.0 --port 8000 --path /sse
384
+ ```
391
385
 
392
- ## Usage with Anthropic MCP Client
386
+ ## Streamable HTTP
387
+
388
+ ```bash
389
+ # By default, the Streamable HTTP MCP server will serve on http://127.0.0.1:8000/mcp
390
+ uv run src/server.py elasticsearch --transport streamable-http
393
391
 
394
- ```python
395
- uv run mcp_client/client.py src/server.py
392
+ # The host, port, and path can be specified using the --host, --port, and --path options
393
+ uv run src/server.py elasticsearch --transport streamable-http --host 0.0.0.0 --port 8000 --path /mcp
396
394
  ```
397
395
 
398
396
  ## License
@@ -1,7 +1,10 @@
1
+
1
2
  # Elasticsearch/OpenSearch MCP Server
2
3
 
3
4
  [![smithery badge](https://smithery.ai/badge/elasticsearch-mcp-server)](https://smithery.ai/server/elasticsearch-mcp-server)
4
5
 
6
+ [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/cr7258-elasticsearch-mcp-server-badge.png)](https://mseep.ai/app/cr7258-elasticsearch-mcp-server)
7
+
5
8
  ## Overview
6
9
 
7
10
  A Model Context Protocol (MCP) server implementation that provides Elasticsearch and OpenSearch interaction. This server enables searching documents, analyzing indices, and managing cluster through a set of tools.
@@ -65,19 +68,11 @@ The default Elasticsearch username is `elastic` and password is `test123`. The d
65
68
 
66
69
  You can access Kibana/OpenSearch Dashboards from http://localhost:5601.
67
70
 
68
- ## Usage with Claude Desktop
69
-
70
- ### Option 1: Installing via Smithery
71
+ ## Stdio
71
72
 
72
- To install Elasticsearch Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/elasticsearch-mcp-server):
73
-
74
- ```bash
75
- npx -y @smithery/cli install elasticsearch-mcp-server --client claude
76
- ```
73
+ ### Option 1: Using uvx
77
74
 
78
- ### Option 2: Using uvx
79
-
80
- Using `uvx` will automatically install the package from PyPI, no need to clone the repository locally. Add the following configuration to Claude Desktop's config file `claude_desktop_config.json`.
75
+ Using `uvx` will automatically install the package from PyPI, no need to clone the repository locally. Add the following configuration to 's config file `claude_desktop_config.json`.
81
76
 
82
77
  ```json
83
78
  // For Elasticsearch
@@ -115,7 +110,7 @@ Using `uvx` will automatically install the package from PyPI, no need to clone t
115
110
  }
116
111
  ```
117
112
 
118
- ### Option 3: Using uv with local development
113
+ ### Option 2: Using uv with local development
119
114
 
120
115
  Using `uv` requires cloning the repository locally and specifying the path to the source code. Add the following configuration to Claude Desktop's config file `claude_desktop_config.json`.
121
116
 
@@ -161,20 +156,24 @@ Using `uv` requires cloning the repository locally and specifying the path to th
161
156
  }
162
157
  ```
163
158
 
164
- - On macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
165
- - On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
159
+ ## SSE
166
160
 
167
- Restart Claude Desktop to load the new MCP server.
161
+ ```bash
162
+ # By default, the SSE MCP server will serve on http://127.0.0.1:8000/sse
163
+ uv run src/server.py elasticsearch --transport sse
168
164
 
169
- Now you can interact with your Elasticsearch/OpenSearch cluster through Claude using natural language commands like:
170
- - "List all indices in the cluster"
171
- - "How old is the student Bob?"
172
- - "Show me the cluster health status"
165
+ # The host, port, and path can be specified using the --host, --port, and --path options
166
+ uv run src/server.py elasticsearch --transport sse --host 0.0.0.0 --port 8000 --path /sse
167
+ ```
173
168
 
174
- ## Usage with Anthropic MCP Client
169
+ ## Streamable HTTP
170
+
171
+ ```bash
172
+ # By default, the Streamable HTTP MCP server will serve on http://127.0.0.1:8000/mcp
173
+ uv run src/server.py elasticsearch --transport streamable-http
175
174
 
176
- ```python
177
- uv run mcp_client/client.py src/server.py
175
+ # The host, port, and path can be specified using the --host, --port, and --path options
176
+ uv run src/server.py elasticsearch --transport streamable-http --host 0.0.0.0 --port 8000 --path /mcp
178
177
  ```
179
178
 
180
179
  ## License
@@ -15,7 +15,7 @@ class LoggerConfig(py_set.BaseSettings):
15
15
 
16
16
 
17
17
  class ElasticsearchConfig(py_set.BaseSettings):
18
- host: str = getenv("ELASTICSEARCH_HOST", "")
18
+ host: str = getenv("ELASTICSEARCH_HOSTS", "")
19
19
  port: int = int(getenv("ELASTICSEARCH_PORT", "30930"))
20
20
  scroll_size: int = 10_000
21
21
  scroll: str = "1m"
@@ -1,19 +1,18 @@
1
1
  [project]
2
2
  name = "opensearch-mcp-server"
3
- version = "2.0.3"
3
+ version = "2.0.5"
4
4
  description = "MCP Server for interacting with Elasticsearch and OpenSearch"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
7
7
  dependencies = [
8
8
  "elasticsearch==8.17.2",
9
9
  "opensearch-py==2.8.0",
10
- "mcp==1.6.0",
10
+ "mcp==1.9.2",
11
11
  "python-dotenv==1.1.0",
12
- "fastmcp==0.4.1",
12
+ "fastmcp==2.8.0",
13
13
  "anthropic==0.49.0",
14
14
  "tomli==2.2.1",
15
15
  "tomli-w==1.2.0",
16
- "toml==0.10.2",
17
16
  ]
18
17
 
19
18
  [project.license]
@@ -6,11 +6,11 @@ startCommand:
6
6
  # JSON Schema defining the configuration options for the MCP.
7
7
  type: object
8
8
  required:
9
- - elasticsearchHost
9
+ - elasticsearchHosts
10
10
  - elasticsearchUsername
11
11
  - elasticsearchPassword
12
12
  properties:
13
- elasticsearchHost:
13
+ elasticsearchHosts:
14
14
  type: string
15
15
  description: The host URL of the Elasticsearch cluster.
16
16
  elasticsearchUsername:
@@ -22,4 +22,4 @@ startCommand:
22
22
  commandFunction:
23
23
  # A function that produces the CLI command to start the MCP on stdio.
24
24
  |-
25
- (config) => ({ command: 'elasticsearch-mcp-server', env: { ELASTICSEARCH_HOST: config.elasticsearchHost, ELASTICSEARCH_USERNAME: config.elasticsearchUsername, ELASTICSEARCH_PASSWORD: config.elasticsearchPassword } })
25
+ (config) => ({ command: 'elasticsearch-mcp-server', env: { ELASTICSEARCH_HOSTS: config.elasticsearchHosts, ELASTICSEARCH_USERNAME: config.elasticsearchUsername, ELASTICSEARCH_PASSWORD: config.elasticsearchPassword } })
@@ -0,0 +1,124 @@
1
+ import logging
2
+ import sys
3
+ import argparse
4
+
5
+ from fastmcp import FastMCP
6
+
7
+ from src.clients import create_search_client
8
+ from src.tools.alias import AliasTools
9
+ from src.tools.cluster import ClusterTools
10
+ from src.tools.document import DocumentTools
11
+ from src.tools.general import GeneralTools
12
+ from src.tools.index import IndexTools
13
+ from src.tools.register import ToolsRegister
14
+ from src.version import __version__ as VERSION
15
+
16
+ class SearchMCPServer:
17
+ def __init__(self, engine_type):
18
+ # Set engine type
19
+ self.engine_type = engine_type
20
+ self.name = f"{self.engine_type}_mcp_server"
21
+ self.mcp = FastMCP(self.name)
22
+ self.logger = logging.getLogger()
23
+ self.logger.info(f"Initializing {self.name}, Version: {VERSION}")
24
+
25
+ # Create the corresponding search client
26
+ self.search_client = create_search_client(self.engine_type)
27
+
28
+ # Initialize tools
29
+ self._register_tools()
30
+
31
+ def _register_tools(self):
32
+ """Register all MCP tools."""
33
+ # Create a tools register
34
+ register = ToolsRegister(self.logger, self.search_client, self.mcp)
35
+
36
+ # Define all tool classes to register
37
+ tool_classes = [
38
+ IndexTools,
39
+ DocumentTools,
40
+ ClusterTools,
41
+ AliasTools,
42
+ GeneralTools,
43
+ ]
44
+ # Register all tools
45
+ register.register_all_tools(tool_classes)
46
+
47
+
48
+ def run_search_server(engine_type, transport, host, port, path):
49
+ """Run search server with specified engine type and transport options.
50
+
51
+ Args:
52
+ engine_type: Type of search engine to use ("elasticsearch" or "opensearch")
53
+ transport: Transport protocol to use ("stdio", "streamable-http", or "sse")
54
+ host: Host to bind to when using HTTP transports
55
+ port: Port to bind to when using HTTP transports
56
+ path: URL path prefix for HTTP transports
57
+ """
58
+
59
+ server = SearchMCPServer(engine_type=engine_type)
60
+
61
+ if transport in ["streamable-http", "sse"]:
62
+ server.logger.info(f"Starting {server.name} with {transport} transport on {host}:{port}{path}")
63
+ server.mcp.run(transport=transport, host=host, port=port, path=path)
64
+ else:
65
+ server.logger.info(f"Starting {server.name} with {transport} transport")
66
+ server.mcp.run(transport=transport)
67
+
68
+ def elasticsearch_mcp_server():
69
+ """Entry point for Elasticsearch MCP server."""
70
+ run_search_server(engine_type="elasticsearch")
71
+
72
+ def opensearch_mcp_server():
73
+ """Entry point for OpenSearch MCP server."""
74
+ run_search_server(engine_type="opensearch")
75
+
76
+ if __name__ == "__main__":
77
+ # Parse command line arguments
78
+ parser = argparse.ArgumentParser(description=f"Elasticsearch/OpenSearch MCP Server v{VERSION}")
79
+ parser.add_argument(
80
+ "engine_type",
81
+ nargs="?",
82
+ default="elasticsearch",
83
+ choices=["elasticsearch", "opensearch"],
84
+ help="Search engine type to use (default: elasticsearch)"
85
+ )
86
+ parser.add_argument(
87
+ "--transport", "-t",
88
+ default="stdio",
89
+ choices=["stdio", "streamable-http", "sse"],
90
+ help="Transport protocol to use (default: stdio)"
91
+ )
92
+ parser.add_argument(
93
+ "--host", "-H",
94
+ default="127.0.0.1",
95
+ help="Host to bind to when using HTTP transports (default: 127.0.0.1)"
96
+ )
97
+ parser.add_argument(
98
+ "--port", "-p",
99
+ type=int,
100
+ default=8000,
101
+ help="Port to bind to when using HTTP transports (default: 8000)"
102
+ )
103
+ parser.add_argument(
104
+ "--path", "-P",
105
+ help="URL path prefix for HTTP transports (default: /mcp for streamable-http, /sse for sse)"
106
+ )
107
+
108
+ args = parser.parse_args()
109
+
110
+ # Set default path based on transport type if not specified
111
+ if args.path is None:
112
+ if args.transport == "sse":
113
+ args.path = "/sse"
114
+ else:
115
+ args.path = "/mcp"
116
+
117
+ # Run the server with the specified options
118
+ run_search_server(
119
+ engine_type=args.engine_type,
120
+ transport=args.transport,
121
+ host=args.host,
122
+ port=args.port,
123
+ path=args.path
124
+ )
@@ -0,0 +1 @@
1
+ __version__ = "2.0.5"
@@ -44,6 +44,18 @@ wheels = [
44
44
  { url = "https://files.pythonhosted.org/packages/a1/ee/48ca1a7c89ffec8b6a0c5d02b89c305671d5ffd8d3c94acf8b8c408575bb/anyio-4.9.0-py3-none-any.whl", hash = "sha256:9f76d541cad6e36af7beb62e978876f3b41e3e04f2c1fbf0884604c0a9c4d93c", size = 100916 },
45
45
  ]
46
46
 
47
+ [[package]]
48
+ name = "authlib"
49
+ version = "1.6.0"
50
+ source = { registry = "https://pypi.org/simple" }
51
+ dependencies = [
52
+ { name = "cryptography" },
53
+ ]
54
+ sdist = { url = "https://files.pythonhosted.org/packages/a2/9d/b1e08d36899c12c8b894a44a5583ee157789f26fc4b176f8e4b6217b56e1/authlib-1.6.0.tar.gz", hash = "sha256:4367d32031b7af175ad3a323d571dc7257b7099d55978087ceae4a0d88cd3210", size = 158371 }
55
+ wheels = [
56
+ { url = "https://files.pythonhosted.org/packages/84/29/587c189bbab1ccc8c86a03a5d0e13873df916380ef1be461ebe6acebf48d/authlib-1.6.0-py2.py3-none-any.whl", hash = "sha256:91685589498f79e8655e8a8947431ad6288831d643f11c55c2143ffcc738048d", size = 239981 },
57
+ ]
58
+
47
59
  [[package]]
48
60
  name = "certifi"
49
61
  version = "2025.1.31"
@@ -53,6 +65,63 @@ wheels = [
53
65
  { url = "https://files.pythonhosted.org/packages/38/fc/bce832fd4fd99766c04d1ee0eead6b0ec6486fb100ae5e74c1d91292b982/certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe", size = 166393 },
54
66
  ]
55
67
 
68
+ [[package]]
69
+ name = "cffi"
70
+ version = "1.17.1"
71
+ source = { registry = "https://pypi.org/simple" }
72
+ dependencies = [
73
+ { name = "pycparser" },
74
+ ]
75
+ sdist = { url = "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824", size = 516621 }
76
+ wheels = [
77
+ { url = "https://files.pythonhosted.org/packages/90/07/f44ca684db4e4f08a3fdc6eeb9a0d15dc6883efc7b8c90357fdbf74e186c/cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14", size = 182191 },
78
+ { url = "https://files.pythonhosted.org/packages/08/fd/cc2fedbd887223f9f5d170c96e57cbf655df9831a6546c1727ae13fa977a/cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67", size = 178592 },
79
+ { url = "https://files.pythonhosted.org/packages/de/cc/4635c320081c78d6ffc2cab0a76025b691a91204f4aa317d568ff9280a2d/cffi-1.17.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382", size = 426024 },
80
+ { url = "https://files.pythonhosted.org/packages/b6/7b/3b2b250f3aab91abe5f8a51ada1b717935fdaec53f790ad4100fe2ec64d1/cffi-1.17.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702", size = 448188 },
81
+ { url = "https://files.pythonhosted.org/packages/d3/48/1b9283ebbf0ec065148d8de05d647a986c5f22586b18120020452fff8f5d/cffi-1.17.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3", size = 455571 },
82
+ { url = "https://files.pythonhosted.org/packages/40/87/3b8452525437b40f39ca7ff70276679772ee7e8b394934ff60e63b7b090c/cffi-1.17.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6", size = 436687 },
83
+ { url = "https://files.pythonhosted.org/packages/8d/fb/4da72871d177d63649ac449aec2e8a29efe0274035880c7af59101ca2232/cffi-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17", size = 446211 },
84
+ { url = "https://files.pythonhosted.org/packages/ab/a0/62f00bcb411332106c02b663b26f3545a9ef136f80d5df746c05878f8c4b/cffi-1.17.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8", size = 461325 },
85
+ { url = "https://files.pythonhosted.org/packages/36/83/76127035ed2e7e27b0787604d99da630ac3123bfb02d8e80c633f218a11d/cffi-1.17.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e", size = 438784 },
86
+ { url = "https://files.pythonhosted.org/packages/21/81/a6cd025db2f08ac88b901b745c163d884641909641f9b826e8cb87645942/cffi-1.17.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be", size = 461564 },
87
+ { url = "https://files.pythonhosted.org/packages/f8/fe/4d41c2f200c4a457933dbd98d3cf4e911870877bd94d9656cc0fcb390681/cffi-1.17.1-cp310-cp310-win32.whl", hash = "sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c", size = 171804 },
88
+ { url = "https://files.pythonhosted.org/packages/d1/b6/0b0f5ab93b0df4acc49cae758c81fe4e5ef26c3ae2e10cc69249dfd8b3ab/cffi-1.17.1-cp310-cp310-win_amd64.whl", hash = "sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15", size = 181299 },
89
+ { url = "https://files.pythonhosted.org/packages/6b/f4/927e3a8899e52a27fa57a48607ff7dc91a9ebe97399b357b85a0c7892e00/cffi-1.17.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401", size = 182264 },
90
+ { url = "https://files.pythonhosted.org/packages/6c/f5/6c3a8efe5f503175aaddcbea6ad0d2c96dad6f5abb205750d1b3df44ef29/cffi-1.17.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf", size = 178651 },
91
+ { url = "https://files.pythonhosted.org/packages/94/dd/a3f0118e688d1b1a57553da23b16bdade96d2f9bcda4d32e7d2838047ff7/cffi-1.17.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4", size = 445259 },
92
+ { url = "https://files.pythonhosted.org/packages/2e/ea/70ce63780f096e16ce8588efe039d3c4f91deb1dc01e9c73a287939c79a6/cffi-1.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41", size = 469200 },
93
+ { url = "https://files.pythonhosted.org/packages/1c/a0/a4fa9f4f781bda074c3ddd57a572b060fa0df7655d2a4247bbe277200146/cffi-1.17.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1", size = 477235 },
94
+ { url = "https://files.pythonhosted.org/packages/62/12/ce8710b5b8affbcdd5c6e367217c242524ad17a02fe5beec3ee339f69f85/cffi-1.17.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6", size = 459721 },
95
+ { url = "https://files.pythonhosted.org/packages/ff/6b/d45873c5e0242196f042d555526f92aa9e0c32355a1be1ff8c27f077fd37/cffi-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d", size = 467242 },
96
+ { url = "https://files.pythonhosted.org/packages/1a/52/d9a0e523a572fbccf2955f5abe883cfa8bcc570d7faeee06336fbd50c9fc/cffi-1.17.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6", size = 477999 },
97
+ { url = "https://files.pythonhosted.org/packages/44/74/f2a2460684a1a2d00ca799ad880d54652841a780c4c97b87754f660c7603/cffi-1.17.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f", size = 454242 },
98
+ { url = "https://files.pythonhosted.org/packages/f8/4a/34599cac7dfcd888ff54e801afe06a19c17787dfd94495ab0c8d35fe99fb/cffi-1.17.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b", size = 478604 },
99
+ { url = "https://files.pythonhosted.org/packages/34/33/e1b8a1ba29025adbdcda5fb3a36f94c03d771c1b7b12f726ff7fef2ebe36/cffi-1.17.1-cp311-cp311-win32.whl", hash = "sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655", size = 171727 },
100
+ { url = "https://files.pythonhosted.org/packages/3d/97/50228be003bb2802627d28ec0627837ac0bf35c90cf769812056f235b2d1/cffi-1.17.1-cp311-cp311-win_amd64.whl", hash = "sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0", size = 181400 },
101
+ { url = "https://files.pythonhosted.org/packages/5a/84/e94227139ee5fb4d600a7a4927f322e1d4aea6fdc50bd3fca8493caba23f/cffi-1.17.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4", size = 183178 },
102
+ { url = "https://files.pythonhosted.org/packages/da/ee/fb72c2b48656111c4ef27f0f91da355e130a923473bf5ee75c5643d00cca/cffi-1.17.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c", size = 178840 },
103
+ { url = "https://files.pythonhosted.org/packages/cc/b6/db007700f67d151abadf508cbfd6a1884f57eab90b1bb985c4c8c02b0f28/cffi-1.17.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36", size = 454803 },
104
+ { url = "https://files.pythonhosted.org/packages/1a/df/f8d151540d8c200eb1c6fba8cd0dfd40904f1b0682ea705c36e6c2e97ab3/cffi-1.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5", size = 478850 },
105
+ { url = "https://files.pythonhosted.org/packages/28/c0/b31116332a547fd2677ae5b78a2ef662dfc8023d67f41b2a83f7c2aa78b1/cffi-1.17.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff", size = 485729 },
106
+ { url = "https://files.pythonhosted.org/packages/91/2b/9a1ddfa5c7f13cab007a2c9cc295b70fbbda7cb10a286aa6810338e60ea1/cffi-1.17.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99", size = 471256 },
107
+ { url = "https://files.pythonhosted.org/packages/b2/d5/da47df7004cb17e4955df6a43d14b3b4ae77737dff8bf7f8f333196717bf/cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93", size = 479424 },
108
+ { url = "https://files.pythonhosted.org/packages/0b/ac/2a28bcf513e93a219c8a4e8e125534f4f6db03e3179ba1c45e949b76212c/cffi-1.17.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3", size = 484568 },
109
+ { url = "https://files.pythonhosted.org/packages/d4/38/ca8a4f639065f14ae0f1d9751e70447a261f1a30fa7547a828ae08142465/cffi-1.17.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8", size = 488736 },
110
+ { url = "https://files.pythonhosted.org/packages/86/c5/28b2d6f799ec0bdecf44dced2ec5ed43e0eb63097b0f58c293583b406582/cffi-1.17.1-cp312-cp312-win32.whl", hash = "sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65", size = 172448 },
111
+ { url = "https://files.pythonhosted.org/packages/50/b9/db34c4755a7bd1cb2d1603ac3863f22bcecbd1ba29e5ee841a4bc510b294/cffi-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903", size = 181976 },
112
+ { url = "https://files.pythonhosted.org/packages/8d/f8/dd6c246b148639254dad4d6803eb6a54e8c85c6e11ec9df2cffa87571dbe/cffi-1.17.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e", size = 182989 },
113
+ { url = "https://files.pythonhosted.org/packages/8b/f1/672d303ddf17c24fc83afd712316fda78dc6fce1cd53011b839483e1ecc8/cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2", size = 178802 },
114
+ { url = "https://files.pythonhosted.org/packages/0e/2d/eab2e858a91fdff70533cab61dcff4a1f55ec60425832ddfdc9cd36bc8af/cffi-1.17.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3", size = 454792 },
115
+ { url = "https://files.pythonhosted.org/packages/75/b2/fbaec7c4455c604e29388d55599b99ebcc250a60050610fadde58932b7ee/cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683", size = 478893 },
116
+ { url = "https://files.pythonhosted.org/packages/4f/b7/6e4a2162178bf1935c336d4da8a9352cccab4d3a5d7914065490f08c0690/cffi-1.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5", size = 485810 },
117
+ { url = "https://files.pythonhosted.org/packages/c7/8a/1d0e4a9c26e54746dc08c2c6c037889124d4f59dffd853a659fa545f1b40/cffi-1.17.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4", size = 471200 },
118
+ { url = "https://files.pythonhosted.org/packages/26/9f/1aab65a6c0db35f43c4d1b4f580e8df53914310afc10ae0397d29d697af4/cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd", size = 479447 },
119
+ { url = "https://files.pythonhosted.org/packages/5f/e4/fb8b3dd8dc0e98edf1135ff067ae070bb32ef9d509d6cb0f538cd6f7483f/cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed", size = 484358 },
120
+ { url = "https://files.pythonhosted.org/packages/f1/47/d7145bf2dc04684935d57d67dff9d6d795b2ba2796806bb109864be3a151/cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9", size = 488469 },
121
+ { url = "https://files.pythonhosted.org/packages/bf/ee/f94057fa6426481d663b88637a9a10e859e492c73d0384514a17d78ee205/cffi-1.17.1-cp313-cp313-win32.whl", hash = "sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d", size = 172475 },
122
+ { url = "https://files.pythonhosted.org/packages/7c/fc/6a8cb64e5f0324877d503c854da15d76c1e50eb722e320b15345c4d0c6de/cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a", size = 182009 },
123
+ ]
124
+
56
125
  [[package]]
57
126
  name = "charset-normalizer"
58
127
  version = "3.4.1"
@@ -135,6 +204,53 @@ wheels = [
135
204
  { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 },
136
205
  ]
137
206
 
207
+ [[package]]
208
+ name = "cryptography"
209
+ version = "45.0.4"
210
+ source = { registry = "https://pypi.org/simple" }
211
+ dependencies = [
212
+ { name = "cffi", marker = "platform_python_implementation != 'PyPy'" },
213
+ ]
214
+ sdist = { url = "https://files.pythonhosted.org/packages/fe/c8/a2a376a8711c1e11708b9c9972e0c3223f5fc682552c82d8db844393d6ce/cryptography-45.0.4.tar.gz", hash = "sha256:7405ade85c83c37682c8fe65554759800a4a8c54b2d96e0f8ad114d31b808d57", size = 744890 }
215
+ wheels = [
216
+ { url = "https://files.pythonhosted.org/packages/cc/1c/92637793de053832523b410dbe016d3f5c11b41d0cf6eef8787aabb51d41/cryptography-45.0.4-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:425a9a6ac2823ee6e46a76a21a4e8342d8fa5c01e08b823c1f19a8b74f096069", size = 7055712 },
217
+ { url = "https://files.pythonhosted.org/packages/ba/14/93b69f2af9ba832ad6618a03f8a034a5851dc9a3314336a3d71c252467e1/cryptography-45.0.4-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:680806cf63baa0039b920f4976f5f31b10e772de42f16310a6839d9f21a26b0d", size = 4205335 },
218
+ { url = "https://files.pythonhosted.org/packages/67/30/fae1000228634bf0b647fca80403db5ca9e3933b91dd060570689f0bd0f7/cryptography-45.0.4-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4ca0f52170e821bc8da6fc0cc565b7bb8ff8d90d36b5e9fdd68e8a86bdf72036", size = 4431487 },
219
+ { url = "https://files.pythonhosted.org/packages/6d/5a/7dffcf8cdf0cb3c2430de7404b327e3db64735747d641fc492539978caeb/cryptography-45.0.4-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f3fe7a5ae34d5a414957cc7f457e2b92076e72938423ac64d215722f6cf49a9e", size = 4208922 },
220
+ { url = "https://files.pythonhosted.org/packages/c6/f3/528729726eb6c3060fa3637253430547fbaaea95ab0535ea41baa4a6fbd8/cryptography-45.0.4-cp311-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:25eb4d4d3e54595dc8adebc6bbd5623588991d86591a78c2548ffb64797341e2", size = 3900433 },
221
+ { url = "https://files.pythonhosted.org/packages/d9/4a/67ba2e40f619e04d83c32f7e1d484c1538c0800a17c56a22ff07d092ccc1/cryptography-45.0.4-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:ce1678a2ccbe696cf3af15a75bb72ee008d7ff183c9228592ede9db467e64f1b", size = 4464163 },
222
+ { url = "https://files.pythonhosted.org/packages/7e/9a/b4d5aa83661483ac372464809c4b49b5022dbfe36b12fe9e323ca8512420/cryptography-45.0.4-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:49fe9155ab32721b9122975e168a6760d8ce4cffe423bcd7ca269ba41b5dfac1", size = 4208687 },
223
+ { url = "https://files.pythonhosted.org/packages/db/b7/a84bdcd19d9c02ec5807f2ec2d1456fd8451592c5ee353816c09250e3561/cryptography-45.0.4-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:2882338b2a6e0bd337052e8b9007ced85c637da19ef9ecaf437744495c8c2999", size = 4463623 },
224
+ { url = "https://files.pythonhosted.org/packages/d8/84/69707d502d4d905021cac3fb59a316344e9f078b1da7fb43ecde5e10840a/cryptography-45.0.4-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:23b9c3ea30c3ed4db59e7b9619272e94891f8a3a5591d0b656a7582631ccf750", size = 4332447 },
225
+ { url = "https://files.pythonhosted.org/packages/f3/ee/d4f2ab688e057e90ded24384e34838086a9b09963389a5ba6854b5876598/cryptography-45.0.4-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b0a97c927497e3bc36b33987abb99bf17a9a175a19af38a892dc4bbb844d7ee2", size = 4572830 },
226
+ { url = "https://files.pythonhosted.org/packages/70/d4/994773a261d7ff98034f72c0e8251fe2755eac45e2265db4c866c1c6829c/cryptography-45.0.4-cp311-abi3-win32.whl", hash = "sha256:e00a6c10a5c53979d6242f123c0a97cff9f3abed7f064fc412c36dc521b5f257", size = 2932769 },
227
+ { url = "https://files.pythonhosted.org/packages/5a/42/c80bd0b67e9b769b364963b5252b17778a397cefdd36fa9aa4a5f34c599a/cryptography-45.0.4-cp311-abi3-win_amd64.whl", hash = "sha256:817ee05c6c9f7a69a16200f0c90ab26d23a87701e2a284bd15156783e46dbcc8", size = 3410441 },
228
+ { url = "https://files.pythonhosted.org/packages/ce/0b/2488c89f3a30bc821c9d96eeacfcab6ff3accc08a9601ba03339c0fd05e5/cryptography-45.0.4-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:964bcc28d867e0f5491a564b7debb3ffdd8717928d315d12e0d7defa9e43b723", size = 7031836 },
229
+ { url = "https://files.pythonhosted.org/packages/fe/51/8c584ed426093aac257462ae62d26ad61ef1cbf5b58d8b67e6e13c39960e/cryptography-45.0.4-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6a5bf57554e80f75a7db3d4b1dacaa2764611ae166ab42ea9a72bcdb5d577637", size = 4195746 },
230
+ { url = "https://files.pythonhosted.org/packages/5c/7d/4b0ca4d7af95a704eef2f8f80a8199ed236aaf185d55385ae1d1610c03c2/cryptography-45.0.4-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:46cf7088bf91bdc9b26f9c55636492c1cce3e7aaf8041bbf0243f5e5325cfb2d", size = 4424456 },
231
+ { url = "https://files.pythonhosted.org/packages/1d/45/5fabacbc6e76ff056f84d9f60eeac18819badf0cefc1b6612ee03d4ab678/cryptography-45.0.4-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:7bedbe4cc930fa4b100fc845ea1ea5788fcd7ae9562e669989c11618ae8d76ee", size = 4198495 },
232
+ { url = "https://files.pythonhosted.org/packages/55/b7/ffc9945b290eb0a5d4dab9b7636706e3b5b92f14ee5d9d4449409d010d54/cryptography-45.0.4-cp37-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:eaa3e28ea2235b33220b949c5a0d6cf79baa80eab2eb5607ca8ab7525331b9ff", size = 3885540 },
233
+ { url = "https://files.pythonhosted.org/packages/7f/e3/57b010282346980475e77d414080acdcb3dab9a0be63071efc2041a2c6bd/cryptography-45.0.4-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:7ef2dde4fa9408475038fc9aadfc1fb2676b174e68356359632e980c661ec8f6", size = 4452052 },
234
+ { url = "https://files.pythonhosted.org/packages/37/e6/ddc4ac2558bf2ef517a358df26f45bc774a99bf4653e7ee34b5e749c03e3/cryptography-45.0.4-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:6a3511ae33f09094185d111160fd192c67aa0a2a8d19b54d36e4c78f651dc5ad", size = 4198024 },
235
+ { url = "https://files.pythonhosted.org/packages/3a/c0/85fa358ddb063ec588aed4a6ea1df57dc3e3bc1712d87c8fa162d02a65fc/cryptography-45.0.4-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:06509dc70dd71fa56eaa138336244e2fbaf2ac164fc9b5e66828fccfd2b680d6", size = 4451442 },
236
+ { url = "https://files.pythonhosted.org/packages/33/67/362d6ec1492596e73da24e669a7fbbaeb1c428d6bf49a29f7a12acffd5dc/cryptography-45.0.4-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:5f31e6b0a5a253f6aa49be67279be4a7e5a4ef259a9f33c69f7d1b1191939872", size = 4325038 },
237
+ { url = "https://files.pythonhosted.org/packages/53/75/82a14bf047a96a1b13ebb47fb9811c4f73096cfa2e2b17c86879687f9027/cryptography-45.0.4-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:944e9ccf67a9594137f942d5b52c8d238b1b4e46c7a0c2891b7ae6e01e7c80a4", size = 4560964 },
238
+ { url = "https://files.pythonhosted.org/packages/cd/37/1a3cba4c5a468ebf9b95523a5ef5651244693dc712001e276682c278fc00/cryptography-45.0.4-cp37-abi3-win32.whl", hash = "sha256:c22fe01e53dc65edd1945a2e6f0015e887f84ced233acecb64b4daadb32f5c97", size = 2924557 },
239
+ { url = "https://files.pythonhosted.org/packages/2a/4b/3256759723b7e66380397d958ca07c59cfc3fb5c794fb5516758afd05d41/cryptography-45.0.4-cp37-abi3-win_amd64.whl", hash = "sha256:627ba1bc94f6adf0b0a2e35d87020285ead22d9f648c7e75bb64f367375f3b22", size = 3395508 },
240
+ { url = "https://files.pythonhosted.org/packages/16/33/b38e9d372afde56906a23839302c19abdac1c505bfb4776c1e4b07c3e145/cryptography-45.0.4-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a77c6fb8d76e9c9f99f2f3437c1a4ac287b34eaf40997cfab1e9bd2be175ac39", size = 3580103 },
241
+ { url = "https://files.pythonhosted.org/packages/c4/b9/357f18064ec09d4807800d05a48f92f3b369056a12f995ff79549fbb31f1/cryptography-45.0.4-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:7aad98a25ed8ac917fdd8a9c1e706e5a0956e06c498be1f713b61734333a4507", size = 4143732 },
242
+ { url = "https://files.pythonhosted.org/packages/c4/9c/7f7263b03d5db329093617648b9bd55c953de0b245e64e866e560f9aac07/cryptography-45.0.4-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3530382a43a0e524bc931f187fc69ef4c42828cf7d7f592f7f249f602b5a4ab0", size = 4385424 },
243
+ { url = "https://files.pythonhosted.org/packages/a6/5a/6aa9d8d5073d5acc0e04e95b2860ef2684b2bd2899d8795fc443013e263b/cryptography-45.0.4-pp310-pypy310_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:6b613164cb8425e2f8db5849ffb84892e523bf6d26deb8f9bb76ae86181fa12b", size = 4142438 },
244
+ { url = "https://files.pythonhosted.org/packages/42/1c/71c638420f2cdd96d9c2b287fec515faf48679b33a2b583d0f1eda3a3375/cryptography-45.0.4-pp310-pypy310_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:96d4819e25bf3b685199b304a0029ce4a3caf98947ce8a066c9137cc78ad2c58", size = 4384622 },
245
+ { url = "https://files.pythonhosted.org/packages/ef/ab/e3a055c34e97deadbf0d846e189237d3385dca99e1a7e27384c3b2292041/cryptography-45.0.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:b97737a3ffbea79eebb062eb0d67d72307195035332501722a9ca86bab9e3ab2", size = 3328911 },
246
+ { url = "https://files.pythonhosted.org/packages/ea/ba/cf442ae99ef363855ed84b39e0fb3c106ac66b7a7703f3c9c9cfe05412cb/cryptography-45.0.4-pp311-pypy311_pp73-macosx_10_9_x86_64.whl", hash = "sha256:4828190fb6c4bcb6ebc6331f01fe66ae838bb3bd58e753b59d4b22eb444b996c", size = 3590512 },
247
+ { url = "https://files.pythonhosted.org/packages/28/9a/a7d5bb87d149eb99a5abdc69a41e4e47b8001d767e5f403f78bfaafc7aa7/cryptography-45.0.4-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:03dbff8411206713185b8cebe31bc5c0eb544799a50c09035733716b386e61a4", size = 4146899 },
248
+ { url = "https://files.pythonhosted.org/packages/17/11/9361c2c71c42cc5c465cf294c8030e72fb0c87752bacbd7a3675245e3db3/cryptography-45.0.4-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:51dfbd4d26172d31150d84c19bbe06c68ea4b7f11bbc7b3a5e146b367c311349", size = 4388900 },
249
+ { url = "https://files.pythonhosted.org/packages/c0/76/f95b83359012ee0e670da3e41c164a0c256aeedd81886f878911581d852f/cryptography-45.0.4-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:0339a692de47084969500ee455e42c58e449461e0ec845a34a6a9b9bf7df7fb8", size = 4146422 },
250
+ { url = "https://files.pythonhosted.org/packages/09/ad/5429fcc4def93e577a5407988f89cf15305e64920203d4ac14601a9dc876/cryptography-45.0.4-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:0cf13c77d710131d33e63626bd55ae7c0efb701ebdc2b3a7952b9b23a0412862", size = 4388475 },
251
+ { url = "https://files.pythonhosted.org/packages/99/49/0ab9774f64555a1b50102757811508f5ace451cf5dc0a2d074a4b9deca6a/cryptography-45.0.4-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:bbc505d1dc469ac12a0a064214879eac6294038d6b24ae9f71faae1448a9608d", size = 3337594 },
252
+ ]
253
+
138
254
  [[package]]
139
255
  name = "distro"
140
256
  version = "1.9.0"
@@ -171,7 +287,7 @@ wheels = [
171
287
 
172
288
  [[package]]
173
289
  name = "elasticsearch-mcp-server"
174
- version = "2.0.3"
290
+ version = "2.0.5"
175
291
  source = { editable = "." }
176
292
  dependencies = [
177
293
  { name = "anthropic" },
@@ -180,7 +296,6 @@ dependencies = [
180
296
  { name = "mcp" },
181
297
  { name = "opensearch-py" },
182
298
  { name = "python-dotenv" },
183
- { name = "toml" },
184
299
  { name = "tomli" },
185
300
  { name = "tomli-w" },
186
301
  ]
@@ -189,11 +304,10 @@ dependencies = [
189
304
  requires-dist = [
190
305
  { name = "anthropic", specifier = "==0.49.0" },
191
306
  { name = "elasticsearch", specifier = "==8.17.2" },
192
- { name = "fastmcp", specifier = "==0.4.1" },
193
- { name = "mcp", specifier = "==1.6.0" },
307
+ { name = "fastmcp", specifier = "==2.8.0" },
308
+ { name = "mcp", specifier = "==1.9.2" },
194
309
  { name = "opensearch-py", specifier = "==2.8.0" },
195
310
  { name = "python-dotenv", specifier = "==1.1.0" },
196
- { name = "toml", specifier = "==0.10.2" },
197
311
  { name = "tomli", specifier = "==2.2.1" },
198
312
  { name = "tomli-w", specifier = "==1.2.0" },
199
313
  ]
@@ -217,19 +331,21 @@ wheels = [
217
331
 
218
332
  [[package]]
219
333
  name = "fastmcp"
220
- version = "0.4.1"
334
+ version = "2.8.0"
221
335
  source = { registry = "https://pypi.org/simple" }
222
336
  dependencies = [
337
+ { name = "authlib" },
338
+ { name = "exceptiongroup" },
223
339
  { name = "httpx" },
224
340
  { name = "mcp" },
225
- { name = "pydantic" },
226
- { name = "pydantic-settings" },
341
+ { name = "openapi-pydantic" },
227
342
  { name = "python-dotenv" },
343
+ { name = "rich" },
228
344
  { name = "typer" },
229
345
  ]
230
- sdist = { url = "https://files.pythonhosted.org/packages/6f/84/17b549133263d7ee77141970769bbc401525526bf1af043ea6842bce1a55/fastmcp-0.4.1.tar.gz", hash = "sha256:713ad3b8e4e04841c9e2f3ca022b053adb89a286ceffad0d69ae7b56f31cbe64", size = 785575 }
346
+ sdist = { url = "https://files.pythonhosted.org/packages/8d/a3/d5b2c47b25d13cca8108e077bf4a72b255b113fb525f4c22ce9ca5af9b08/fastmcp-2.8.0.tar.gz", hash = "sha256:8a6427ece23d0a324d4be2043598c8b89a91b2b5688873d8ae1e7aeaa7960513", size = 2554559 }
231
347
  wheels = [
232
- { url = "https://files.pythonhosted.org/packages/79/0b/008a340435fe8f0879e9d608f48af2737ad48440e09bd33b83b3fd03798b/fastmcp-0.4.1-py3-none-any.whl", hash = "sha256:664b42c376fb89ec90a50c9433f5a1f4d24f36696d6c41b024b427ae545f9619", size = 35282 },
348
+ { url = "https://files.pythonhosted.org/packages/2c/05/b9b0ee091578ff37da8ef0bee8fff80bed95daff61834982a6064e3e327f/fastmcp-2.8.0-py3-none-any.whl", hash = "sha256:772468e98dacd55ab3381f49dd2583341c41b0e5ef0d9c7620fd43833d949c0c", size = 137492 },
233
349
  ]
234
350
 
235
351
  [[package]]
@@ -360,7 +476,7 @@ wheels = [
360
476
 
361
477
  [[package]]
362
478
  name = "mcp"
363
- version = "1.6.0"
479
+ version = "1.9.2"
364
480
  source = { registry = "https://pypi.org/simple" }
365
481
  dependencies = [
366
482
  { name = "anyio" },
@@ -368,13 +484,14 @@ dependencies = [
368
484
  { name = "httpx-sse" },
369
485
  { name = "pydantic" },
370
486
  { name = "pydantic-settings" },
487
+ { name = "python-multipart" },
371
488
  { name = "sse-starlette" },
372
489
  { name = "starlette" },
373
- { name = "uvicorn" },
490
+ { name = "uvicorn", marker = "sys_platform != 'emscripten'" },
374
491
  ]
375
- sdist = { url = "https://files.pythonhosted.org/packages/95/d2/f587cb965a56e992634bebc8611c5b579af912b74e04eb9164bd49527d21/mcp-1.6.0.tar.gz", hash = "sha256:d9324876de2c5637369f43161cd71eebfd803df5a95e46225cab8d280e366723", size = 200031 }
492
+ sdist = { url = "https://files.pythonhosted.org/packages/ea/03/77c49cce3ace96e6787af624611b627b2828f0dca0f8df6f330a10eea51e/mcp-1.9.2.tar.gz", hash = "sha256:3c7651c053d635fd235990a12e84509fe32780cd359a5bbef352e20d4d963c05", size = 333066 }
376
493
  wheels = [
377
- { url = "https://files.pythonhosted.org/packages/10/30/20a7f33b0b884a9d14dd3aa94ff1ac9da1479fe2ad66dd9e2736075d2506/mcp-1.6.0-py3-none-any.whl", hash = "sha256:7bd24c6ea042dbec44c754f100984d186620d8b841ec30f1b19eda9b93a634d0", size = 76077 },
494
+ { url = "https://files.pythonhosted.org/packages/5d/a6/8f5ee9da9f67c0fd8933f63d6105f02eabdac8a8c0926728368ffbb6744d/mcp-1.9.2-py3-none-any.whl", hash = "sha256:bc29f7fd67d157fef378f89a4210384f5fecf1168d0feb12d22929818723f978", size = 131083 },
378
495
  ]
379
496
 
380
497
  [[package]]
@@ -386,6 +503,18 @@ wheels = [
386
503
  { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979 },
387
504
  ]
388
505
 
506
+ [[package]]
507
+ name = "openapi-pydantic"
508
+ version = "0.5.1"
509
+ source = { registry = "https://pypi.org/simple" }
510
+ dependencies = [
511
+ { name = "pydantic" },
512
+ ]
513
+ sdist = { url = "https://files.pythonhosted.org/packages/02/2e/58d83848dd1a79cb92ed8e63f6ba901ca282c5f09d04af9423ec26c56fd7/openapi_pydantic-0.5.1.tar.gz", hash = "sha256:ff6835af6bde7a459fb93eb93bb92b8749b754fc6e51b2f1590a19dc3005ee0d", size = 60892 }
514
+ wheels = [
515
+ { url = "https://files.pythonhosted.org/packages/12/cf/03675d8bd8ecbf4445504d8071adab19f5f993676795708e36402ab38263/openapi_pydantic-0.5.1-py3-none-any.whl", hash = "sha256:a3a09ef4586f5bd760a8df7f43028b60cafb6d9f61de2acba9574766255ab146", size = 96381 },
516
+ ]
517
+
389
518
  [[package]]
390
519
  name = "opensearch-py"
391
520
  version = "2.8.0"
@@ -402,6 +531,15 @@ wheels = [
402
531
  { url = "https://files.pythonhosted.org/packages/23/35/a957c6fb88ff6874996be688448b889475cf0ea978446cd5a30e764e0561/opensearch_py-2.8.0-py3-none-any.whl", hash = "sha256:52c60fdb5d4dcf6cce3ee746c13b194529b0161e0f41268b98ab8f1624abe2fa", size = 353492 },
403
532
  ]
404
533
 
534
+ [[package]]
535
+ name = "pycparser"
536
+ version = "2.22"
537
+ source = { registry = "https://pypi.org/simple" }
538
+ sdist = { url = "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6", size = 172736 }
539
+ wheels = [
540
+ { url = "https://files.pythonhosted.org/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc", size = 117552 },
541
+ ]
542
+
405
543
  [[package]]
406
544
  name = "pydantic"
407
545
  version = "2.11.1"
@@ -547,6 +685,15 @@ wheels = [
547
685
  { url = "https://files.pythonhosted.org/packages/1e/18/98a99ad95133c6a6e2005fe89faedf294a748bd5dc803008059409ac9b1e/python_dotenv-1.1.0-py3-none-any.whl", hash = "sha256:d7c01d9e2293916c18baf562d95698754b0dbbb5e74d457c45d4f6561fb9d55d", size = 20256 },
548
686
  ]
549
687
 
688
+ [[package]]
689
+ name = "python-multipart"
690
+ version = "0.0.20"
691
+ source = { registry = "https://pypi.org/simple" }
692
+ sdist = { url = "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz", hash = "sha256:8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13", size = 37158 }
693
+ wheels = [
694
+ { url = "https://files.pythonhosted.org/packages/45/58/38b5afbc1a800eeea951b9285d3912613f2603bdf897a4ab0f4bd7f405fc/python_multipart-0.0.20-py3-none-any.whl", hash = "sha256:8a62d3a8335e06589fe01f2a3e178cdcc632f3fbe0d492ad9ee0ec35aab1f104", size = 24546 },
695
+ ]
696
+
550
697
  [[package]]
551
698
  name = "requests"
552
699
  version = "2.32.3"
@@ -628,15 +775,6 @@ wheels = [
628
775
  { url = "https://files.pythonhosted.org/packages/a0/4b/528ccf7a982216885a1ff4908e886b8fb5f19862d1962f56a3fce2435a70/starlette-0.46.1-py3-none-any.whl", hash = "sha256:77c74ed9d2720138b25875133f3a2dae6d854af2ec37dceb56aef370c1d8a227", size = 71995 },
629
776
  ]
630
777
 
631
- [[package]]
632
- name = "toml"
633
- version = "0.10.2"
634
- source = { registry = "https://pypi.org/simple" }
635
- sdist = { url = "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f", size = 22253 }
636
- wheels = [
637
- { url = "https://files.pythonhosted.org/packages/44/6f/7120676b6d73228c96e17f1f794d8ab046fc910d781c8d151120c3f1569e/toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", size = 16588 },
638
- ]
639
-
640
778
  [[package]]
641
779
  name = "tomli"
642
780
  version = "2.2.1"
@@ -1,75 +0,0 @@
1
- import logging
2
- import sys
3
-
4
- from fastmcp import FastMCP
5
- import toml
6
-
7
- from src.clients import create_search_client
8
- from src.tools.alias import AliasTools
9
- from src.tools.cluster import ClusterTools
10
- from src.tools.document import DocumentTools
11
- from src.tools.general import GeneralTools
12
- from src.tools.index import IndexTools
13
- from src.tools.register import ToolsRegister
14
-
15
- class SearchMCPServer:
16
- def __init__(self, engine_type):
17
- # Set engine type
18
- self.engine_type = engine_type
19
- self.name = f"{self.engine_type}_mcp_server"
20
- self.mcp = FastMCP(self.name)
21
- self.logger = logging.getLogger()
22
- self.version = toml.load("pyproject.toml")["project"]["version"]
23
- self.logger.info(f"Initializing {self.name}, Version: {self.version}")
24
-
25
- # Create the corresponding search client
26
- self.search_client = create_search_client(self.engine_type)
27
-
28
- # Initialize tools
29
- self._register_tools()
30
-
31
- def _register_tools(self):
32
- """Register all MCP tools."""
33
- # Create a tools register
34
- register = ToolsRegister(self.logger, self.search_client, self.mcp)
35
-
36
- # Define all tool classes to register
37
- tool_classes = [
38
- IndexTools,
39
- DocumentTools,
40
- ClusterTools,
41
- AliasTools,
42
- GeneralTools,
43
- ]
44
- # Register all tools
45
- register.register_all_tools(tool_classes)
46
-
47
- def run(self):
48
- """Run the MCP server."""
49
- self.mcp.run()
50
-
51
- def run_search_server(engine_type):
52
- """Run search server with specified engine type."""
53
- server = SearchMCPServer(engine_type=engine_type)
54
- server.run()
55
-
56
- def elasticsearch_mcp_server():
57
- """Entry point for Elasticsearch MCP server."""
58
- run_search_server(engine_type="elasticsearch")
59
-
60
- def opensearch_mcp_server():
61
- """Entry point for OpenSearch MCP server."""
62
- run_search_server(engine_type="opensearch")
63
-
64
- if __name__ == "__main__":
65
- # Default to Elasticsearch
66
- engine_type = "elasticsearch"
67
-
68
- # If command line arguments are provided, use the first argument as the engine type
69
- if len(sys.argv) > 1:
70
- engine_type = sys.argv[1].lower()
71
-
72
- if engine_type == "opensearch":
73
- opensearch_mcp_server()
74
- else:
75
- elasticsearch_mcp_server()