Deployment
Docker Compose
Section titled “Docker Compose”The repository’s compose.yaml is a good starting point:
services: emby-mcp: image: ghcr.io/mattoddie/emby-mcp:latest # To build from source instead of pulling, replace the line above with: # build: . container_name: emby-mcp restart: unless-stopped env_file: .env ports: - "8080:8080" read_only: true cap_drop: [ALL] security_opt: ["no-new-privileges:true"]docker compose run --rm emby-mcp check # test the connection to Emby and the API keydocker compose up -d # startdocker compose logs -f # follow logsdocker compose ps # shows "healthy" once the health check passesdocker compose down # stopemby-mcp keeps no state: everything it shows comes from Emby, and everything it changes is changed in Emby. So there’s no volume to keep or back up, and the root filesystem can stay read-only. The only file it writes is the audit log, if you turn it on.
The image has a built-in health check that runs emby-mcp healthcheck every 30 seconds. The image has no shell or curl, so the binary checks its own /health endpoint. It only shows that the server is running, not that Emby is reachable or the API key works. For that, run check.
To listen on one interface only, such as a LAN address or localhost when you use a reverse proxy, change the port mapping to "192.0.2.10:8080:8080" or "127.0.0.1:8080:8080".
If Emby runs in Docker on the same machine, you can put both containers on one Docker network and set EMBY_URL=http://<emby-container-name>:8096. Otherwise use the Emby machine’s LAN address or hostname: localhost inside the container is the container itself.
Commands
Section titled “Commands”The image’s entrypoint is the emby-mcp binary, so you can run any of its commands with docker compose run --rm emby-mcp <command>, or docker compose exec emby-mcp /emby-mcp <command> while it’s running:
| Command | What it does |
|---|---|
serve (the default) |
Serves MCP over stdio, or Streamable HTTP when MCP_TRANSPORT=http |
check |
Connects to Emby with EMBY_URL and EMBY_API_KEY, then prints the server’s name and version, the user the tools act as, the libraries, and how many films, series and episodes there are. It also says whether changes are allowed, and repeats any note about plain http or an unchecked certificate. It exits with an error, and says why, if Emby can’t be reached or rejects the key. |
healthcheck |
Exits with 0 if the HTTP server answers /health. It asks MCP_HTTP_HOST (or loopback when that is 0.0.0.0 or ::) on MCP_HTTP_PORT, _FILE variants included. Used by the image’s HEALTHCHECK. |
version |
Prints the version |
Image tags
Section titled “Image tags”Images are published to the GitHub Container Registry at ghcr.io/mattoddie/emby-mcp for linux/amd64 and linux/arm64. Each GitHub release publishes these tags:
| Tag | Example | Moves? |
|---|---|---|
X.Y.Z |
1.4.2 |
Never. Pin this for full reproducibility. |
X.Y |
1.4 |
Moves to the latest patch release (bug fixes). |
X |
1 |
Moves to the latest minor release (new features, no breaking changes). Not published for 0.x. |
latest |
Moves to the newest stable release. |
Pre-releases, such as 1.5.0-rc.1, are only published under their exact version, never as latest.
The image is built FROM gcr.io/distroless/static-debian13:nonroot. It contains the static emby-mcp binary, CA certificates and time zone data, and nothing else: no shell and no package manager. It runs as the non-root user 65532 and is about 21 MB.
Every image includes an SBOM and build provenance attestation. To verify that an image was built by this repository’s release workflow:
gh attestation verify oci://ghcr.io/mattoddie/emby-mcp:1.4.2 --owner mattoddieUpgrading
Section titled “Upgrading”docker compose pulldocker compose up -dThere’s nothing to migrate. Check the changelog or the release notes before upgrading across a major version. After an upgrade, reconnect or restart your MCP client so it fetches the new tool list.
When you upgrade Emby itself, run check afterwards. emby-mcp uses Emby’s documented API, which changes rarely, but see Compatibility for the versions it’s tested with.
Building from source
Section titled “Building from source”git clone https://github.com/mattoddie/emby-mcp.gitcd emby-mcpdocker build -t emby-mcp . # or: make imageThe tests run as part of the image build, so a broken build never produces an image. The build stage cross-compiles, so building for another architecture doesn’t need emulation. To use a local build with Compose, replace image: in compose.yaml with build: . and run docker compose up -d --build.
TLS with a reverse proxy
Section titled “TLS with a reverse proxy”The server speaks plain HTTP. If it’s reachable from outside a trusted network, put a TLS-terminating reverse proxy in front of it and keep MCP_AUTH_TOKEN set.
Caddy, which gets certificates automatically:
emby-mcp.example.com { reverse_proxy emby-mcp:8080}nginx:
server { listen 443 ssl; server_name emby-mcp.example.com; ssl_certificate /etc/ssl/certs/emby-mcp.pem; ssl_certificate_key /etc/ssl/private/emby-mcp.key;
location /mcp { proxy_pass http://emby-mcp:8080; proxy_set_header Host $host; proxy_read_timeout 120s; }}Traefik labels:
services: emby-mcp: image: ghcr.io/mattoddie/emby-mcp:latest env_file: .env labels: - traefik.enable=true - traefik.http.routers.emby-mcp.rule=Host(`emby-mcp.example.com`) - traefik.http.routers.emby-mcp.tls.certresolver=letsencrypt - traefik.http.services.emby-mcp.loadbalancer.server.port=8080When the server sits behind a proxy, don’t publish its port. Set MCP_ALLOWED_HOSTS=emby-mcp.example.com so it only accepts requests for that hostname.
This is about the connection from your MCP client to emby-mcp. The connection from emby-mcp to Emby is set by EMBY_URL; see https and certificates.
Hardening
Section titled “Hardening”The image already runs as a non-root user with nothing in it but the binary, and the default compose.yaml already sets read_only, cap_drop: [ALL] and no-new-privileges. You can lock it down further:
services: emby-mcp: image: ghcr.io/mattoddie/emby-mcp:1.4.2 # pinned read_only: true cap_drop: [ALL] security_opt: ["no-new-privileges:true"] mem_limit: 128m pids_limit: 100 env_file: .env ports: ["127.0.0.1:8080:8080"]The server only needs to reach your Emby server, on the address and port in EMBY_URL. It needs no internet access at all. See Security for choosing settings and toolsets.
Running without Docker
Section titled “Running without Docker”Docker is the easiest way to run emby-mcp as a service, but the server is a single static binary with no dependencies.
With Homebrew
Section titled “With Homebrew”On macOS or Linux, install the release binary with Homebrew:
brew install mattoddie/tap/emby-mcpbrew upgrade picks up new releases, usually within an hour of them being published. The formula installs the same release archive described below, after checking its checksum and build provenance. See mattoddie/homebrew-tap.
Download a release binary
Section titled “Download a release binary”Each release has an archive for macOS, Linux and Windows on amd64 and arm64. Each archive holds the emby-mcp binary and the licence. For example, on a Raspberry Pi or another 64-bit Arm Linux machine:
VERSION=1.2.3 # the latest release, without the vcurl -fsSLO https://github.com/mattoddie/emby-mcp/releases/download/v$VERSION/emby-mcp-$VERSION-linux-arm64.tar.gzcurl -fsSLO https://github.com/mattoddie/emby-mcp/releases/download/v$VERSION/SHA256SUMSsha256sum -c SHA256SUMS --ignore-missing # on macOS: shasum -a 256 -c SHA256SUMS --ignore-missingtar -xzf emby-mcp-$VERSION-linux-arm64.tar.gzsudo install emby-mcp /usr/local/bin/Use darwin-arm64 for a Mac with Apple silicon, darwin-amd64 for an Intel Mac, linux-amd64 for most PCs and servers, and the windows .zip files on Windows.
Each archive also has a signed build provenance attestation. To check that a file was built by this repository’s release workflow, run gh release verify-asset v$VERSION emby-mcp-$VERSION-linux-arm64.tar.gz -R mattoddie/emby-mcp.
Release binaries don’t update themselves. Watch the repository’s releases (Watch → Custom → Releases) to hear about new versions.
Build it yourself
Section titled “Build it yourself”You need Go 1.26 or later. With go install:
go install github.com/mattoddie/emby-mcp/cmd/emby-mcp@latestThe binary lands in $(go env GOPATH)/bin. Built this way it reports its version as 0.0.0-dev.
Or from a clone, which also stamps the version:
git clone https://github.com/mattoddie/emby-mcp.gitcd emby-mcpmake build VERSION=1.2.3 # writes bin/emby-mcpRun it
Section titled “Run it”export EMBY_URL=http://emby.lan:8096 EMBY_API_KEY_FILE=$HOME/.config/emby-mcp/api-keyemby-mcp check # test the connection and the keyemby-mcp # stdio, for an MCP client to startMCP_TRANSPORT=http MCP_AUTH_TOKEN=... emby-mcp # or a long-running HTTP serverTo run it as a service, a systemd unit that sets these variables in an EnvironmentFile and runs emby-mcp as an unprivileged user works well. It can run on the Emby machine itself, with EMBY_URL=http://localhost:8096.