MCP Filesystem Server for VS Code: Setup & Config
MCP Filesystem Server gives VS Code file and directory operations within explicitly allowed paths.
What you can do with MCP Filesystem in VS Code
Scoped local file operations, content search, and directory trees in a Go binary or library.
- Read several project files in a single request.
- Apply literal or regex text replacements.
Before you start: MCP Filesystem in VS Code
- Go for the documented go install method
- Install github.com/mark3labs/mcp-filesystem-server@latest
- Allowed directories supplied at launch
Replace the example allowed paths. The README also documents Docker and embedding the filesystemserver package in Go applications.
MCP Filesystem VS Code configuration
Choose VS Code configuration scope
For MCP Filesystem Server, open Workspace: .vscode/mcp.json. Merge into servers; preserve existing inputs.
Add MCP Filesystem Server to VS Code
Use the mcp-filesystem-server entry below in servers. Keep MCP Filesystem Server's documented stdio connection fields and your other VS Code entries.
Check MCP Filesystem Server in VS Code
MCP Filesystem Server: Start in VS Code’s MCP controls; inspect output and trust prompts.
Config file · Workspace: .vscode/mcp.json
{
"servers": {
"mcp-filesystem-server": {
"type": "stdio",
"command": "mcp-filesystem-server",
"args": [
"/path/to/allowed/directory",
"/another/allowed/directory"
],
"env": {}
}
}
}MCP Filesystem tools available to VS Code
MCP Filesystem's stored tool list documents 14 tools; compare it with VS Code's connected tool list, because the stored list is not a live check.
- read_file
Look for read_file among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
Read all content from a specified file.
- read_multiple_files
Look for read_multiple_files among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
Read several paths in one operation.
- write_file
Look for write_file among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
Create a file or replace its existing content.
- copy_file
Look for copy_file among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
Copy a file or directory to another path.
- move_file
Look for move_file among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
- delete_file
Look for delete_file among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
- modify_file
Look for modify_file among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
- list_directory
Look for list_directory among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
List entries within a directory.
- create_directory
Look for create_directory among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
Create a directory or ensure it exists.
- tree
Look for tree among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
Return a nested JSON directory tree with depth controls.
- search_files
Look for search_files among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
- search_within_files
Look for search_within_files among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
- get_file_info
Look for get_file_info among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
- list_allowed_directories
Look for list_allowed_directories among VS Code's agent-mode tools after starting MCP Filesystem through the MCP controls.
Troubleshooting MCP Filesystem in VS Code
- Make mcp-filesystem-server available in the workspace, container, or remote environment hosting MCP Filesystem Server. Start through VS Code's MCP controls; inspect output and trust prompts.
- MCP Filesystem Server uses stdio here: VS Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
- Known limitation: The tool set includes overwriting and deletion, not only reads.
- Known limitation: Docker needs a volume mount to modify host files.
- General VS Code troubleshooting lives in the /clients/vscode guide.
MCP Filesystem Server — details. VS Code guide