Local File Search MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Local File Search MCPfind all PDF files in the zoology samples"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
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 installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dchatpar/mcp-file-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server