Skip to content

Add mcp python sdk package #773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
conda-forge::mcp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
conda-forge::mcp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
conda-forge::mcp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
conda-forge::mcp
16 changes: 16 additions & 0 deletions test/test_artifacts/v2/mcp.test.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ARG SAGEMAKER_DISTRIBUTION_IMAGE
FROM $SAGEMAKER_DISTRIBUTION_IMAGE

ARG MAMBA_DOCKERFILE_ACTIVATE=1

RUN python -c "import mcp"

RUN git clone --recursive https://github.com/modelcontextprotocol/python-sdk.git && \
:
RUN micromamba install --freeze-installed -y pyright pytest uv ruff trio pytest-flakefinder pytest-xdist pytest-pretty inline-snapshot dirty-equals
WORKDIR "python-sdk/"
COPY --chown=$MAMBA_USER:$MAMBA_USER scripts/run_mcp_tests.sh .
RUN chmod +x run_mcp_tests.sh

# Run tests in run_mcp_tests.sh
CMD ["./run_mcp_tests.sh"]
9 changes: 9 additions & 0 deletions test/test_artifacts/v2/scripts/run_mcp_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# We need to checkout the version of mcp python-sdk that is installed in the mamba environment.
mcp_version=$(micromamba list | grep ' mcp ' | tr -s ' ' | cut -d ' ' -f 3)

# Checkout the corresponding mcp python-sdk version
git checkout tags/v$mcp_version

pytest tests/server tests/issues tests/shared || exit $?
16 changes: 16 additions & 0 deletions test/test_artifacts/v3/mcp.test.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ARG SAGEMAKER_DISTRIBUTION_IMAGE
FROM $SAGEMAKER_DISTRIBUTION_IMAGE

ARG MAMBA_DOCKERFILE_ACTIVATE=1

RUN python -c "import mcp"

RUN git clone --recursive https://github.com/modelcontextprotocol/python-sdk.git && \
:
RUN micromamba install --freeze-installed -y pyright pytest uv ruff trio pytest-flakefinder pytest-xdist pytest-pretty inline-snapshot dirty-equals
WORKDIR "python-sdk/"
COPY --chown=$MAMBA_USER:$MAMBA_USER scripts/run_mcp_tests.sh .
RUN chmod +x run_mcp_tests.sh

# Run tests in run_mcp_tests.sh
CMD ["./run_mcp_tests.sh"]
9 changes: 9 additions & 0 deletions test/test_artifacts/v3/scripts/run_mcp_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# We need to checkout the version of mcp python-sdk that is installed in the mamba environment.
mcp_version=$(micromamba list | grep ' mcp ' | tr -s ' ' | cut -d ' ' -f 3)

# Checkout the corresponding mcp python-sdk version
git checkout tags/v$mcp_version

pytest tests/server tests/issues tests/shared || exit $?