Skip to content

Dockerise the MCP Run Python server (#1837) #2090

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rohit133
Copy link

Summary

This adds Docker support for the MCP Run Python server and sets up automated Docker image publishing via GitHub Actions.

Changes

Dockerfile:
  • Adds a Dockerfile to run the MCP Run Python server using the official Deno image.
  • Default command runs the server in SSE mode on port 3101, suitable for MCP client integration.

GitHub Actions Workflow:

  • Adds docker-publish.yml to build and publish the Docker image to Docker Hub (or another registry) on push to main.
  • Requires DOCKERHUB_USERNAME and DOCKERHUB_TOKEN secrets to be set in the repository.

Test Client:

  • Adds test_mcp_client.py to verify the server is running and can execute Python code via the MCP protocol.

How to test

  1. Build and run the Docker image:
docker build -t mcp-run-python ./mcp-run-python
docker run -d -p 3101:3101 mcp-run-python
  1. Run the test client:
python3 mcp-run-python/test_mcp_client.py

You should see:

<status>success</status>
<output>
   hello world
</output>

@rohit133 rohit133 changed the title Dockerise the MCP Run Python server (#1837) Dockerise the MCP Run Python server (#1837)[https://github.com/pydantic/pydantic-ai/issues/1837] Jun 27, 2025
@rohit133 rohit133 changed the title Dockerise the MCP Run Python server (#1837)[https://github.com/pydantic/pydantic-ai/issues/1837] Dockerise the MCP Run Python server (#1837) Jun 27, 2025
@Kludex
Copy link
Member

Kludex commented Jun 27, 2025

I think we can publish the images on github instead of dockerhub.

@rohit133
Copy link
Author

I think we can publish the images on github instead of dockerhub.

I have updated it to publish the images on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants