Skip to content

Conversation

@olaservo
Copy link
Member

This PR addresses issue #2219 by implementing default filtering of dot-prefixed files and directories in the filesystem MCP server.

Changes

  • Add environment variable MCP_FILESYSTEM_INCLUDE_HIDDEN (default: false)
  • Filter dot-prefixed files/directories in list_directory, directory_tree, search_files
  • Reduce token usage from large directories like .git, .terraform, etc.
  • Enhance security by avoiding exposure of potentially sensitive hidden files
  • Include comprehensive tests for the new filtering functionality
  • Update documentation to explain the new behavior and environment variable

Backward Compatibility

Existing behavior is maintained by setting MCP_FILESYSTEM_INCLUDE_HIDDEN=true

Fixes #2219

Generated with Claude Code

…sage

- Add environment variable MCP_FILESYSTEM_INCLUDE_HIDDEN (default: false)
- Filter dot-prefixed files/directories in list_directory, directory_tree, search_files
- Reduces token usage from large directories like .git, .terraform, etc.
- Enhances security by avoiding exposure of potentially sensitive hidden files
- Includes comprehensive tests for the new filtering functionality
- Update documentation to explain the new behavior and environment variable

Fixes #2219

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Ola Hungerford <olaservo@users.noreply.github.com>
@olaservo olaservo requested a review from domdomegg August 27, 2025 12:26
Copy link
Member

@domdomegg domdomegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olaservo olaservo closed this Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

filesystem mcp: dot directories should be ignored

3 participants