Get the FREE Ultimate OpenClaw Setup Guide →

mcpo_docker_use

An example Docker image for mcpo(with npm,curl,nodejs,uv Pre-Built;Pre-Built MCP:amap;baidumap;server-brave-search; tavily;fetch), a tool that exposes MCP (Model Context Protocol) servers as OpenAPI-compatible HTTP endpoints for OpenWebUI.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio flyfox666-mcpo_docker_use docker run -i image-name

How to use

This MCP server is deployed via Docker (and Docker Compose) to run the mcpo (Model Context Protocol OpenAPI Proxy) tools in a containerized environment. At startup, the container uses a start.sh script to read a dynamic config.json and install the required MCP tools (such as uvx for Python-based MCP servers and npx for Node-based MCP servers) on demand, then launches the mcpo main service. The design emphasizes running as a non-root user (appuser), persisting configuration and data across restarts, and allowing you to customize tool versions and sources via environment variables and build arguments. When you start the container, you can expect the system to fetch and install the necessary components based on config.json, after which mcpo exposes its API proxy capabilities for your configured MCP servers.

How to install

Prerequisites

  • Docker and Docker Compose installed (Docker 24+ and Compose 2.x recommended).
  • A working .env file in the project root containing sensitive configuration (e.g., MCPO_API_KEY) and optional PIP_SOURCE.
  • network access to required mirrors and sources (e.g., Aliyun mirrors for apt/pip if configured).

Step 1: Prepare configuration

  • Create or edit .env with required keys, example: MCPO_API_KEY=your_mcpo_api_key_here PIP_SOURCE=https://mirrors.aliyun.com/pypi/simple/
  • Provide config.json describing the MCP servers to deploy (as per config.example.json in the repo).

Step 2: Build the image

  • From project root, build the Docker image (Docker Compose handles this): docker-compose build [--no-cache]
  • If you changed PIP_SOURCE, ensure it is available to build via the .env file and build args.

Step 3: Start the service

  • Start in detached mode: docker-compose up -d
  • The start script will install the required MCP tools dynamically based on config.json (uvx for Python tools, npx for Node tools) and then start the mcpo service.

Step 4: Verify

  • Check logs to confirm startup and successful tool installation: docker-compose logs -f
  • Access the mcpo proxy endpoints as defined in your MCP server configuration (config.json).

Additional notes

Notes and tips:

  • The container runs as a non-root user (appuser) for security. Ensure your volume mounts (config.json, logs, data, node_modules, .npm, .uv_cache) are writable by the container.
  • Use the PIP_SOURCE option to speed up Python package installs when building and starting the container.
  • Secrets (like MCPO_API_KEY) should never be baked into the image; keep them in .env and use env_file in docker-compose.
  • If you encounter npx or git not found errors, ensure nodejs and git are installed in the image and that PATH includes /usr/bin and /usr/local/bin.
  • Dynamic tool installation means the first startup can take longer as dependencies are fetched; subsequent restarts are faster if caching directories persist.
  • For reproducibility, pin versions in config.json (for npx packages) and consider pinning uv versions in the Python environment if needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers