File System Operations
STDIOMCP server implementation providing file system operations through standardized interface.
MCP server implementation providing file system operations through standardized interface.
A Model Context Protocol (MCP) server implementation providing file system operations through a standardized interface.
The MCP File Server enables AI models to perform file operations on the local file system through a standardized API. It's built using the Model Context Protocol SDK and provides tools for reading, creating, and listing files.
npm install
Start the MCP File Server:
node src/index.js
The server communicates through stdin/stdout using the MCP protocol.
Creates a new file at the specified path with the provided content.
Parameters:
filePath
: Path where the file should be createdcontent
: Content to write to the fileReturns:
Reads the content of a file at the specified path.
Parameters:
filePath
: Path to the file to readReturns:
Lists files and directories at the specified path.
Parameters:
path
: Directory path to list contents fromReturns:
SENTRY_DSN
: Sentry Data Source Name for error tracking (optional)@modelcontextprotocol/sdk
: The MCP SDK packagezod
: Schema validation@sentry/node
: Error tracking and performance monitoringExamples of how to call these tools through the MCP protocol:
{ "name": "createfile", "params": { "filePath": "example/test.txt", "content": "Hello, world!" } }
{ "name": "readfile", "params": { "filePath": "example/test.txt" } }
{ "name": "listfiles", "params": { "path": "example" } }