deepset-mcp 0.0.10__py3-none-any.whl → 0.0.12__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.
deepset_mcp/main.py CHANGED
@@ -112,6 +112,20 @@ def main(
112
112
  "Can also be set via OBJECT_STORE_TTL environment variable.",
113
113
  ),
114
114
  ] = 600,
115
+ host: Annotated[
116
+ str,
117
+ typer.Option(
118
+ "--host",
119
+ help="Host address to bind the server to. Default: 0.0.0.0",
120
+ ),
121
+ ] = "0.0.0.0",
122
+ port: Annotated[
123
+ int | None,
124
+ typer.Option(
125
+ "--port",
126
+ help="Port number to bind the server to. If not specified, uses default port for the transport.",
127
+ ),
128
+ ] = None,
115
129
  ) -> None:
116
130
  """
117
131
  Run the Deepset MCP server.
@@ -130,6 +144,8 @@ def main(
130
144
  :param object_store_backend: Object store backend type ('memory' or 'redis')
131
145
  :param object_store_redis_url: Redis connection URL (required if backend='redis')
132
146
  :param object_store_ttl: TTL in seconds for stored objects
147
+ :param host: Host address to bind the server to
148
+ :param port: Port number to bind the server to
133
149
  """
134
150
  # Handle --list-tools flag early
135
151
  if list_tools:
@@ -187,6 +203,9 @@ def main(
187
203
  object_store_redis_url=redis_url,
188
204
  object_store_ttl=ttl,
189
205
  )
206
+ mcp.settings.host = host
207
+ if port is not None:
208
+ mcp.settings.port = port
190
209
 
191
210
  mcp.run(transport=transport.value)
192
211
 
@@ -37,6 +37,7 @@ from deepset_mcp.tools.pipeline import (
37
37
  get_pipeline_logs as get_pipeline_logs_tool,
38
38
  list_pipelines as list_pipelines_tool,
39
39
  search_pipeline as search_pipeline_tool,
40
+ search_pipeline_with_filters as search_pipeline_with_filters_tool,
40
41
  update_pipeline as update_pipeline_tool,
41
42
  validate_pipeline as validate_pipeline_tool,
42
43
  )
@@ -128,6 +129,10 @@ TOOL_REGISTRY: dict[str, tuple[Callable[..., Any], ToolConfig]] = {
128
129
  search_pipeline_tool,
129
130
  ToolConfig(needs_client=True, needs_workspace=True, memory_type=MemoryType.EXPLORABLE),
130
131
  ),
132
+ "search_pipeline_with_filters": (
133
+ search_pipeline_with_filters_tool,
134
+ ToolConfig(needs_client=True, needs_workspace=True, memory_type=MemoryType.EXPLORABLE),
135
+ ),
131
136
  "list_indexes": (
132
137
  list_indexes_tool,
133
138
  ToolConfig(needs_client=True, needs_workspace=True, memory_type=MemoryType.EXPLORABLE),
@@ -20,6 +20,7 @@ from .pipeline import (
20
20
  get_pipeline_logs,
21
21
  list_pipelines,
22
22
  search_pipeline,
23
+ search_pipeline_with_filters,
23
24
  update_pipeline,
24
25
  validate_pipeline,
25
26
  )
@@ -49,6 +50,7 @@ __all__ = [
49
50
  "get_pipeline_logs",
50
51
  "deploy_pipeline",
51
52
  "search_pipeline",
53
+ "search_pipeline_with_filters",
52
54
  "create_pipeline",
53
55
  "update_pipeline",
54
56
  "validate_pipeline",
@@ -3,6 +3,7 @@
3
3
  # SPDX-License-Identifier: Apache-2.0
4
4
 
5
5
  import asyncio
6
+ from typing import Any
6
7
 
7
8
  import yaml
8
9
  from pydantic import BaseModel
@@ -367,3 +368,52 @@ async def search_pipeline(
367
368
  return f"Failed to search using pipeline '{pipeline_name}': {e}"
368
369
  except Exception as e:
369
370
  return f"An unexpected error occurred while searching with pipeline '{pipeline_name}': {str(e)}"
371
+
372
+
373
+ async def search_pipeline_with_filters(
374
+ *,
375
+ client: AsyncClientProtocol,
376
+ workspace: str,
377
+ pipeline_name: str,
378
+ query: str,
379
+ filters: dict[str, Any] | None = None,
380
+ ) -> DeepsetSearchResponse | str:
381
+ """Searches using a pipeline with filters.
382
+
383
+ Uses the specified pipeline to perform a search with the given query and filters.
384
+ Filters follow the Haystack filter syntax: https://docs.haystack.deepset.ai/docs/metadata-filtering.
385
+ Before executing the search, checks if the pipeline is deployed (status = DEPLOYED).
386
+ Returns search results.
387
+
388
+ :param client: The async client for API communication.
389
+ :param workspace: The workspace name.
390
+ :param pipeline_name: Name of the pipeline to use for search.
391
+ :param query: The search query to execute.
392
+ :param filters: The filters to apply to the search.
393
+
394
+ :returns: Search results or error message.
395
+ """
396
+ try:
397
+ # First, check if the pipeline exists and get its status
398
+ pipeline = await client.pipelines(workspace=workspace).get(pipeline_name=pipeline_name)
399
+
400
+ # Check if pipeline is deployed
401
+ if pipeline.status != "DEPLOYED":
402
+ return (
403
+ f"Pipeline '{pipeline_name}' is not deployed (current status: {pipeline.status}). "
404
+ f"Please deploy the pipeline first using the deploy_pipeline tool before attempting to search."
405
+ )
406
+
407
+ # Execute the search
408
+ return await client.pipelines(workspace=workspace).search(
409
+ pipeline_name=pipeline_name, query=query, filters=filters if filters is not None else None
410
+ )
411
+
412
+ except ResourceNotFoundError:
413
+ return f"There is no pipeline named '{pipeline_name}' in workspace '{workspace}'."
414
+ except BadRequestError as e:
415
+ return f"Failed to search using pipeline '{pipeline_name}': {e}"
416
+ except UnexpectedAPIError as e:
417
+ return f"Failed to search using pipeline '{pipeline_name}': {e}"
418
+ except Exception as e:
419
+ return f"An unexpected error occurred while searching with pipeline '{pipeline_name}': {str(e)}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepset-mcp
3
- Version: 0.0.10
3
+ Version: 0.0.12
4
4
  Summary: Collection of MCP tools and Agents to work with the deepset AI platform. Create, debug or learn about pipelines on the platform. Useable from the CLI, Cursor, Claude Code, or other MCP clients.
5
5
  Project-URL: Homepage, https://deepset.ai
6
6
  Author-email: Mathis Lucka <mathis.lucka@deepset.ai>, Tanay Soni <tanay.soni@deepset.ai>
@@ -1,7 +1,7 @@
1
1
  deepset_mcp/__init__.py,sha256=GntT_omkLLvCn5OI1QzIhcZWUwUZ9aIF0H9LBwxiBqk,380
2
2
  deepset_mcp/config.py,sha256=IFSvwafyr1yj4iIcND1NmfTgrlZa8zFzWVmELRbsLPs,2085
3
3
  deepset_mcp/initialize_embedding_model.py,sha256=5Zcccrw3ItHpt0rGgM-3WdqV-QQaiv79nxBHhDSwNwA,411
4
- deepset_mcp/main.py,sha256=SFzswqiXyVIx6PNJs9x6Knxg9lDdCNEancJHl05fOek,6792
4
+ deepset_mcp/main.py,sha256=D7ijIaMiLav-_uvMTy0l7-B0MzEjUqdZwvUEA_AnWQs,7383
5
5
  deepset_mcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  deepset_mcp/api/__init__.py,sha256=_iMrT0gj6bc5wVYt_lh9uAB1ygsC8APzQ04DMgr2b54,184
7
7
  deepset_mcp/api/client.py,sha256=kj2zOdzlPgxUW6dr1AeDERoAtWF7UbtfGAQcy3j7AuQ,10868
@@ -48,14 +48,14 @@ deepset_mcp/mcp/server.py,sha256=zvX_NDmL5Hj2Nby48lAvecvsagrW-Gf-LAA_cSmeLr4,630
48
48
  deepset_mcp/mcp/store.py,sha256=xfnQbzvAlM8kCH6tq7XbC0PUkf4ciyEmre7GF5mOqaY,1872
49
49
  deepset_mcp/mcp/tool_factory.py,sha256=Xn4kVyugYg09iGPfvOiLYLZG92-y64lZ60SyDu2O24I,15269
50
50
  deepset_mcp/mcp/tool_models.py,sha256=HVxV-VqsvO5Cit1qAXaZhIYaY956HMILbjYnhTlCFHQ,2018
51
- deepset_mcp/mcp/tool_registry.py,sha256=M84RpKEBCjc8Zvbs-6k82QlbzMQIavPDf5lFKe-OGyg,9149
51
+ deepset_mcp/mcp/tool_registry.py,sha256=NBUACp0csZqFBQ9r8GOiwh8FpLGnsw4cehimxyhC7Q8,9404
52
52
  deepset_mcp/prompts/deepset_copilot_prompt.md,sha256=QctQQ4yQ9zl-uWv48dfr1DGhEKPvjsY82iFmRRCzbwM,9968
53
53
  deepset_mcp/prompts/deepset_debugging_agent.md,sha256=m5Y-n9cXQGm9BZ3wZ3N_hQmMjrXVfc1cqV8i8Kle5uU,9488
54
54
  deepset_mcp/tokonomics/__init__.py,sha256=nO9-6Ar9pQCyQVMiuAOHVEWqN-_C7_anW2HL7_N4Iu4,549
55
55
  deepset_mcp/tokonomics/decorators.py,sha256=l7ivHR2FVHit2ih1jOFiqqS28n0uPEI2YKKmgZe_C-w,13566
56
56
  deepset_mcp/tokonomics/explorer.py,sha256=ykNfsw-rs3vZavkb_3IAmXy7CrD9S7XHuFyaXJobaWE,13612
57
57
  deepset_mcp/tokonomics/object_store.py,sha256=UW9g_NJ9Mw4-2HnhQye2hKyz3Pt_rYOgXL6gABtZwFE,4802
58
- deepset_mcp/tools/__init__.py,sha256=_1PY8FPrx-AqBcw6v5KCWPX6e5qSHyVyJW6ibXxsLrc,1806
58
+ deepset_mcp/tools/__init__.py,sha256=PLlMZ7LsahCQhngEfx1MFS2XeyAeok3OlveSPP-9kOk,1876
59
59
  deepset_mcp/tools/custom_components.py,sha256=VG6m5zDtNuk4YkxdvEMlOOouvAypCsqPuFD9ZIickNI,2227
60
60
  deepset_mcp/tools/doc_search.py,sha256=S_PcvikBk38IBUqOO1rxSHrAaFDdGfnFHjHXGlkaoxc,2847
61
61
  deepset_mcp/tools/haystack_service.py,sha256=MaMA_LlBqPEsrHiz1M6Xb1eeofi9zDq60OqRM23xgho,16934
@@ -63,12 +63,12 @@ deepset_mcp/tools/haystack_service_models.py,sha256=6N76lTOiZ0nXBZ8u_AGHtIyEVWLA
63
63
  deepset_mcp/tools/indexes.py,sha256=8BCQG5q_7B-giwh_T5TOPhHnotFUTkVGyVmopu_9bls,9719
64
64
  deepset_mcp/tools/model_protocol.py,sha256=k6xcnVYLqgXM8DX8SrA5ls3sbKBZC06XfO596KCSKQ4,529
65
65
  deepset_mcp/tools/object_store.py,sha256=kAS3CRouhIgA8VFH6R-8XSXkyjDcV2DQ0r89Pz7h28E,1958
66
- deepset_mcp/tools/pipeline.py,sha256=Cum1BIBtvl-JXcyH2zEZ48SngKJuMXGmDNP8ZKFW_Dc,15868
66
+ deepset_mcp/tools/pipeline.py,sha256=1EJdtryMZnYm04Sq8oBCFHk3XFVPNigcUhOeGx7VW2I,17976
67
67
  deepset_mcp/tools/pipeline_template.py,sha256=KgIL5UnXW0I1v6EDOVZE9LgF1bNzixwvRwwBv4B-1WU,5852
68
68
  deepset_mcp/tools/secrets.py,sha256=1kZ0vfbmIPooQxaO5Bv6UtCYH8KDcziNGTUq-HAy4I8,4712
69
69
  deepset_mcp/tools/workspace.py,sha256=01R3sPI7sjNoD173XhTfYHIG0Iv7La6GlBrZXHeUb9s,2827
70
- deepset_mcp-0.0.10.dist-info/METADATA,sha256=pKWXeSBorHJaAnWFvCpKgBUwPmAfKxgJuayNS4_XxeA,3399
71
- deepset_mcp-0.0.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
72
- deepset_mcp-0.0.10.dist-info/entry_points.txt,sha256=0X0vMrNLUbQYq02bA4DUgsFuEAbS2bAaGO4jrAMtRk0,53
73
- deepset_mcp-0.0.10.dist-info/licenses/LICENSE,sha256=k0H2cOtcgKczLsEN2Ju03DoAb8jhBSlp8WzWYlYlDvc,11342
74
- deepset_mcp-0.0.10.dist-info/RECORD,,
70
+ deepset_mcp-0.0.12.dist-info/METADATA,sha256=-kYw9jRgXjNDS0MG37Wvcf6PDzQwLlhwYaZH9gz3GZo,3399
71
+ deepset_mcp-0.0.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
72
+ deepset_mcp-0.0.12.dist-info/entry_points.txt,sha256=0X0vMrNLUbQYq02bA4DUgsFuEAbS2bAaGO4jrAMtRk0,53
73
+ deepset_mcp-0.0.12.dist-info/licenses/LICENSE,sha256=k0H2cOtcgKczLsEN2Ju03DoAb8jhBSlp8WzWYlYlDvc,11342
74
+ deepset_mcp-0.0.12.dist-info/RECORD,,