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., "@MCP Local File Readerread the contents of the document project_proposal.pdf"
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.
MCP Local File Reader
A Model Context Protocol (MCP) server that provides comprehensive file system operations with support for multiple document formats. Works with Claude Desktop and other MCP-compatible AI tools.
Features
📁 File System Operations: List directories, read files, get file metadata
🔍 Search Capabilities: Grep-like content search and file name pattern matching
📄 Multi-Format Support:
PDF text extraction
Excel (.xlsx, .xls) with sheet listing and per-sheet reading
Word documents (.docx)
PowerPoint presentations (.pptx)
CSV files
Text files with automatic encoding detection (Shift-JIS/UTF-8)
🌐 Character Encoding: Automatic detection and conversion of Shift-JIS and UTF-8
🔒 Security: Path validation to prevent access outside designated root directory
Installation
Using npx (Recommended)
No installation needed! Just configure Claude Desktop to use npx:
Local Installation
Configuration
Claude Desktop
Edit your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Add the server configuration:
Or if installed globally:
Environment Variables
MCP_ROOT_PATH: Root directory for file access (defaults to current working directory)
Windows Example:
macOS/Linux Example:
Note: On Windows, use double backslashes (
\\) or forward slashes (/) in paths. See WINDOWS.md for detailed Windows compatibility information.
Available Tools
list_directory
List contents of a directory.
Parameters:
path(string): Relative path from root directory. Use "." for root.
Example:
read_file
Read file content with automatic format detection.
Parameters:
path(string): Relative path to the file.
Supported formats:
Text files (.txt, .md, .json, .xml, etc.)
PDF (.pdf)
Excel (.xlsx, .xls)
Word (.docx)
PowerPoint (.pptx)
CSV (.csv)
Example:
get_file_info
Get metadata about a file or directory.
Parameters:
path(string): Relative path to the file or directory.
Example:
search_content
Search for text patterns in files. Returns a list of file paths that contain the pattern.
Parameters:
path(string): Relative path to search in.pattern(string): Text pattern or regex to search for.max_results(number): Optional. Maximum number of files to return (default: 1000).file_pattern(string, optional): Filter files by name pattern.case_sensitive(boolean, optional): Case sensitive search. Default: false.
Example:
find_files
Find files by name pattern.
Parameters:
path(string): Relative path to search in.name_pattern(string): File name pattern or regex.case_sensitive(boolean, optional): Case sensitive search. Default: false.
Example:
list_excel_sheets
List all sheet names in an Excel file.
Parameters:
path(string): Relative path to the Excel file.
Example:
read_excel_sheet
Read a specific sheet from an Excel file.
Parameters:
path(string): Relative path to the Excel file.sheet_name(string): Name of the sheet to read.
Example:
Development
Setup
Build
Testing Locally
Use the MCP Inspector to test the server:
Or set the root path:
Usage Examples
With Claude Desktop
After configuration, you can ask Claude:
"List all files in the current directory"
"Read the contents of report.pdf"
"Search for 'error' in all log files"
"Find all Excel files"
"List the sheets in budget.xlsx and read the Sales sheet"
"Read the Word document proposal.docx"
Programmatic Usage
File Format Support Details
Extracts all text content from PDF files
Handles multi-page documents
Uses
pdf-parselibrary
Excel
Supports .xlsx and .xls formats
List all sheet names
Read specific sheets or all sheets
Returns data as JSON arrays
Word
Supports .docx format
Extracts plain text content
Uses
mammothlibrary
PowerPoint
Supports .pptx format
Extracts text from all slides
Returns slide-by-slide content
CSV
Automatic delimiter detection
Character encoding detection (Shift-JIS/UTF-8)
Returns structured JSON data
Text Files
Automatic character encoding detection
Supports Shift-JIS and UTF-8
Handles various text-based formats
Security
Path validation prevents access outside the configured root directory
All paths are resolved and validated before file operations
Error handling for permission issues and invalid paths
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Author
yryuu
Repository
https://github.com/yryuu/mcp-localfile-all-read