MCP File Server

MCP File Server

Enables AI models to perform file system operations (reading, creating, and listing files) on a local file system through a standardized Model Context Protocol interface.

codyde

File Systems
Local
JavaScript
Visit Server

Tools

createfile

readfile

listfiles

README

MCP File Server

A Model Context Protocol (MCP) server implementation providing file system operations through a standardized interface.

Overview

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.

Features

  • Create Files: Create new files with specified content
  • Read Files: Read the contents of existing files
  • List Directory Contents: List files and directories with detailed information
  • Performance Monitoring: Built-in Sentry integration for error tracking and performance monitoring

Installation

npm install

Usage

Start the MCP File Server:

node src/index.js

The server communicates through stdin/stdout using the MCP protocol.

Available Tools

createfile

Creates a new file at the specified path with the provided content.

Parameters:

  • filePath: Path where the file should be created
  • content: Content to write to the file

Returns:

  • Success message with file path and size information

readfile

Reads the content of a file at the specified path.

Parameters:

  • filePath: Path to the file to read

Returns:

  • The content of the file

listfiles

Lists files and directories at the specified path.

Parameters:

  • path: Directory path to list contents from

Returns:

  • A markdown table containing file names, sizes, and types

Environment Variables

  • SENTRY_DSN: Sentry Data Source Name for error tracking (optional)

Dependencies

  • @modelcontextprotocol/sdk: The MCP SDK package
  • zod: Schema validation
  • @sentry/node: Error tracking and performance monitoring

Examples

Examples 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"
  }
}

Recommended Servers

Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Excel MCP Server

Excel MCP Server

A Model Context Protocol server that enables AI assistants to read from and write to Microsoft Excel files, supporting formats like xlsx, xlsm, xltx, and xltm.

Featured
Local
Go
Playwright MCP Server

Playwright MCP Server

Provides a server utilizing Model Context Protocol to enable human-like browser automation with Playwright, allowing control over browser actions such as navigation, element interaction, and scrolling.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
Apple MCP Server

Apple MCP Server

Enables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.

Featured
Local
TypeScript
Supabase MCP Server

Supabase MCP Server

A Model Context Protocol (MCP) server that provides programmatic access to the Supabase Management API. This server allows AI models and other clients to manage Supabase projects and organizations through a standardized interface.

Featured
JavaScript
@kazuph/mcp-gmail-gas

@kazuph/mcp-gmail-gas

Model Context Protocol server for Gmail integration. This allows Claude Desktop (or any MCP client) to interact with your Gmail account through Google Apps Script.

Featured
JavaScript
Metabase MCP Server

Metabase MCP Server

Enables AI assistants to interact with Metabase databases and dashboards, allowing users to list and execute queries, access data visualizations, and interact with database resources through natural language.

Featured
JavaScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Airtable MCP Server

Airtable MCP Server

A Model Context Protocol server that provides tools for programmatically managing Airtable bases, tables, fields, and records through Claude Desktop or other MCP clients.

Featured
JavaScript