Local File Search MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Local File Search MCP Agent
LangChain CLI agent that combines an in-process Local File Search MCP (FastMCP) with the remote Microsoft Learn MCP. The LLM uses MiniMax via the OpenAI-compatible API.
Features
search_files— metadata filters (name, folder, extension, dates, size)search_pdf_content— PDF full-text keyword search viapypdfMicrosoft Learn MCP at
https://learn.microsoft.com/api/mcp(streamable_http)SKILL-based routing with JSON-only local results and 2000-char MS answers
Async REPL CLI
Related MCP server: MCP Local File Reader
Documentation
Guide | Description |
Documentation index | |
Architecture and what was built | |
MiniMax ↔ OpenAI migration | |
Deploy: local, GitHub, Docker, systemd | |
Operations and CI | |
Common issues | |
Assignment audit | |
Reviewer guide for |
Setup
One command (recommended):
git clone https://github.com/dchatpar/mcp-file-agent.git
cd mcp-file-agent
chmod +x install.py
./install.py --non-interactive --skip-e2e # no API key; full gate without E2E
# Or interactive: ./install.pyManual setup:
cd mcp-file-agent
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
cp .env.example .env
# Set OPENAI_API_KEY in .env (never commit .env)
python scripts/generate_samples.pyMiniMax (OpenAI-compatible)
Configure .env:
OPENAI_API_KEY=<your MiniMax API key>
OPENAI_BASE_URL=https://api.minimax.io/v1
OPENAI_MODEL=MiniMax-M2.7LangChain uses ChatOpenAI with base_url pointing at MiniMax. MiniMax-only extra_body (thinking disabled) is applied automatically when the base URL contains minimax. OPENAI_API_BASE_URL is accepted as an alias for OPENAI_BASE_URL.
Assignment / OpenAI GPT-5.x: Defaults to MiniMax-M2.7. For OpenAI, copy .env.openai.example to .env or set OPENAI_BASE_URL=https://api.openai.com/v1, your GPT model id, and an OpenAI API key. Full steps: docs/LLM_PROVIDER_GUIDE.md.
Environment
Variable | Default | Description |
| — | Required for agent E2E (MiniMax key) |
|
| MiniMax OpenAI-compatible endpoint |
|
| Model name on MiniMax |
|
| Sandboxed search directory |
| (same as | Alias for |
|
| Learn MCP endpoint |
|
| Max length for Microsoft Learn answers |
Run CLI
file-search-agent
# or
python -m file_search_agent.mainSample queries
Local (JSON only):
What PDF files are available in our system?Learn (≤2000 chars):
What is Azure Blob Storage?PDF content search:
Find mentions of migration in the PDFsOut-of-scope:
What is the capital of France?→ refusal JSON
Test data
The data/samples/zoology/ directory holds 8 non-technical zoology files used for all local-search tests:
File | Extension | Description |
| Elephant population dynamics | |
| Orca/dolphin hydrophone survey | |
| Arctic tern geolocator study | |
| Chytrid fungus impact assessment | |
| .docx | Great Barrier Reef transect notes |
| .xls | Endangered species population counts |
| .txt | Borneo rainforest expedition diary |
| .jpg | Camera-trap image placeholder |
Regenerate with: python scripts/generate_samples.py
Verification
QA matrix
Check | Command | API key | Expected |
Lint |
| No | All checks passed |
Unit tests |
| No | 40 passed |
E2E agent |
| Yes | 5/5 PASSED (~1–2 min) |
Production gate |
| Yes | All 6 steps PASS (~90s) |
Sample data |
| No | 8 files in |
Run lint and unit tests in parallel:
source .venv/bin/activate
pip install -e ".[dev]"
python scripts/generate_samples.py
ruff check src tests scripts & pytest -v & waitE2E (requires OPENAI_API_KEY in .env):
Takes about 1–2 minutes. Use unbuffered output so progress prints appear immediately ([1/5] … [5/5]):
python -u scripts/e2e_verify.pyChecks:
PDF files query → local tools, JSON with PDF entries
List all files → local tools, 8 files total
Elephant search → local tools, elephant match in JSON
Azure Blob Storage → Learn MCP only, answer ≤ 2000 chars
Out-of-scope (capital of France) → assignment error JSON, no tools
Interactive CLI smoke test:
file-search-agentAssignment compliance
Requirement | Implementation | Verified by |
Local File Search MCP (in-process) |
|
|
| name, folder, extension, dates, size |
|
| pypdf keyword search |
|
| lists all sandboxed files |
|
| read single PDF by path |
|
Microsoft Learn MCP (remote) |
|
|
SKILL routing (local JSON / MS prose / out-of-scope) |
|
|
MiniMax via OpenAI-compatible API |
|
|
Sandboxed | path traversal rejected |
|
8 sample zoology files |
|
|
Dependencies
Pinned full environment (after pip install -e ".[dev]"):
pip install -r requirements.txt
pip install -e .Or install from project metadata only: pip install -e ".[dev]".
GitHub
Published repository: https://github.com/dchatpar/mcp-file-agent
Reviewer abin-aot has been invited as a collaborator. Submission email draft for the AOT assessment: docs/SUBMISSION_EMAIL_TO_ABIN.md.
Project layout
src/file_search_agent/
main.py # Async REPL
config.py # Env config
models.py # Pydantic tool models
agent_factory.py # create_agent + MCP clients
output_guard.py # JSON / truncation guards
mcp/local_file_search.py
data/samples/zoology/ # Non-tech zoology sample files
docs/ # Full deployment and LLM guides
deploy/ # systemd unit example
Dockerfile # Container image
docker-compose.yml
tests/License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Read and search folders on your own computer with explicit consent. Files are never uploaded.
Securely search and manage workspace context files for AI agents and teams.
Search, browse, and read your Dropbox files. Find documents by name or content, list folders, and…
Find, read and reorganize files across Google Drive, OneDrive, SharePoint and Dropbox, with undo.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides sandboxed access to local filesystem operations including directory and file management, content search with glob and regex patterns, and binary file support with configurable safety limits.-
- AlicenseAqualityDmaintenanceEnables comprehensive local file system operations including searching and reading content from various formats like PDF, Office documents, CSV, and text files. It features automatic character encoding detection and secure path validation for directory access.71MIT
- AlicenseNot gradedqualityBmaintenanceProvides AI assistants with semantic search and read access to local files and directories, enabling knowledge retrieval from indexed content.36 npm17MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to search and read the user's local document collection (PDF, Word, Excel, Markdown, plain text) during a conversation by subject, by file name/path, or by exact word, and to retrieve file contents page by page. It also supports finding folders relevant to a topic and checking indexing status, with everything running locally on the user's machine.MIT