Skip to content

Conversation

@vipmax
Copy link

@vipmax vipmax commented Mar 30, 2025

Description

Exclude dirs like .venv, .git with MCP_FILESYSTEM_IGNORE_PATTERNS env variable

Server Details

  • Server: filesystem
  • Changes to: added support for directories exclusion

Motivation and Context

I found that .git, .venv folders get into the output of list_directory and directory_tree methods and clutter the context for llm, wasting a lot of users' money

How Has This Been Tested?

mcp inspector

Breaking Changes

Clients like vscode can add MCP_FILESYSTEM_IGNORE_PATTERNS env and exclude dirs like .git, .venv

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Additional context

@olaservo olaservo added enhancement New feature or request server-filesystem Reference implementation for the Filesystem MCP server - src/filesystem labels Apr 18, 2025
@domdomegg
Copy link
Member

Thanks for your contribution! While we appreciate the thought you've put into this, it doesn't align with our current plans. We'd encourage you to check out our contributor guidelines and roadmap to see what areas we're actively looking for help with.

I think we'd be more excited about directions to add standardized include/exclude parameters across the tools, similar to #623

@domdomegg domdomegg closed this Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request server-filesystem Reference implementation for the Filesystem MCP server - src/filesystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants