Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Skirano committed Nov 20, 2024
1 parent 49c6b19 commit 4f25b1e
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions src/filesystem/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Filesystem MCP Server

Node.js server implementing Model Context Protocol (MCP) for filesystem operations.

## Features

- Read/write files
- Create/list/delete directories
- Move files/directories
- Search files
- Get file metadata

## Usage

1. Install dependencies:
```
npm install @modelcontextprotocol/sdk
```

2. Run server:
```
node index.js
```

3. Server runs on stdio, communicate using MCP.

## API

### Resources

- `file://system`: File system operations interface

### Tools

1. `read_file`: Read file contents
2. `read_multiple_files`: Read multiple files
3. `write_file`: Create/overwrite file
4. `create_directory`: Create directory
5. `list_directory`: List directory contents
6. `delete_file`: Delete file/directory
7. `move_file`: Move/rename file/directory
8. `search_files`: Search files/directories
9. `get_file_info`: Get file metadata

## Implementation

- Uses `@modelcontextprotocol/sdk`
- Async file operations with `fs/promises`
- Type guards for argument validation
- Error handling and detailed descriptions

## Notes

- Careful with `delete_file` and `write_file` (overwrites existing)
- File paths can be absolute or relative

0 comments on commit 4f25b1e

Please sign in to comment.