- Home
- MCP servers
- MCP Local File Reader
MCP Local File Reader
- typescript
10
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 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": {
"sworddut-mcp-local-file-reader": {
"command": "cmd",
"args": [
"/c",
"node",
"path/to/mcp-local-file-reader/build/index.js"
]
}
}
}You can safely access your local file system from an AI model through an MCP server that reads files, lists directories, and fetches file metadata. This empowers your models to understand and reason about your local data without exposing unnecessary paths or risking unsafe access.
How to use
Use a compatible MCP client to connect to the local file reader server. You can start the server locally or integrate it into an MCP-enabled environment such as Windsurf. The server exposes tools for reading files, listing directory contents, and getting file information. You will issue tool calls from your AI workflow to perform actions like reading a file, listing files in a directory, or retrieving file metadata.
How to install
Prerequisites you need before installing:
- Node.js (recommended LTS version)
- npm (comes with Node.js)
Install the local file reader package from npm:
npm install mcp-local-file-reader
Build and run options are provided for development and integration scenarios. To build the server:
npm run build
For development mode with automatic rebuilds:
npm run watch
To test MCP inspector tooling:
npm run inspector
Configuration and security
Security is essential because this server allows an AI model to access local files. Apply the following practices:
- Restrict access to only necessary directories
- Do not expose sensitive files or directories
- Consider additional safety controls in production environments
Available tools
read_file
Read the contents of a specified file. Returns the full text for text files or a metadata/summary for binary files.
list_files
List all files within a specified directory and return a list of file names.
get_file_info
Retrieve detailed metadata about a specific file, including size, type, and creation time.