Filesystem MCP Server
ファイルシステムMCPサーバー
標準化されたツール インターフェイスを通じてファイル システムの操作、分析、および操作機能を提供するモデル コンテキスト プロトコル (MCP) サーバー実装。
建築
サーバーは MCP SDK 上に構築され、明確なレイヤーに編成されています。
graph TD
A[MCP Server Layer] --> B[Tool Registry]
B --> C[Operations Layer]
C --> D[File System Operations]
C --> E[Analysis Operations]
C --> F[Stream Operations]コンポーネント
サーバー層: MCPプロトコル通信とツールディスパッチを処理する
ツールレジストリ: ツールの登録と実行を管理します
運用層: コア機能を実装する
ファイルシステムインターフェース:安全なファイルシステムアクセスを提供する
Related MCP server: MCP Filesystem Server
インストール
リポジトリをクローンします。
git clone <repository-url>
cd filesystem-server依存関係をインストールします:
npm installサーバーを構築します。
npm run buildMCP 設定を構成します (cline_mcp_settings.json):
{
"mcpServers": {
"filesystem": {
"command": "node",
"args": ["path/to/filesystem-server/build/index.js"]
}
}
}ツールリファレンス
ディレクトリ操作
リストディレクトリ
メタデータとともにディレクトリの内容を一覧表示します。
interface ListDirectoryParams {
path: string; // Directory path
recursive?: boolean; // List recursively (default: false)
}
interface ListDirectoryResult {
entries: {
name: string;
path: string;
isDirectory: boolean;
size: number;
created: string;
modified: string;
accessed: string;
mode: string;
}[];
}ディレクトリの作成
新しいディレクトリを作成します。
interface CreateDirectoryParams {
path: string; // Directory path
recursive?: boolean; // Create parent directories (default: true)
}ファイル操作
読み取りファイル
エンコード サポートを使用してファイルの内容を読み取ります。
interface ReadFileParams {
path: string; // File path
encoding?: string; // File encoding (default: 'utf8')
}書き込みファイル
コンテンツをファイルに書き込みます。
interface WriteFileParams {
path: string; // File path
content: string; // Content to write
encoding?: string; // File encoding (default: 'utf8')
}ファイル追加
ファイルにコンテンツを追加します。
interface AppendFileParams {
path: string; // File path
content: string; // Content to append
encoding?: string; // File encoding (default: 'utf8')
}分析操作
テキスト分析
テキスト ファイルのプロパティを分析します。
interface AnalyzeTextParams {
path: string; // File path
}
interface AnalyzeTextResult {
lineCount: number;
wordCount: number;
charCount: number;
encoding: string;
mimeType: string;
}ハッシュを計算する
指定されたアルゴリズムを使用してファイル ハッシュを計算します。
interface CalculateHashParams {
path: string; // File path
algorithm?: 'md5' | 'sha1' | 'sha256' | 'sha512'; // Hash algorithm
}
interface CalculateHashResult {
hash: string;
algorithm: string;
}重複を見つける
ディレクトリ内の重複ファイルを識別します。
interface FindDuplicatesParams {
path: string; // Directory path
}
interface FindDuplicatesResult {
duplicates: {
hash: string;
size: number;
files: string[];
}[];
}圧縮操作
作成_zip
ZIP アーカイブを作成します。
interface CreateZipParams {
files: string[]; // Files to include
output: string; // Output ZIP path
}抽出_zip
ZIP アーカイブを抽出します。
interface ExtractZipParams {
path: string; // ZIP file path
output: string; // Output directory
}エラー処理
サーバーは標準の MCP エラー コードを使用します。
enum ErrorCode {
ParseError = -32700,
InvalidRequest = -32600,
MethodNotFound = -32601,
InvalidParams = -32602,
InternalError = -32603
}エラー応答には次のものがあります:
エラーコード
人間が読めるメッセージ
利用可能な場合の追加コンテキスト
エラー例:
{
"code": -32602,
"message": "File not found: /path/to/file.txt"
}発達
プロジェクト構造
src/
├── operations/ # Core operations implementation
├── tools/ # MCP tool definitions and handlers
├── __tests__/ # Test suites
├── index.ts # Entry point
├── server.ts # MCP server setup
├── types.ts # Type definitions
└── utils.ts # Utility functionsテストの実行
テスト スイートを実行します。
npm testカバレッジ付きで実行:
npm run test:coverage開発モード
ウォッチモードで実行:
npm run watchコード品質
コードベースをリントする:
npm run lint型チェック:
npm run type-check依存関係
コア依存関係:
@modelcontextprotocol/sdk: MCP サーバーの実装
ファイルタイプ: ファイルタイプの検出
mime-types: MIMEタイプの検索
crypto-js: ファイルハッシュ
アーカイバ:ZIP作成
extract-zip: ZIP抽出
iconv-lite: テキストエンコーディング
chardet: エンコーディング検出
開発依存関係:
Typescript: 型システム
jest: テスト
eslint: リンティング
prettier: フォーマット
ts-node: TypeScriptの実行
nodemon: 開発サーバー
貢献
リポジトリをフォークする
機能ブランチを作成する
新機能のテストを書く
すべてのテストに合格することを確認する
プルリクエストを送信する
ライセンス
マサチューセッツ工科大学
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for Studex tools, notifications, and profile integrations
Model Context Protocol server for todo.vu task management and time tracking.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables enhanced file system operations including reading, writing, copying, moving files with streaming capabilities, directory management, file watching, and change tracking.21MIT
- AlicenseAqualityFmaintenanceA Model Context Protocol server that provides secure and intelligent interaction with files and filesystems, offering smart context management and token-efficient operations for working with large files and complex directory structures.2166MIT
- AlicenseCqualityDmaintenanceA server implementing the Model Context Protocol that provides filesystem operations (read/write, directory management, file movement) through a standardized interface with security controls for allowed directories.94MIT
- AlicenseNot gradedqualityDmaintenanceA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.711MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bsmi021/mcp-filesystem-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server