home / mcp / mcp local file reader
Provides local file access capabilities for AI models via MCP, including listing, reading, and inspecting files.
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.
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.
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-readerBuild 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 inspectorSecurity 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
Read the contents of a specified file. Returns the full text for text files or a metadata/summary for binary files.
List all files within a specified directory and return a list of file names.
Retrieve detailed metadata about a specific file, including size, type, and creation time.