About
Filesystem MCP Server enables secure file and directory operations for AI coding assistants, allowing them to read, write, search, and manipulate local files through the Model Context Protocol. Key capabilities: - Read single or multiple files, create new files, or overwrite existing content - Copy, move, rename, and delete files and directories with recursive support - Modify file contents using string matching or regular expressions - List directory contents and generate hierarchical tree representations - Search for files by name pattern across directory trees - Search within file contents for specific text with configurable depth and result limits - Retrieve detailed file metadata and information
README
MCP Filesystem Server
This MCP server provides secure access to the local filesystem via the Model Context Protocol (MCP).
Components
Resources
Tools
#### File Operations
path (required): Path to the file to readpaths (required): List of file paths to readpath (required): Path where to write the file, content (required): Content to write to the filesource (required): Source path of the file or directory, destination (required): Destination pathsource (required): Source path of the file or directory, destination (required): Destination pathpath (required): Path to the file or directory to delete, recursive (optional): Whether to recursively delete directories (default: false)path (required): Path to the file to modify, find (required): Text to search for, replace (required): Text to replace with, all_occurrences (optional): Replace all occurrences (default: true), regex (optional): Treat find pattern as regex (default: false)#### Directory Operations
path (required): Path of the directory to listpath (required): Path of the directory to createpath (required): Path of the directory to traverse, depth (optional): Maximum depth to traverse (default: 3), follow_symlinks (optional): Whether to follow symbolic links (default: false)#### Search and Information
path (required): Starting path for the search, pattern (required): Search pattern to match against file namespath (required): Starting directory for the search, substring (required): Text to search for within file contents, depth (optional): Maximum directory depth to search, max_results (optional): Maximum number of results to return (default: 1000)path (required): Path to the file or directoryFeatures
Getting Started
Installation
#### Using Go Install
go install github.com/mark3labs/mcp-filesystem-server@latest
Usage
#### As a standalone server
Start the MCP server with allowed directories:
mcp-filesystem-server /path/to/allowed/directory [/another/allowed/directory ...]
#### As a library in your Go project
package mainimport (
"log"
"os"
"github.com/mark3labs/mcp-filesystem-server/filesystemserver"
)
func main() {
// Create a new filesystem server with allowed directories
allowedDirs := []string{"/path/to/allowed/directory", "/another/allowed/directory"}
fs, err := filesystemserver.NewFilesystemServer(allowedDirs)
if err != nil {
log.Fatalf("Failed to create server: %v", err)
}
// Serve requests
if err := fs.Serve(); err != nil {
log.Fatalf("Server error: %v", err)
}
}
Usage with Model Context Protocol
To integrate this server with apps that support MCP:
{
"mcpServers": {
"filesystem": {
"command": "mcp-filesystem-server",
"args": ["/path/to/allowed/directory", "/another/allowed/directory"]
}
}
}
Docker
#### Running with Docker
You can run the Filesystem MCP server using Docker:
docker run -i --rm ghcr.io/mark3labs/mcp-filesystem-server:latest /path/to/allowed/directory
#### Docker Configuration with MCP
To integrate the Docker image with apps that support MCP:
```json { "mcpServers": { "filesystem": {
Related MCP Servers
AI Research Assistant
hamid-vakilzadeh
AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar
Linkup
LinkupPlatform
Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages
Math-MCP
EthanHenrickson
Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support