mcpField
C
containerport

containerport

Local
github.com/CloudCorpRecordsCloud & Infra0Updated 2w ago

About containerport

containerport is an MCP server and CLI for a defined set of everyday Docker container operations, executed through the host's docker binary. It is intended for container administration and focuses on core container, image, log, and volume tasks rather than Docker's broader catalog or gateway tooling.

Key features

  1. 01Lists, inspects, starts, stops, and removes containers
  2. 02Runs containers with ports, environment values, and commands
  3. 03Lists and pulls images
  4. 04Reads container logs
  5. 05Lists volumes

Use cases

  1. 01Review running or stopped containers
  2. 02Launch and manage a container
  3. 03Retrieve logs for a container
  4. 04List available images and volumes

MCP support

The MCP server exposes ten Docker operations as tools, including container lifecycle actions, image listing and pulling, log retrieval, and volume listing. Calls are executed through the host's docker binary.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"cloudcorprecords-containerport": {
"command": "npx",
"args": [
"-y",
"@reneturcios/containerport"
]
}
}
}
Run commandnpx -y @reneturcios/containerport

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@reneturcios/containerport0.1.0
ocighcr.io/cloudcorprecords/containerport:0.1.0

Tools

10

Saved tool list · updated 1w ago

ParameterTypeRequiredDescription
allbooleanNoWhen true, include stopped containers as well as running ones.

Details

From the project README

containerport

containerport is a small MCP server and CLI for everyday Docker container work. It is a clean-room rebuild of a defined core subset of container operations — ten tools that map directly onto the Docker CLI: list, inspect, run, start, stop and remove containers, list and pull images, read container logs, and list volumes.

It is deliberately not Docker's MCP catalog/toolkit gateway. There is no compose support, no image building, no network or swarm management, no registry authentication, no exec-into-container, and no catalog/gateway tooling — just the container operations an agent reaches for most, executed honestly through the host's docker binary.

Every call is built as an argument array and run with execFile semantics — never a shell string — so image names, environment values and ports cannot be reinterpreted as shell syntax. A command passed to run-container runs through the container's own sh -c, not a host shell. The executor is injectable, which is how the test suite verifies the exact argument arrays with a fake.

The host needs a working docker CLI. When docker is absent, calls fail honestly with the underlying spawn error (ENOENT) instead of a fabricated result. The published container image bundles no docker binary: it expects a host executor (for example a mounted Docker socket workflow) and says so in its Dockerfile.

Install

npx @reneturcios/containerport list-containers --all
docker run -i ghcr.io/cloudcorprecords/containerport

CLI

containerport list-containers [--all]
containerport inspect-container <container_id>
containerport run-container <image> [--name n] [--port 8080:80] [--env KEY=val] [--command "echo hi"]
containerport start-container <container_id>
containerport stop-container <container_id>
containerport remove-container <container_id> [--force]
containerport list-images
containerport pull-image <image>
containerport get-container-logs <container_id> [--tail 100]
containerport list-volumes
containerport --version

Exit codes: 0 success, 1 docker error, 2 usage error.

MCP server

npx -y @reneturcios/containerport mcp
{
  "mcpServers": {
    "containerport": {
      "command": "npx",
      "args": ["-y", "@reneturcios/containerport", "mcp"]
    }
  }
}
Tools
ToolInputWhat it does
list_containersall (boolean, optional)docker ps [--all] --format json, parsed.
inspect_containercontainer_id (required)docker inspect, single document.
run_containerimage (required), name, ports[], env[], commanddocker run -d, returns the new container id.
start_containercontainer_id (required)docker start.
stop_containercontainer_id (required)docker stop.
remove_containercontainer_id (required), forcedocker rm [-f].
list_images—docker images --format json, parsed.
pull_imageimage (required)docker pull.
get_container_logscontainer_id (required), taildocker logs [--tail n].
list_volumes—docker volume ls, parsed driver/name pairs.

Executor failures — a missing docker binary, a daemon error, a nonexistent container — are reported as tool errors carrying the underlying message.

Development

npm install
npm run build
npm test
npm run dev

Tests run entirely on a fake executor: exact argument arrays, output parsing, and error propagation. No live Docker daemon is touched.

License

MIT — see LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.