pugazhmukilan/MCP-LocalFileResource-Server
3.3
If you are the rightful owner of MCP-LocalFileResource-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The MCP Local File Resource Server is a protocol server that allows local files to be accessed as resources and tools via MCP URIs and methods.
Tools
get_and_read_all_files
Read multiple files at once.
find_correct_file_tool
Search for files by name.
MCP Local File Resource Server
This project provides a Model Context Protocol (MCP) server that exposes files from a local directory as both resources and tools. It enables LLMs or MCP clients to search, read, and batch-process files—including text, code, and PDF documents—using standardized MCP URIs and methods.
Features
- Read Local Files as Resources:
Fetch the content of any file in your target directory by its name using a simple URI. - PDF Extraction:
Reads and extracts text from PDF files using PyMuPDF (fitz
). - File Search:
Search for files by partial name or extension using a dedicated resource or tool. - Batch File Reading:
Read multiple files at once and return their contents as a dictionary. - MCP-Compliant:
Works seamlessly with the MCP Inspector and other MCP clients.
How It Works
- Resources:
document://{filename}
— Read the content of a file (supports.txt
,.md
,.csv
,.pdf
, etc.).search://{dummyfilename}
— List all files matching a search pattern.
- Tools:
get_and_read_all_files
— Read multiple files at once.find_correct_file_tool
— Search for files by name (tool variant).
Getting Started
Prerequisites
- Python 3.8+
- MCP Python SDK (
pip install mcp
) - PyMuPDF for PDF support (
pip install pymupdf
)