Skip to content

Custom Builds

When an MCP server needs additional dependencies or a custom build step beyond the base Docker image, TeamWeb AI can build a custom image for you. There are two approaches: building from a GitHub repository, or customizing the base image with packages and setup commands.

Build from a GitHub Repository

If the MCP server has its own repository with a Dockerfile:

  • Build Repo URL — The GitHub repository URL to clone and build from
  • Build Repo Branch — Optional branch to check out (defaults to the repository’s default branch)

TeamWeb AI passes the repository URL directly to Docker’s build command, which handles cloning and building from the repository’s Dockerfile.

Build with Packages and Setup Commands

For servers that need additional packages installed on top of the base image:

  • Build Packages — One line per package manager, in the format tool: package1 package2. Supported tools:
    • apt — System packages via apt-get
    • pip — Python packages via pip
    • npm — Node.js packages via npm
  • Setup Command — A shell command run during the image build for any additional setup

Example

To add Python dependencies and a system library to a server:

apt: libpq-dev
pip: psycopg2 requests

With a setup command:

cd /app && python setup.py install

Building the Image

After saving the server configuration, click Build Image on the detail page. The build runs in the background — the status updates when it completes.

The build status section shows:

  • Built — The image was built successfully, with the image tag and build timestamp
  • Build Failed — The build failed, with the error output
  • Not built — No image has been built yet

Click Rebuild to rebuild the image after changing configuration.

Once built, the custom image is used instead of the base image. The image is tagged as teamwebai-mcp-{server_id}:latest.