Skip to content

Run in a container

The container image runs the server over HTTP. It is built from the Containerfile in the repository root. The commands below use Podman. Docker works the same way: replace podman with docker, except where noted.

Get the image

The image is public on GitHub Container Registry for linux/amd64 and linux/arm64. You do not need to sign in to pull it:

podman pull ghcr.io/davidbejar/boe-insights-mcp:0.1.0

The tags 0.1 and latest also exist. 0.1 follows the latest 0.1.x release and latest follows the newest release. Use the exact version tag, as in this page, so an update never surprises you.

Build it yourself

To run code that is not released yet, build the image from a clone of the repository:

git clone https://github.com/davidbejar/boe-insights-mcp.git
cd boe-insights-mcp
podman build --format docker -t localhost/boe-insights-mcp:dev -f Containerfile .

With Docker, drop --format docker: docker build -t localhost/boe-insights-mcp:dev -f Containerfile .. With Podman the flag is required: Podman's default image format (OCI) does not keep the health check.

The podman run commands on this page use the published image. If you built the image yourself, use localhost/boe-insights-mcp:dev in them instead.

Run it

podman run --rm --name boe-insights -p 127.0.0.1:8000:8000 \
    --read-only --tmpfs /tmp --cap-drop=all --security-opt no-new-privileges \
    -v boe-insights-data:/data ghcr.io/davidbejar/boe-insights-mcp:0.1.0

What each part does:

  • -p 127.0.0.1:8000:8000 publishes the port on your own machine only. This is the line that decides who can reach the server. Inside the container the server listens on 0.0.0.0, because otherwise the published port would not work. For that reason, without GitHub login, the server logs a warning at every start saying it is reachable from other machines. With the port published on 127.0.0.1 as here, the warning is expected.
  • --read-only --tmpfs /tmp --cap-drop=all --security-opt no-new-privileges lock the container down. The server needs nothing more than /data to write to.
  • -v boe-insights-data:/data keeps your data in a named volume that survives the container.

Check it:

curl http://127.0.0.1:8000/health

The answer is {"status":"ok"}. The MCP address is http://127.0.0.1:8000/mcp. Connect a client as described on the client pages.

The image defines a health check that calls /health from inside the container. Docker applies it, and docker ps shows the state. Podman does not: it ignores a health check stored in an OCI-format image such as the published one, so after a pull podman ps shows no state. (An image you build yourself with --format docker keeps it, as said above.) To get the same check with the published image under Podman, add these options to the podman run command:

    --health-cmd "python -c \"import os, urllib.request; urllib.request.urlopen('http://127.0.0.1:%s/health' % os.environ.get('BOE_INSIGHTS_PORT', '8000'), timeout=3)\"" \
    --health-interval 30s --health-timeout 5s --health-start-period 15s --health-retries 3 \

They reproduce the HEALTHCHECK of the Containerfile: the same command and the same timings. If you change BOE_INSIGHTS_PORT, the command follows it.

No sign-in by default

As started above, anyone who can reach the published port can use the server. Keep the 127.0.0.1: in -p, or turn on GitHub login. See Security and operations before publishing it more widely.

Over open HTTP the saved-search tools are not offered. See Run over HTTP.

The volume

The image keeps all its state under /data, the only place it writes:

Path in the container Holds Set by
/data/saved-searches Saved searches (saved_searches.sqlite3). Not safe to delete. BOE_INSIGHTS_DATA_DIR
/data/cache The response cache. Safe to delete. BOE_INSIGHTS_CACHE_DIR
/data/fastmcp With GitHub login, the server's sign-in records (registered clients and tokens, stored encrypted). Without login it stays empty. FASTMCP_HOME

The server runs as user and group 10001, not root. A named volume inherits the right owner the first time it is used. If you use a bind mount instead, the folder must be writable by 10001:

mkdir -p "$PWD/boe-data" && podman unshare chown 10001:10001 "$PWD/boe-data"
podman run --rm --name boe-insights -p 127.0.0.1:8000:8000 -v "$PWD/boe-data":/data ghcr.io/davidbejar/boe-insights-mcp:0.1.0

Give the bind mount an absolute host path, as "$PWD/boe-data" does: some Docker versions refuse a relative one. podman unshare is for rootless Podman. With Docker or rootful Podman, use sudo chown 10001:10001 "$PWD/boe-data". The bind-mount commands were not run for this page.

Environment variables

The image sets these. You can override any of them with -e NAME=value.

Variable Value in the image
BOE_INSIGHTS_TRANSPORT http
BOE_INSIGHTS_HOST 0.0.0.0
BOE_INSIGHTS_PORT 8000
BOE_INSIGHTS_DATA_DIR /data/saved-searches
BOE_INSIGHTS_CACHE_DIR /data/cache
FASTMCP_HOME /data/fastmcp

All the other settings work as on the other pages, passed with -e: the HTTP settings (allowed hosts and origins, call limit), the pacing settings (BOE_INSIGHTS_MIN_INTERVAL, BOE_INSIGHTS_MAX_CONCURRENCY) and the GitHub login settings.

If you change BOE_INSIGHTS_PORT, change the right side of -p to match. The health check follows the variable.

Put secrets (the GitHub client secret and the signing key) in an environment file rather than on the command line, so they do not appear in your shell history or in ps:

podman run --rm --name boe-insights -p 127.0.0.1:8000:8000 --env-file boe.env -v boe-insights-data:/data ghcr.io/davidbejar/boe-insights-mcp:0.1.0

Keep that file private (chmod 600 boe.env).

Stop, logs, update

podman logs boe-insights     # server log
podman stop boe-insights     # clean shutdown; the server is the main process and gets the signal

These commands use the name given with --name boe-insights, as in every podman run command on this page.

To update, pull or build the new image and start a new container with the same volume.

What was tested

  • The image was built for linux/arm64 and linux/amd64. The arm64 image was run in open HTTP mode.
  • The published 0.1.0rc1 image was pulled and run with Podman on macOS arm64 on 2026-11-26, with the lock-down flags above, and /health answered {"status":"ok"}. Podman showed no health check for it, as described above.
  • The same image run with the --health-cmd options above under Podman, on the same day: podman ps showed it as healthy.

Not tested:

  • The amd64 image was only built and checked to import, never run.
  • The health check under Docker. That Docker applies it rests on the image configuration containing it.
  • Sign-in (GitHub login) against the container image.
  • The bind-mount commands above.

See also