From 538be7da2c14a6c6d9180b17a52fab5b1165d883 Mon Sep 17 00:00:00 2001 From: qianlir <148927872+qianlir@users.noreply.github.com> Date: Mon, 18 May 2026 19:51:38 +0800 Subject: [PATCH] feat(deps): add opensearch-py for pmda-drug-info skill MCP server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pmda-drug-info skill's pmda_server.py imports opensearchpy to query the OpenSearch pmda_sections index. catalog-agent base image already ships psycopg (for PG drug_master queries) but was missing opensearch-py, so the MCP stdio server failed at import time with ModuleNotFoundError → 0 tools exposed to the bot. Add opensearch-py >=2.2.0,<3.0.0 to pyproject.toml dependencies and the matching pinned line (opensearch-py==2.7.1) to requirements.txt. Verified pmda-drug-info needs: from opensearchpy import OpenSearch # os_client.py from opensearchpy.helpers import bulk # ingest path After this image is rebuilt and deployed to onprem-dev, MCP stdio servers loaded from skill plugin.json start cleanly and tools/list returns the 10 tools from pmda_tools.json. Co-Authored-By: Claude Opus 4.7 (1M context) --- pyproject.toml | 1 + requirements.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index c14fb97..8118a32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,6 +34,7 @@ dependencies = [ "deepagents-cli (>=0.0.37,<0.1.0)", "mem0ai (>=0.1.50,<0.3.0)", "psycopg2-binary (>=2.9.11,<3.0.0)", + "opensearch-py (>=2.2.0,<3.0.0)", "json-repair (>=0.29.0,<0.30.0)", "tiktoken (>=0.5.0,<1.0.0)", "wsgidav (>=4.3.3,<5.0.0)", diff --git a/requirements.txt b/requirements.txt index 25ac364..6e99318 100644 --- a/requirements.txt +++ b/requirements.txt @@ -117,6 +117,7 @@ nvidia-nvtx-cu12==12.1.105 ; python_version >= "3.12" and python_version < "3.15 obstore==0.8.2 ; python_version >= "3.12" and python_version < "3.15" openai==2.31.0 ; python_version >= "3.12" and python_version < "3.15" openpyxl==3.1.5 ; python_version >= "3.12" and python_version < "3.15" +opensearch-py==2.7.1 ; python_version >= "3.12" and python_version < "3.15" opentelemetry-api==1.41.0 ; python_version >= "3.12" and python_version < "3.15" opentelemetry-exporter-otlp-proto-common==1.41.0 ; python_version >= "3.12" and python_version < "3.15" opentelemetry-exporter-otlp-proto-http==1.41.0 ; python_version >= "3.12" and python_version < "3.15"