fix: file system running in docker #107
Open
+90
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ISSUE: #98
The issue was that when MCPJungle runs inside a Docker container, the filesystem MCP server could only access files within the container, not the host machine's filesystem.
It uses
npx @modelcontextprotocol/server-filesystem .
runs with the container's working directory, which is typically / or the container's root. This means it can only access files within the container, not the host machine's filesystem.Why?
The
client.NewStdioMCPClient()
function from themcp-go
library doesn't provide a way to specify the working directory for the subprocess, so it inherits the working directory of the parent MCPJungle process.So if we modify the docker config to mount the host fs into the container and update the MCP server fs config to use the mounted path, this should fix this.
docker-compose.yaml
anddocker-compose-prod.yaml
to mount the host filesystem at/host
inside the container.filesystem.json
inexamples/
directory, we could simply use inREADME
andDEVELOPMENT
, users can copy paste and use directly as they are very simple and reduces maintenance, fewer files to manage too