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.
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?
- Ensure Python 3.8+ is installed.
- Clone the repository:
git clone https://github.com/cavil2015/mcp-file-finder.git
- Navigate to the directory:
cd mcp-file-finder
- Install dependencies:
pip install -r requirements.txt
- Run the server:
python mcp_server.py
- Access the server at
http://127.0.0.1:5000
and use the/find
endpoint with thequery
anddir
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?
What is the minimum Python version required?
Python 3.8 or higher is required.
How do I specify the directory to search in?
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?
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?
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?
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.