MCP File Finder logo

MCP File Finder

by cavil2015

MCP File Finder is a server for searching files by a fragment of the path. It allows users to find files on a local system by providing a query string.

View on GitHub

Last updated: N/A

What is MCP File Finder?

MCP File Finder is a Python-based server that enables users to search for files on a local system based on a fragment of their path. It exposes an API endpoint to perform the search and returns the results in JSON format.

How to use MCP File Finder?

  1. Ensure Python 3.8+ is installed.
  2. Clone the repository: git clone https://github.com/cavil2015/mcp-file-finder.git
  3. Navigate to the directory: cd mcp-file-finder
  4. Install dependencies: pip install -r requirements.txt
  5. Run the server: python mcp_server.py
  6. Access the server at http://127.0.0.1:5000 and use the /find endpoint with the query and dir parameters (e.g., http://127.0.0.1:5000/find?query=test&dir=. to find files containing 'test' in the current directory).

Key features of MCP File Finder

  • File search by path fragment

  • JSON response format

  • Simple API endpoint

  • Easy installation

  • Lightweight server

Use cases of MCP File Finder

  • Quickly locate files based on partial path information

  • Automated file discovery in scripts

  • Integration with other applications for file management

  • Building custom file search tools

  • Finding configuration files based on name fragments

FAQ from MCP File Finder

What is the minimum Python version required?

Python 3.8 or higher is required.

How do I specify the directory to search in?

Use the dir parameter in the API request (e.g., &dir=path/to/directory).

What format does the API return?

The API returns a JSON array of file objects, each containing the file's name, path, size, and creation date.

Can I search for files recursively?

The current implementation searches within the specified directory. Recursive search is not supported out of the box.

How can I customize the server port?

The server runs on port 5000 by default. You can modify the mcp_server.py file to change the port number.