trackmcp
Back to directory
daviddrummond95

cookiecutter-mcp-uv-container

View on GitHub

Cookiecutter MCP UV Container

26 stars PythonOthers Updated Aug 15, 2026

Documentation

Cookiecutter MCP UV Container

A cookiecutter template for quickly creating MCP (Model Context Protocol) servers with Apple container support.

Why Apple Containers?

Apple containers provide VM-level isolation with Docker-like simplicity:

  • Superior Security: Each container runs in its own lightweight VM
  • macOS Native: Deep integration with macOS frameworks
  • On-Demand: Start/stop servers as needed (not constantly running)
  • Resource Efficient: Less overhead than traditional VMs
  • OCI Compatible: Works with existing container registries

Features

  • ๐Ÿš€ FastMCP server setup with example tools
  • ๐Ÿณ Multi-stage Dockerfile for optimized containers
  • ๐Ÿ“ฆ UV package management
  • ๐Ÿ”’ VM-level isolation with non-root container user
  • ๐ŸŒ Multiple transport methods (stdio, streamable-http, sse)
  • ๐ŸŽ Optimized for Apple Silicon
  • ๐Ÿ“ Example calculator tools with typed parameters

Usage

Prerequisites

1. Install UV (if not already installed):

bash
curl -LsSf https://astral.sh/uv/install.sh | sh

2. Install cookiecutter:

bash
uv tool install cookiecutter
   # or
   pip install cookiecutter

3. Install Apple/Container:

Visit https://github.com/apple/container

Create a new project

bash
# From local directory
cookiecutter /path/to/cookiecutter-mcp-uv-container

# From GitHub 
cookiecutter https://github.com/daviddrummond95/cookiecutter-mcp-uv-container

Template Variables

You'll be prompted for:

  • project_name: Human-readable project name (e.g., "My Calculator MCP")
  • project_slug: Package name (auto-generated from project_name)
  • mcp_name: The MCP server name (e.g., "MyCalculatorMCP")
  • description: Project description
  • author_name: Your name
  • author_email: Your email
  • python_version: Python version (default: 3.13)
  • mcp_version: MCP SDK version (default: 1.9.4)

Project Structure

After generation, your project will have:

code
my-mcp-server/
โ”œโ”€โ”€ Dockerfile          # Multi-stage build for containers
โ”œโ”€โ”€ pyproject.toml      # UV project configuration
โ”œโ”€โ”€ hello.py            # MCP server implementation
โ”œโ”€โ”€ QUICKSTART.md       # Quick start guide
โ””โ”€โ”€ .env.example        # Environment configuration

Next Steps

After creating your project:

1. Navigate to your project:

bash
cd my-mcp-server # or whatever you put as project-slug

2. Start Container System (first time only):

bash
container system start

3. Build Container:

bash
container build --tag my-mcp . # Replace my-mcp with whatever you want to name the container

4. Run MCP Server:

bash
# Interactive stdio mode
   container run --interactive my-mcp

5. Customize: Edit `hello.py` to add your own MCP tools

Claude Desktop Integration

For Claude Desktop, you have two options:

json
{
  "mcpServers": {
    "My MCP Server (Local)": {
      "command": "uv",
      "args": ["run", "fastmcp", "/path/to/my-mcp-server/hello.py"]
    }
  }
}

Option 2: Use HTTP transport with container

Then configure Claude Desktop to connect via STDIO:

json
{
  "mcpServers": {
    "My MCP Server (Container)": {
      "command": "container",
   	 "args": ["run",  "--interactive", "my-mcp-container"]
    }
  }
}

Transport Options

The template supports multiple transport methods via environment variables:

  • stdio: Default
  • More in progress for flow from local-> cloud

Set via: `MCP_TRANSPORT=`

License

MIT

Frequently asked questions

What is cookiecutter-mcp-uv-container?

cookiecutter-mcp-uv-container is Cookiecutter MCP UV Container

How do I install cookiecutter-mcp-uv-container?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is cookiecutter-mcp-uv-container open source?

Yes โ€” it is hosted on GitHub at https://github.com/daviddrummond95/cookiecutter-mcp-uv-container and has 26 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP