feat(claude.sh): pull MCP servers from OCI images via --mcp-image #29

Merged
claudiomaradonna merged 1 commit from feat/mcp-image into main 2026-08-25 14:37:28 +02:00

--mcp-image (or CLAUDE_JAIL_MCP_IMAGES, comma-separated) names an
OCI image whose entrypoint is a single static binary, e.g. the
ghcr.io/mudler/mcps/* collection. The image is pulled on every run so a
:latest tag tracks upstream; the entrypoint binary is copied out of a
created-but-never-started container into ~/.claude-jail/mcp/,
where the existing /opt/mcp mount exposes it to every session.

An image-id marker next to each binary skips re-extraction when the
image did not change, refuses to clobber hand-dropped binaries the
script never extracted, and lets a failed pull fall back to the cached
copy instead of blocking the session. Extraction goes through a temp
file plus rename so a binary executing in a concurrent session is never
written in place (ETXTBSY). --dry-run narrates the pulls it would do
without touching podman.

The podman test stub grows simulated pull/inspect/create/cp/rm
subcommands and a call journal (STUB_CALLS_FILE) so the whole flow runs
end to end in the harness.

Claude-Session: https://claude.ai/code/session_01G7h6JzQ6nt3379WRxjTJ2M

--mcp-image <ref> (or CLAUDE_JAIL_MCP_IMAGES, comma-separated) names an OCI image whose entrypoint is a single static binary, e.g. the ghcr.io/mudler/mcps/* collection. The image is pulled on every run so a :latest tag tracks upstream; the entrypoint binary is copied out of a created-but-never-started container into ~/.claude-jail/mcp/<name>, where the existing /opt/mcp mount exposes it to every session. An image-id marker next to each binary skips re-extraction when the image did not change, refuses to clobber hand-dropped binaries the script never extracted, and lets a failed pull fall back to the cached copy instead of blocking the session. Extraction goes through a temp file plus rename so a binary executing in a concurrent session is never written in place (ETXTBSY). --dry-run narrates the pulls it would do without touching podman. The podman test stub grows simulated pull/inspect/create/cp/rm subcommands and a call journal (STUB_CALLS_FILE) so the whole flow runs end to end in the harness. Claude-Session: https://claude.ai/code/session_01G7h6JzQ6nt3379WRxjTJ2M
--mcp-image <ref> (or CLAUDE_JAIL_MCP_IMAGES, comma-separated) names an
OCI image whose entrypoint is a single static binary, e.g. the
ghcr.io/mudler/mcps/* collection. The image is pulled on every run so a
:latest tag tracks upstream; the entrypoint binary is copied out of a
created-but-never-started container into ~/.claude-jail/mcp/<name>,
where the existing /opt/mcp mount exposes it to every session.

An image-id marker next to each binary skips re-extraction when the
image did not change, refuses to clobber hand-dropped binaries the
script never extracted, and lets a failed pull fall back to the cached
copy instead of blocking the session. Extraction goes through a temp
file plus rename so a binary executing in a concurrent session is never
written in place (ETXTBSY). --dry-run narrates the pulls it would do
without touching podman.

The podman test stub grows simulated pull/inspect/create/cp/rm
subcommands and a call journal (STUB_CALLS_FILE) so the whole flow runs
end to end in the harness.

Claude-Session: https://claude.ai/code/session_01G7h6JzQ6nt3379WRxjTJ2M
claudiomaradonna deleted branch feat/mcp-image 2026-08-25 14:37:33 +02:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
claudiomaradonna/claude-jail!29
No description provided.