Skip to main content
Glama

MCP File Server

by codyde

MCP ファイルサーバー

標準化されたインターフェースを通じてファイル システム操作を提供するモデル コンテキスト プロトコル (MCP) サーバー実装。

概要

MCPファイルサーバーは、AIモデルが標準化されたAPIを介してローカルファイルシステム上でファイル操作を実行できるようにします。モデルコンテキストプロトコルSDKを使用して構築されており、ファイルの読み取り、作成、一覧表示のためのツールを提供します。

特徴

  • ファイルの作成: 指定した内容で新しいファイルを作成します
  • ファイルの読み取り: 既存のファイルの内容を読み取る
  • ディレクトリの内容の一覧表示: 詳細情報を含むファイルとディレクトリの一覧表示
  • パフォーマンス監視: エラー追跡とパフォーマンス監視のための組み込み Sentry 統合

インストール

npm install

使用法

MCP ファイル サーバーを起動します。

node src/index.js

サーバーは、MCP プロトコルを使用して stdin/stdout を介して通信します。

利用可能なツール

ファイルを作成する

指定されたパスに指定されたコンテンツを含む新しいファイルを作成します。

パラメータ:

  • filePath : ファイルを作成するパス
  • content : ファイルに書き込むコンテンツ

戻り値:

  • ファイルパスとサイズ情報を含む成功メッセージ

ファイルの読み取り

指定されたパスにあるファイルの内容を読み取ります。

パラメータ:

  • filePath : 読み取るファイルへのパス

戻り値:

  • ファイルの内容

リストファイル

指定されたパスにあるファイルとディレクトリを一覧表示します。

パラメータ:

  • path : 内容をリストするディレクトリパス

戻り値:

  • ファイル名、サイズ、タイプを含むマークダウンテーブル

環境変数

  • SENTRY_DSN : エラー追跡用の Sentry データ ソース名 (オプション)

依存関係

  • @modelcontextprotocol/sdk : MCP SDK パッケージ
  • zod : スキーマ検証
  • @sentry/node : エラー追跡とパフォーマンス監視

MCP プロトコルを通じてこれらのツールを呼び出す方法の例:

{ "name": "createfile", "params": { "filePath": "example/test.txt", "content": "Hello, world!" } }
{ "name": "readfile", "params": { "filePath": "example/test.txt" } }
{ "name": "listfiles", "params": { "path": "example" } }

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

標準化されたモデル コンテキスト プロトコル インターフェースを介して、AI モデルがローカル ファイル システムでファイル システム操作 (ファイルの読み取り、作成、一覧表示) を実行できるようにします。

  1. 概要
    1. 特徴
      1. インストール
        1. 使用法
          1. 利用可能なツール
            1. ファイルを作成する
            2. ファイルの読み取り
            3. リストファイル
          2. 環境変数
            1. 依存関係

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  A Model Context Protocol server that extends AI capabilities by providing file system access and management functionalities to Claude or other AI assistants.
                  Last updated -
                  3
                  TypeScript
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A comprehensive MCP (Model Context Protocol) server for file system operations, providing Claude and other AI assistants with access to local files and directories.
                  Last updated -
                  Python
                  MIT License
                  • Apple
                  • Linux
                • -
                  security
                  A
                  license
                  -
                  quality
                  A secure Model Context Protocol server that provides controlled filesystem access within predefined directories, enabling AI models to perform file and directory operations with strict path validation.
                  Last updated -
                  26
                  7
                  TypeScript
                  MIT License
                  • Linux
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  Enables AI applications to interact with decentralized storage through a standardized Model Context Protocol interface, allowing file uploads, retrievals, and identity management.
                  Last updated -
                  7
                  TypeScript
                  Apache 2.0
                  • Linux
                  • Apple

                View all related MCP servers

                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/codyde/mcp-file-tool'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server