Skip to content

"search_files" tool of Filesystem example MCP server does not work as expected #735

@Finndersen

Description

@Finndersen

Describe the bug
It is expected that the pattern argument of the search_files tool would support glob/regex style wildcard patterns, e.g. "*.py", but it does not.

Looking at the implementation it is easy to see why, for some reason it just does a basic substring inclusion test instead of a proper glob minimatch() like it does for the excludePatterns argument.

To Reproduce
Steps to reproduce the behavior:

  1. Start Filesystem MCP and connect client
  2. Try use search_files tool providing pattern argument with glob/regex style wildcard pattern e.g. "*.py"
  3. get "No matches found" even when there are files that match

Expected behavior
search_files tool pattern argument should support glob/regex style wildcard patterns

I'm planning on creating a fix for this soon!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingserver-filesystemReference implementation for the Filesystem MCP server - src/filesystem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions