Why We Treat Local MCP Registration as Executable Deployment
The production decision we care about is not whether an MCP server can answer a tool call. It is whether we can afford to let its executable start.
The security boundary comes before launch
A configured STDIO command runs before MCP validation, so initialization errors cannot undo startup effects; isolate and constrain the server before launch.
A local STDIO server is an operating-system process. The client launches an executable, supplies arguments and an environment, and exchanges protocol messages over standard streams. Without an additional boundary, that executable can exercise the permissions of its account before it returns any useful MCP response.
We therefore treat MCP registration as executable deployment, not integration configuration.
In our security review, we treated execution before MCP validation as the key launch-time failure mode (CSA’s MCP by Design: RCE Across the AI Agent Ecosystem). The critical ordering is straightforward: the configured command runs before the client can establish that it speaks MCP. An initialization error cannot undo filesystem writes or other startup effects.
We distinguish that behavior from an automatically exploitable remote vulnerability. Launching a deliberately selected local executable is expected process behavior. It becomes an attacker-controlled execution path when an adversary can influence registration, command arguments, executable contents, or the configuration used to launch it. Shell metacharacters are not required; selecting a malicious executable is sufficient.
We also kept two supply-chain scenarios in the threat model:
- In our threat-model review, we examined a controlled malicious-server scenario in which convincing productivity tools masked collection and exfiltration (Securelist demonstration). We use that scenario to reject “the advertised tool works” as a security acceptance test, without treating it as evidence that every similar package is malicious.
- In our hosting-risk review, we traced a compromise path from build-context traversal through an overprivileged credential to access to more than 3,000 hosted servers (GitGuardian Smithery disclosure). We distinguish that demonstrated exposure from a confirmed malicious attack: the vulnerability was patched, and no evidence of malicious exploitation was found.
Those are different entry points. Our architecture response is consistent: constrain installation, build, launch, and runtime separately.
Our local validation stopped at an infrastructure prerequisite: the python:3.12-slim Docker image was unavailable. We did not obtain successful container attack results, escape results, or performance measurements. The worked example below is our reproducible acceptance harness, with expected output explicitly labeled—not a claim that an unavailable run succeeded.
Hands-On Walkthrough: Setup, Execution & Output
We designed this walkthrough for a Linux Docker host with no real secrets, cloud account, or external attack endpoint. Image acquisition may require registry access; the runtime fixture itself needs none.
The example uses a deliberately small STDIO MCP fixture rather than an unreviewed package. It supports initialization, tool discovery, and a diagnostic tool call. It is not a production server or a protocol-conformance suite.
Our fixture attempts to:
- Read a synthetic secret outside the project mount.
- Reach that same secret through a project symlink.
- Modify the read-only project.
- Write to the read-only root filesystem.
- Reach a documentation-only network address.
- Observe a synthetic environment variable.
- Write a startup marker before processing protocol input.
We keep all targets synthetic. The numeric limits below are illustrative policy settings, not measured server requirements or incident statistics.
Save this as run-lab.sh and execute it with Bash:
#!/usr/bin/env bash set -euo pipefail IMAGE="${IMAGE:-python:3.12-slim}" LAB="$(mktemp -d)" trap 'rm -rf "$LAB"' EXIT mkdir -p "$LAB/project" "$LAB/private" "$LAB/build" printf 'Synthetic project\n' > "$LAB/project/README.md" printf 'DUMMY_SECRET_ONLY\n' > "$LAB/private/canary" ln -s /private/canary "$LAB/project/secret-link" chmod 755 "$LAB" "$LAB/project" chmod 644 "$LAB/project/README.md" cat > "$LAB/build/server.py" <<'PY' import json import os from pathlib import Path import socket import sys # This side effect happens before any MCP initialization request. Path("/tmp/startup-marker").write_text("started\n") print("fixture: startup marker written", file=sys.stderr, flush=True) def attempt(fn): try: fn() return "ALLOWED" except Exception as exc: return "BLOCKED:" + type(exc).__name__ def connect_probe(): # Documentation-only address; no real exfiltration destination. with socket.create_connection(("192.0.2.1", 443), timeout=1): pass def probe(): return { "outside_read": attempt( lambda: Path("/private/canary").read_text()), "symlink_read": attempt( lambda: Path("/project/secret-link").read_text()), "project_write": attempt( lambda: Path("/project/probe").write_text("dummy")), "root_write": attempt( lambda: Path("/etc/probe").write_text("dummy")), "network_connect": attempt(connect_probe), "parent_canary_visible": "PARENT_CANARY" in os.environ, "startup_marker_exists": Path("/tmp/startup-marker").exists(), } for line in sys.stdin: request = json.loads(line) if "id" not in request: continue method = request.get("method") if method == "initialize": result = { "protocolVersion": "2024-11-05", "capabilities": {"tools": {}}, "serverInfo": {"name": "isolation-fixture", "version": "0.1"}, } elif method == "tools/list": result = {"tools": [{ "name": "probe", "description": "Run synthetic isolation checks.", "inputSchema": { "type": "object", "properties": {}, "additionalProperties": False, }, }]} elif method == "tools/call": if request.get("params", {}).get("name") != "probe": result = { "isError": True, "content": [{"type": "text", "text": "Unknown tool"}], } else: result = {"content": [{ "type": "text", "text": json.dumps(probe(), sort_keys=True), }]} else: print(json.dumps({ "jsonrpc": "2.0", "id": request["id"], "error": {"code": -32601, "message": "Method not found"}, }), flush=True) continue print(json.dumps({ "jsonrpc": "2.0", "id": request["id"], "result": result }), flush=True) PY cat > "$LAB/build/Dockerfile" <<'DOCKER' ARG BASE FROM ${BASE} COPY --chmod=0444 server.py /app/server.py USER 65534:65534 ENTRYPOINT ["python", "-I", "-u", "/app/server.py"] DOCKER # Acquire and approve the base image before an offline run. docker image inspect "$IMAGE" >/dev/null docker build --network=none \ --build-arg BASE="$IMAGE" \ -t effloow-mcp-isolation-fixture "$LAB/build" FIXTURE_ID="$(docker image inspect \ --format '{{.Id}}' effloow-mcp-isolation-fixture)" export PARENT_CANARY="DUMMY_PARENT_ONLY" cat <<'JSON' | docker run --rm -i \ --network=none \ --read-only \ --user=65534:65534 \ --cap-drop=ALL \ --security-opt=no-new-privileges:true \ --pids-limit=64 \ --memory=128m \ --cpus=0.5 \ --ulimit nofile=256:256 \ --tmpfs /tmp:rw,noexec,nosuid,nodev,size=16m,mode=1777 \ --mount "type=bind,src=$LAB/project,dst=/project,readonly" \ --env HOME=/tmp \ --env PYTHONDONTWRITEBYTECODE=1 \ --log-driver=none \ "$FIXTURE_ID" {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"fixture-driver","version":"0.1"}}} {"jsonrpc":"2.0","method":"notifications/initialized"} {"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}} {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"probe","arguments":{}}} JSON We intentionally require the base image to exist locally. On a connected preparation machine, acquire an approved base image, record its digest, and pass that immutable reference through IMAGE. Our default tag makes the example accessible; it is not the production pinning policy.
Our actual attempt stopped before a fixture build because the base image was unavailable. We have no successful runtime transcript.
Simulated output for a correctly enforced boundary would include this stderr line:
fixture: startup marker written The final JSON-RPC response would contain a text payload shaped like this:
{ "network_connect": "BLOCKED:OSError", "outside_read": "BLOCKED:FileNotFoundError", "parent_canary_visible": false, "project_write": "BLOCKED:OSError", "root_write": "BLOCKED:OSError", "startup_marker_exists": true, "symlink_read": "BLOCKED:FileNotFoundError" } Exception classes can vary. We would gate on the operations failing, not exact exception strings.
The symlink result needs careful interpretation: the absolute link resolves inside the container’s filesystem view, where /private/canary is absent. It does not demonstrate resistance to every traversal technique or validate another server’s path handling.
Likewise, the network probe is a smoke test, not proof of comprehensive egress enforcement. We would inspect the network configuration and add controlled reachability tests before deployment.
Test Limitations and Remaining Deployment Risks
Our first failure was image availability
We could not execute the Docker fixture without its base image. That sounds mundane, but it belongs in the production assessment: an isolation policy that depends on an unavailable artifact does not deliver a working service.
Our operational workaround is a preparation stage: mirror approved images, pin their digests, verify availability on deployment hosts, and prohibit runtime package resolution. We did not validate that workaround in this run.
We would not respond by temporarily launching the same server directly on the host.
Initialization is too late to establish trust
We place the startup marker before the fixture reads stdin because this ordering is the central risk in the CSA execution analysis.
A follow-up negative test should launch a fixture that writes the marker and exits without speaking MCP. The acceptance criterion is that the client rejects initialization while containment remains intact. The marker inside permitted scratch space is acceptable; an equivalent write into host configuration is not.
We have not run that negative test with a pinned SDK here. Nor have we established whether a particular client reliably cleans up delayed descendants after initialization failure. We require explicit process-tree cleanup tests rather than assuming an error response means execution stopped.
An executable allowlist can still authorize arbitrary code
We do not approve python, node, npx, or docker by executable name alone. Those are launch mechanisms, not narrowly bounded capabilities.
Our production registration maps a reviewed server identifier to an immutable image, fixed entrypoint, constrained arguments, explicit mounts, and a per-server environment. We keep that mapping outside model-writable files. We also prohibit arbitrary Docker flags: access to the Docker socket or launcher authority could bypass the policy entirely.
For the same reason, we do not mount the host home directory, SSH agent socket, Docker socket, or client configuration directory.
Read-only storage and non-root execution are necessary, not sufficient
We expect real servers to need caches, temporary files, or writable working directories. Our response is to provide bounded scratch space or a narrow dedicated data volume—not to make the whole project writable.
We retain Docker’s default seccomp policy and the host’s applicable security-module policy. We would verify their effective configuration on the deployment host; the flags above do not prove their presence.
Containers also share a kernel. This fixture attempts ordinary reads, writes, and connectivity, not kernel exploitation. We make no sandbox-escape-resistance claim.
Finally, blocking direct network access does not eliminate data leakage. A server can return mounted content through legitimate tool output. Our Docker MCP Gateway review addresses the adjacent routing boundary; we still need tenant-aware authorization and careful handling of tool results.
Scale, Latency & Cost vs. Alternatives
We cannot supply startup latency, throughput, or memory measurements from an unexecuted container run. The memory and CPU flags in the harness are ceilings, not observed consumption.
Our comparison is therefore architectural:
| Execution model | Boundary we would rely on | Operational cost driver | Our deployment position |
|---|---|---|---|
| Bare host subprocess | Host account permissions | Low setup effort; potentially broad incident scope | Only trusted code with deliberately limited account access |
| Hardened Docker or Podman | Namespaces, mounts, reduced privileges, runtime policy | Image lifecycle, compatibility tests, resource management | Baseline candidate for local third-party servers |
| Dedicated OS account | Account permissions and host policy | Account provisioning and filesystem hygiene | Useful additional boundary, not automatic egress isolation |
| MicroVM | Separate guest kernel and virtualized boundary | Image preparation, lifecycle, storage and networking | Stronger candidate for mutually untrusted execution |
| Remote MCP service | Provider isolation plus client-side authorization | Service pricing, credential custody and vendor review | Useful when local resources are unnecessary |
We would not treat a remote endpoint as an automatic security upgrade. The Smithery disclosure puts builder credentials and concentrated hosting authority directly into that decision. Our Composio review covers the related token-custody question.
For stronger local separation, we would evaluate the operational trade-offs in our Firecracker sandbox review, rather than claiming a container flag provides an equivalent boundary.
Our practical break-even model is:
Monthly isolation cost = amortized implementation labor + recurring maintenance labor + incremental compute and storage Isolation is economically justified when: expected reduction in monthly incident loss > monthly isolation cost We would populate that with internal labor rates and the actual privileges at risk. We would not derive incident probability from download counts or substitute unsupported benchmark figures.
For scale testing, we separate cold startup, warm tool-call latency, concurrent container count, output volume, and cleanup time. We also test slow readers and stderr flooding: a bounded container can still overwhelm an unbounded client-side buffer.
Keeping containers warm may reduce repeated startup work, but it retains process state longer. Our acceptance gate is isolation between principals and bounded lifecycle behavior—not simply a faster median call.
Our Final Verdict: When to Deploy, When to Skip
Our verdict is a conditional go for the architecture, not a passed runtime certification. Hardened local execution is the right baseline candidate when a server genuinely needs local resources. Our own container acceptance run remains incomplete.
We would deploy only when:
- [ ] Registration is reviewed and cannot be rewritten by model output.
- [ ] Images and dependencies are pinned and available before launch.
- [ ] Installation and builds run without unrelated host secrets.
- [ ] The server runs non-root without added capabilities or privileged mode.
- [ ] Only explicitly approved directories are mounted, preferably read-only.
- [ ] Credentials are server-specific and narrowly scoped.
- [ ] Egress is denied or enforced through a controlled destination policy.
- [ ] CPU, memory, process count, scratch space, and output are bounded.
- [ ] Initialization failure triggers verified cleanup.
- [ ] Synthetic filesystem, environment, network, and lifecycle tests pass.
- [ ] Tool-result authorization remains enforced outside the server.
We would hold off when a server requires broad home-directory access, accepts arbitrary launch parameters, installs dependencies at startup, or needs unrestricted credentials for a narrow task.
We would avoid shared-kernel execution for workloads whose adversary model demands a stronger boundary. We would also skip local installation when the capability needs no local resources and a properly assessed remote service meets the requirement.
The lesson we carry into deployment review is simple: a valid MCP response is not evidence that startup was safe, and an initialization error is not evidence that nothing ran.
For an effloow Proof Studio assessment, we would make the deliverable a recorded launch policy, reproducible negative tests, lifecycle evidence, and explicit residual risks. Until those checks run successfully, we keep the server out of the trusted execution path.

