-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Summary
When using rust-mcp-filesystem via Docker MCP Gateway, the paths configuration in ~/.docker/mcp/config.yaml is not being passed to the container as command-line arguments, causing the server to fail with an EOF error.
Environment
- Docker MCP Gateway (via
docker mcpCLI) - rust-mcp-filesystem image:
mcp/rust-mcp-filesystem@sha256:77a7f6f7a477bdec2c58696c76afda8e1f88d189f7c8b935d8dd9a00ee5780c5 - Platform: Linux (Ubuntu)
Configuration
# ~/.docker/mcp/config.yaml
rust-mcp-filesystem:
paths:
- /home/bo
- /home/bo/Documents
- /home/bo/Downloads
- /home/bo/do
- /home/bo/oxExpected Behavior
The Docker MCP Gateway should:
- Mount the specified paths as volumes (
-v /home/bo:/home/bo) - Pass the paths as command arguments to the container
This is how the standard mcp/filesystem server works:
Running mcp/filesystem with [...-v /home/bo:/home/bo -v /home/bo/Documents:/home/bo/Documents...] and command [/home/bo /home/bo/Documents /home/bo/Downloads /home/bo/do /home/bo/ox]
Actual Behavior
The gateway runs rust-mcp-filesystem with no volume mounts and no command arguments:
Running mcp/rust-mcp-filesystem with [run --rm -i --init --security-opt no-new-privileges --cpus 1 --memory 2Gb --pull never -l docker-mcp=true -l docker-mcp-tool-type=mcp -l docker-mcp-name=rust-mcp-filesystem -l docker-mcp-transport=stdio --network none] and command []
This causes the server to fail:
Can't start rust-mcp-filesystem: failed to connect: calling "initialize": EOF
When manually running the container without paths, it panics:
thread 'main' (1) panicked at src/fs_service/core.rs:27:21:
Error: /home/bo is not a directory
Root Cause Analysis
Inspecting the Docker image labels:
docker inspect mcp/rust-mcp-filesystem --format '{{json .Config.Labels}}'Returns only:
{"org.opencontainers.image.revision": "a959b4c0465ad5452e74b46043a7a91d62f0ea24"}The image appears to be missing the io.docker.server.metadata label that tells the Docker MCP Gateway how to map configuration (like paths) to volume mounts and command arguments.
Suggested Fix
Add the appropriate io.docker.server.metadata label to the Dockerfile, similar to how mcp/filesystem is configured, so that:
pathsconfig creates volume mountspathsconfig values are passed as command-line arguments ([ALLOWED_DIRECTORIES]...)
Workaround
Currently using the standard mcp/filesystem server instead, which works correctly with the paths configuration.