[MCP][filesystem] Does not work #10579
-
What happened?After pulling docker images and updating to 0.8.1-rc1, MCP filesystem server is no longer functional - sometimes it shows up as an MCP server with no tools, sometimes it does not show up at all. Version Information❯ docker images | grep librechat ❯ git rev-parse HEAD Steps to Reproduce
# For more information, see the Configuration Guide:
# https://www.librechat.ai/docs/configuration/librechat_yaml
# Configuration version (required)
version: 1.3.1
mcpServers:
filesystem:
command: npx
args:
- -y
- "@modelcontextprotocol/server-filesystem"
- /sources/my/folder1
- /sources/my/folder2
- /sources/my/folder3
endpoints:
agents:
# (optional) Default recursion depth for agents, defaults to 25
recursionLimit: 50
# (optional) Max recursion depth for agents, defaults to 25
maxRecursionLimit: 100
Use specified .yml files and run What browsers are you seeing the problem on?No response Relevant log output> LibreChat@v0.8.1-rc1 backend
> cross-env NODE_ENV=production node api/server/index.js
2025-11-19 14:40:58 info: Mongo Connection options
2025-11-19 14:40:58 info: {
"bufferCommands": false
}
2025-11-19 14:41:01 info: Connected to MongoDB
2025-11-19 14:41:01 info: [indexSync] Starting index synchronization check...
2025-11-19 14:41:02 info: [getAppConfig] App configuration not initialized. Initializing AppService...
2025-11-19 14:41:02 info: Custom config file loaded:
2025-11-19 14:41:02 info: {
"version": "1.3.1",
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/sources/my/folder1",
"/sources/my/folder2",
"/sources/my/folder3"
]
}
},
"endpoints": {
"agents": {
"recursionLimit": 50,
"maxRecursionLimit": 100
}
}
}
2025-11-19 14:41:02 warn: Default value for CREDS_KEY is being used.
2025-11-19 14:41:02 warn: Default value for CREDS_IV is being used.
2025-11-19 14:41:02 warn: Default value for JWT_SECRET is being used.
2025-11-19 14:41:02 warn: Default value for JWT_REFRESH_SECRET is being used.
2025-11-19 14:41:02 info: Please replace any default secret values.
2025-11-19 14:41:02 info:
For your convenience, use this tool to generate your own secret values:
https://www.librechat.ai/toolkit/creds_generator
2025-11-19 14:41:02 warn: The `CHECK_BALANCE` environment variable is deprecated. Please use the `balance` field in the `librechat.yaml` config file instead.
ore info: https://librechat.ai/docs/configuration/librechat_yaml/object_structure/balance#overview
2025-11-19 14:41:02 info: RAG API is running and reachable at http://rag_api:8000.
2025-11-19 14:41:02 info: Server listening on all interfaces at port 3080. Use http://localhost:3080 to access it
2025-11-19 14:41:02 info: [indexSync] Messages are fully synced: 2724/2724
2025-11-19 14:41:02 info: [indexSync] Conversations are fully synced: 456/456
2025-11-19 14:41:02 warn: [FlowStateManager] Cannot complete flow - flow state not found
2025-11-19 14:41:05 info: [MCP][filesystem] -------------------------------------------------┐
2025-11-19 14:41:05 info: [MCP][filesystem] URL: N/A
2025-11-19 14:41:05 info: [MCP][filesystem] OAuth Required: false
2025-11-19 14:41:05 info: [MCP][filesystem] Capabilities: {"tools":{}}
2025-11-19 14:41:05 info: [MCP][filesystem] Tools: undefined
2025-11-19 14:41:05 info: [MCP][filesystem] Server Instructions: undefined
2025-11-19 14:41:05 info: [MCP][filesystem] Initialized in: 3824ms
2025-11-19 14:41:05 info: [MCP][filesystem] -------------------------------------------------┘
2025-11-19 14:41:05 info: MCP servers initialized successfully. Added 0 MCP tools.
2025-11-19 14:41:05 info: OAuth reconnect manager initialized successfully.
2025-11-19 14:41:11 error: [getMCPTools] [
{
"code": "invalid_literal",
"expected": "object",
"path": [
"tools",
0,
"inputSchema",
"type"
],
"message": "Invalid literal value, expected \"object\""
},
{
"code": "invalid_literal",
"expected": "object",
"path": [
"tools",
1,
"inputSchema",
"type"
],
"message": "Invalid literal value, expected \"object\""
},
{
"code": "invalid_literal",
"expected": "object",
"path": [
"tools",
2,
"inputSchema",
"type"
],
"message": "Invalid literal value, expected \"object\""
},
{
"code": "invalid_literal",
"expected": "object",
"path": [
"tools",
3,
"inputSchema",
"type"
],
"message": "Invalid literal value, expected \"object\""
},
{
"code": "invalid_literal",
"expected": "object",
"path": [
"tools",
4,
"inputSchema",
"type"
],
"message": "Invalid literal value, expected \"object\""
},
{
"code": "invalid_literal",
"expected": "object",
"path": [
"tools",
5,
"inputSchema",
"type"
],
"message": "Invalid literal value, expected \"object\""
},
{
"code": "invalid_literal",
"expected": "object",
"path": [
"tools",
6,
"inputSchema",
"type"
],
"message": "Invalid literal value, expected \"object\""
},
{
"code": "invalid_literal",
"expected": "object",
"path": [
"tools",
7,
"inputSchema",
"type"
],
"message": "Invalid literal value, expected \"object\""
},
{
"code": "invalid_literal",
"expected": "object",
"path": [
"tools",
8,
"inputSchema",
"type"
],
"message": "Invalid literal value, expected \"object\""
},
{
"code": "invalid_literal",
"expected": "object",
"path": [
"tools",
9,
"inputSchema",
"type"
],
"message": "Invalid literal value, expected \"object\""
},
{
"code": "invalid_literal",
"expected": "object",
"path": [
"tools",
10,
"inputSchema",
"type"
],
"message": "Invalid literal value, expected \"object\""
},
{
"code": "invalid_literal",
"expected": "object",
"path": [
"tools",
11,
"inputSchema",
"type"
],
"message": "Invalid literal value, expected \"object\""
},
{
"code": "invalid_literal",
"expected": "object",
"path": [
"tools",
12,
"inputSchema",
"type"
],
"message": "Invalid literal value, expected \"object\""
}
]ScreenshotsNo response Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Thanks for the report. I spent a few hours investigating this issue since I use the same MCP server internally. This is a bug in the official filesystem MCP server, not LibreChat. Root CauseThe filesystem MCP server's latest versions install SolutionI've patched the issue in a fork by explicitly pinning Patched fork: https://github.com/danny-avila/server-filesystem How to UseAdd this to your Dockerfile before the WORKDIR /app/mcp_servers
RUN git clone https://github.com/danny-avila/server-filesystem.git
WORKDIR /app/mcp_servers/server-filesystem
RUN npm install
RUN npm run build
WORKDIR /appThen configure in your mcpServers:
filesystem:
command: node
args:
- /app/mcp_servers/server-filesystem/dist/index.js
- /app # or whatever directory you want accessibleReporting UpstreamThis needs to be reported to the official repo: https://github.com/modelcontextprotocol/servers/issues If someone wants to open an issue there, please reference that the problem occurs when |
Beta Was this translation helpful? Give feedback.
Thanks for the report. I spent a few hours investigating this issue since I use the same MCP server internally. This is a bug in the official filesystem MCP server, not LibreChat.
Root Cause
The filesystem MCP server's latest versions install
zod-to-json-schemawithout locked dependencies. At runtime, this pulls in Zod v4, while the MCP SDK uses Zod v3, causing schema validation errors where thetype: "object"field is missing from tool definitions.Solution
I've patched the issue in a fork by explicitly pinning
zod: "^3.23.3"as a dependency, forcing all packages to use compatible Zod v3 versions.Patched fork: https://github.com/danny-avila/server-filesystem
How to Use
Add this to your …