No Dockerfile? No problem! Running Node and Python MCPs with ToolHive

Containerizing your MCP server is great—until it isn’t. Maybe you're moving fast, testing a new idea, or you just don’t want to write a Dockerfile. We’ve been there. That’s why ToolHive now supports running MCP servers powered by npm or uv, without needing them to be containerized up front. ToolHive will now dynamically build a container image for you based on the MCP reference. That means: No Dockerfile. No need to install uv or npm on your system. Just write your code and run. How it works We’ve added support for special transport-prefixed references to MCP servers: For Node.js projects: thv run npx://my-cool-server For Python projects using uv: thv run uvx://my-python-server When ToolHive sees one of these prefixes (npx:// or uvx://), it knows to: Build a container image dynamically behind the scenes Include the appropriate runtime (Node.js or Python + uv) Execute your server just like any other MCP—no container authoring required This all happens without you needing to install npm, npx, or uv on your local machine. Why this matters This feature is a huge win for: Quick iterations: Skip the Dockerfile and get straight to testing. Lightweight environments: Don’t want to install runtime tools globally? No problem. Clean CI/CD pipelines: ToolHive encapsulates the runtime without polluting your environment. It’s never been easier to run an MCP server with ToolHive, even if all you’ve got is a main.py or index.js. Behind the magic Under the hood, ToolHive builds a container image on-the-fly using the MCP reference you pass in. It wraps your package with the right runtime environment and proxies traffic into it, just like any other server launched through ToolHive. This means you get all the benefits of the ToolHive runtime—clean shutdown, traffic proxying, process supervision—without needing to containerize anything yourself. Get started Just run: thv run npx:// or thv run uvx:// ToolHive will take it from there. E.g. If you’re interested in running the Playwright MCP, simply do: thv run npx://@playwright/mcp@latest For more details, check out the README . Try it out and join the fun! We're excited to keep making ToolHive easier to use, especially for devs who want to focus on building—not on container plumbing. Got feedback or ideas? Open an issue or talk to us on Discord. We’d love to hear from you. Happy hacking

Apr 24, 2025 - 07:52
 0
No Dockerfile? No problem! Running Node and Python MCPs with ToolHive

Containerizing your MCP server is great—until it isn’t. Maybe you're moving fast, testing a new idea, or you just don’t want to write a Dockerfile. We’ve been there.

That’s why ToolHive now supports running MCP servers powered by npm or uv, without needing them to be containerized up front.

ToolHive will now dynamically build a container image for you based on the MCP reference. That means:

  • No Dockerfile.

  • No need to install uv or npm on your system.

  • Just write your code and run.

How it works

We’ve added support for special transport-prefixed references to MCP servers:

  • For Node.js projects:
thv run npx://my-cool-server
  • For Python projects using uv:
thv run uvx://my-python-server

When ToolHive sees one of these prefixes (npx:// or uvx://), it knows to:

  1. Build a container image dynamically behind the scenes

  2. Include the appropriate runtime (Node.js or Python + uv)

  3. Execute your server just like any other MCP—no container authoring required

This all happens without you needing to install npm, npx, or uv on your local machine.

Why this matters

This feature is a huge win for:

  • Quick iterations: Skip the Dockerfile and get straight to testing.

  • Lightweight environments: Don’t want to install runtime tools globally? No problem.

  • Clean CI/CD pipelines: ToolHive encapsulates the runtime without polluting your environment.

It’s never been easier to run an MCP server with ToolHive, even if all you’ve got is a main.py or index.js.

Behind the magic

Under the hood, ToolHive builds a container image on-the-fly using the MCP reference you pass in. It wraps your package with the right runtime environment and proxies traffic into it, just like any other server launched through ToolHive.

This means you get all the benefits of the ToolHive runtime—clean shutdown, traffic proxying, process supervision—without needing to containerize anything yourself.

Get started

Just run:

thv run npx://

or

thv run uvx://

ToolHive will take it from there.

E.g. If you’re interested in running the Playwright MCP, simply do:

thv run npx://@playwright/mcp@latest

For more details, check out the README .

Try it out and join the fun!

We're excited to keep making ToolHive easier to use, especially for devs who want to focus on building—not on container plumbing. Got feedback or ideas? Open an issue or talk to us on Discord. We’d love to hear from you.

Happy hacking