Skip to content

Commit f591d7d

Browse files
committed
update readme
1 parent a4a792d commit f591d7d

File tree

2 files changed

+73
-55
lines changed

2 files changed

+73
-55
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ docker/.env
1717
.aider*
1818
CLAUDE.md
1919
docs/**
20+
21+
# AI conversation artifacts
22+
context/**
23+
AI_CHANGELOG.md

README.md

Lines changed: 69 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# MCP Filesystem Server
22

3-
[![PyPI - Version](https://img.shields.io/pypi/v/mcp-filesystem.svg)](https://pypi.org/project/mcp-filesystem)
43
[![License](https://img.shields.io/github/license/safurrier/mcp-filesystem.svg)](https://github.com/safurrier/mcp-filesystem/blob/main/LICENSE)
54

65
A powerful Model Context Protocol (MCP) server for filesystem operations that provides Claude and other MCP clients with secure access to files and directories.
@@ -19,79 +18,62 @@ A powerful Model Context Protocol (MCP) server for filesystem operations that pr
1918
- Efficiently handles large files and directories
2019
- Ripgrep integration for blazing fast searches
2120
- Line-targeted operations to avoid loading entire files
22-
- **Claude Integration**: Easily installs in Claude Desktop
21+
- **Comprehensive Testing**: 75+ tests with behavior-driven approach
2322
- **Cross-Platform**: Works on Windows, macOS, and Linux
2423

2524
## Installation
2625

27-
### From PyPI
28-
```bash
29-
# With pip
30-
pip install mcp-filesystem
31-
32-
# With uv (recommended for Claude Desktop)
33-
uv pip install mcp-filesystem
34-
```
26+
### Development Setup
3527

36-
### From Source
3728
```bash
38-
# With pip
39-
git clone https://github.com/safurrier/mcp-filesystem.git
29+
# Clone the repository
30+
git clone https://github.com/yourusername/mcp-filesystem.git
4031
cd mcp-filesystem
41-
pip install -e .
4232

43-
# With uv (recommended for Claude Desktop)
44-
git clone https://github.com/safurrier/mcp-filesystem.git
45-
cd mcp-filesystem
46-
uv pip install -e .
33+
# Install dependencies with uv
34+
uv pip sync requirements.txt requirements-dev.txt
4735
```
4836

49-
## Quick Start
37+
## Usage
5038

51-
Run the server with access to the current directory:
39+
### Running the Server
5240

53-
```bash
54-
mcp-filesystem run
55-
```
56-
57-
Allow access to specific directories:
41+
Run the server with access to specific directories:
5842

5943
```bash
60-
mcp-filesystem run /path/to/dir1 /path/to/dir2
61-
```
44+
# Using uv (recommended)
45+
uv run -m mcp_filesystem run /path/to/dir1 /path/to/dir2
6246

63-
Use SSE transport instead of stdio:
64-
65-
```bash
66-
mcp-filesystem run --transport sse --port 8000
47+
# Or using standard Python
48+
python -m mcp_filesystem run /path/to/dir1 /path/to/dir2
6749
```
6850

69-
## MCP Inspector Usage
51+
#### Options
7052

71-
When using with MCP Inspector:
53+
- `--transport` or `-t`: Transport protocol (stdio or sse, default: stdio)
54+
- `--port` or `-p`: Port for SSE transport (default: 8000)
55+
- `--debug` or `-d`: Enable debug logging
7256

73-
```
74-
Command: uv
75-
Arguments: --directory /path/to/mcp-filesystem run mcp-filesystem run
76-
```
57+
### Using with MCP Inspector
7758

78-
Note: The trailing `run` is required as it specifies the subcommand to execute.
59+
For interactive testing and debugging with the MCP Inspector:
7960

80-
This server has been refactored to use the new FastMCP SDK for better alignment with current MCP best practices. It now uses a more efficient component caching system and direct decorator pattern rather than a class-based approach.
61+
```bash
62+
# Basic usage
63+
npx @modelcontextprotocol/inspector uv run -m mcp_filesystem run /path/to/directory
8164

82-
## Claude Desktop Integration
65+
# With SSE transport
66+
npx @modelcontextprotocol/inspector uv run -m mcp_filesystem run /path/to/directory --transport sse --port 8080
8367

84-
To install in Claude Desktop:
68+
# With debug output
69+
npx @modelcontextprotocol/inspector uv run -m mcp_filesystem run /path/to/directory --debug
70+
```
8571

86-
```bash
87-
# Using mcp CLI
88-
mcp install mcp-filesystem
72+
This server has been built with the FastMCP SDK for better alignment with current MCP best practices. It uses an efficient component caching system and direct decorator pattern.
8973

90-
# With access to specific directories
91-
mcp install mcp-filesystem --args="/path/to/dir1 /path/to/dir2"
92-
```
74+
## Claude Desktop Integration
9375

94-
Or manually edit your Claude Desktop config file:
76+
Edit your Claude Desktop config file to integrate MCP-Filesystem:
9577

9678
**Config file location:**
9779
- On macOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
@@ -103,10 +85,9 @@ Or manually edit your Claude Desktop config file:
10385
"mcp-filesystem": {
10486
"command": "uv",
10587
"args": [
106-
"--directory",
107-
"/path/to/mcp-filesystem",
10888
"run",
109-
"mcp-filesystem",
89+
"-m",
90+
"mcp_filesystem",
11091
"run"
11192
]
11293
}
@@ -122,10 +103,9 @@ To allow access to specific directories, add them as additional arguments:
122103
"mcp-filesystem": {
123104
"command": "uv",
124105
"args": [
125-
"--directory",
126-
"/path/to/mcp-filesystem",
127106
"run",
128-
"mcp-filesystem",
107+
"-m",
108+
"mcp_filesystem",
129109
"run",
130110
"/Users/yourusername/Projects",
131111
"/Users/yourusername/Documents"
@@ -135,7 +115,41 @@ To allow access to specific directories, add them as additional arguments:
135115
}
136116
```
137117

138-
Note: The trailing `run` at the end of the args is required as it specifies the subcommand to execute.
118+
Note: The `run` command at the end is required as it specifies the subcommand to execute.
119+
120+
## Development
121+
122+
### Running Tests
123+
124+
```bash
125+
# Run all tests
126+
uv run -m pytest tests/
127+
128+
# Run specific test file
129+
uv run -m pytest tests/test_operations_unit.py
130+
131+
# Run with coverage
132+
uv run -m pytest tests/ --cov=mcp_filesystem --cov-report=term-missing
133+
```
134+
135+
### Code Style and Quality
136+
137+
```bash
138+
# Format code
139+
uv run -m ruff format mcp_filesystem
140+
141+
# Lint code
142+
uv run -m ruff check --fix mcp_filesystem
143+
144+
# Type check
145+
uv run -m mypy mcp_filesystem
146+
147+
# Run all checks
148+
uv run -m ruff format mcp_filesystem && \
149+
uv run -m ruff check --fix mcp_filesystem && \
150+
uv run -m mypy mcp_filesystem && \
151+
uv run -m pytest tests --cov=mcp_filesystem
152+
```
139153

140154
## Available Tools
141155

0 commit comments

Comments
 (0)