pydantic/mcp-run-python

Dockerise the MCP Run Python server

Offen

#21 geöffnet am 27.05.2025

 (6 Kommentare) (5 Reaktionen) (1 zugewiesene Person)Python (27 Forks)auto 404
good first issue

Repository-Metriken

Stars
 (191 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Description

Hey there!

I've read through the following sources relating to the new MCP Run Python server:

  1. https://github.com/pydantic/pydantic-ai/blob/8f83407d870475dfc1885fa5119024dc2ffb44ab/mcp-run-python/README.md
  2. https://ai.pydantic.dev/mcp/run-python/

However, when trying to add this as an MCP server using the following configuration:

{
  "mcpServers": {
    "python-sandbox": {
      "command": "deno",
      "args": [
        "run",
        "-N",
        "-R=node_modules",
        "-W=node_modules --node-modules-dir=auto jsr:@pydantic/mcp-run-python stdio"
      ]
    }
  }
}

I get an MCP error -32000: Connection closed. Whilst this is its own separate issue - as I've experienced this with other MCP servers - I was able to work around it by using dockerised servers.

So, maybe it's worth also dockerising MCP Run Python?

Thank you!

References

No response

Contributor Guide