Deployment¶
This page covers running audiobookshelf-mcp as long-lived servers.
audiobookshelf-mcpships both an MCP server (console scriptaudiobookshelf-mcp) and an A2A agent server (console scriptaudiobookshelf-agent).
Deployment Options¶
audiobookshelf-mcp supports local stdio, a loopback-only development listener, a
least-privilege stdio container, and a remote authenticated HTTPS boundary.
Provider endpoint, credential, selector, identity, and trust material are supplied
at runtime through AgentConfig; none is stored in this repository.
Installed stdio process¶
{
"mcpServers": {
"audiobookshelf": {
"command": "audiobookshelf-mcp",
"args": [],
"env": {"MCP_TOOL_MODE": "intent"}
}
}
}
Loopback development listener¶
Do not expose this listener beyond loopback. Network deployments require direct TLS
or an explicitly trusted TLS-terminating ingress, configured authentication, exact
MCP_ALLOWED_HOSTS, and an exact trusted-proxy CIDR policy.
Least-privilege local container¶
docker run -i --rm \
--read-only \
--cap-drop=ALL \
--security-opt=no-new-privileges \
--pids-limit=256 \
--tmpfs /tmp:rw,noexec,nosuid,nodev,size=64m \
-e TRANSPORT=stdio \
registry.example.invalid/audiobookshelf-mcp@sha256:<digest> audiobookshelf-mcp
The operator projects the selected AgentConfig profile into the process at runtime; the image remains immutable and contains no environment connection profile.
Remote authenticated HTTPS endpoint¶
Store the real remote URL, outbound identity reference, and TLS-profile reference in
AgentConfig, not in MCP client JSON or documentation.
Docker Compose¶
docker compose -f docker/mcp.compose.yml up -d # MCP server only
docker compose -f docker/agent.compose.yml up -d # MCP + agent
Compose reads endpoints, credentials, model settings, trust profiles, and optional image locations from the runtime environment or secret provider. The published ports bind to loopback by default; widening a bind requires an explicit network security decision.
The multi-stage image installs the checked-out source and drops to an unprivileged runtime user. The Compose files do not read a repository dotenv file or deploy the backing Audiobookshelf, identity, graph, or observability services.
Run the A2A agent server¶
Before startup, follow the configuration contract and run the Agent Utilities doctor checks listed there.