- Home
- MCP servers
- File Search
File Search
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"liu10250510-mcp-file-search-server": {
"command": "python",
"args": [
"/path/to/mcp_file_search_server.py"
],
"env": {
"OPENAI_ORG_ID": "org-...",
"OPENAI_API_KEY": "sk-..."
}
}
}
}This MCP File Search Server lets you perform fast, natural language searches across local files. It can filter by type, filename keywords, and content, returning relevant results to help you quickly locate documents, data files, code, and more.
How to use
You run the MCP server locally and connect your MCP client to it to perform searches. You describe what you want in plain English, and the server will search through your folders for matching files, ranking results by relevance. Use it to find PDFs about a topic, Excel budgets, JSON configurations, or code snippets across multiple formats.
How to install
Prerequisites: you need Python installed on your system. Make sure you have access to the directory where you want to run the server.
- Install dependencies
uv sync
- Set up environment variables for OpenAI access
cp .env.example .env
# Edit .env and add your OpenAI API key
- Run the setup script to prepare the MCP server
python setup_mcp_server.py
Configuration and usage notes
Start the server as a local stdio MCP endpoint so your client can connect directly. The following runtime command demonstrates how to launch the server in stdio mode with Python.
python /path/to/mcp_file_search_server.py
Your MCP client can reference this server configuration in its client setup. The example shows how to register a local stdio MCP server named file_search. Replace the path with your actual script location.
Security and maintenance notes
Keep your OpenAI API credentials secure. Do not expose your API key in client configurations. Regularly review access to the server and the folders being searched to ensure only authorized users can initiate searches.
Available tools
search_files
Search for files in a local directory using natural language. Supports documents, data files, code, and text across multiple formats; returns ranked results by relevance.