Skip to main content
Glama
MCP PC Control Server

MCP PC Control Server

MCP PCコントロールサーバー

ファイル操作、ディレクトリ管理、コマンド実行、システム調査、プロセス管理など、包括的なPC制御機能を提供する強力なModel Context Protocol (MCP) サーバーです。AIアシスタント(Claude、GPT、Geminiなど)がホストマシンを完全かつ効率的に制御できるように設計されています。

機能

ファイル操作

  • read_file - 適切なエンコーディングでファイルの内容全体を読み取る

  • read_file_lines - ファイルの特定の範囲の行を読み取る(大きなファイルで効率的)

  • write_file - 新規ファイルの作成または既存ファイルの上書き

  • append_to_file - 上書きせずにファイルに内容を追記する

  • edit_file - diff出力を使用して正確なテキストベースの編集を行う

  • copy_file - ファイルを新しい場所にコピーする(ソースは保持される)

  • delete_file - ファイルシステムからファイルを削除する

  • move_file - ファイルやディレクトリの移動または名前変更

  • get_file_info - 詳細なファイルメタデータ(サイズ、タイムスタンプ、権限、読み取り可能性)を取得する

ディレクトリ操作

  • create_directory - ディレクトリを作成する(ネストされた作成をサポート)

  • list_directory - 詳細情報とともにディレクトリの内容を一覧表示する

  • delete_directory - ディレクトリとその内容を再帰的に削除する

  • search_files - 名前パターンに一致するファイルを再帰的に検索する

コンテンツ検索

  • search_in_files - ファイル内のテキストコンテンツをGrepのように検索する(オプションのファイルパターンフィルタリングおよび大文字小文字を区別しないモード付き)

システム操作

  • execute_command - 作業ディレクトリと設定可能なタイムアウトを指定してシェルコマンドを実行する

  • get_system_info - OS、CPU、メモリ、稼働時間、ホスト名、ネットワークインターフェースの詳細を取得する

  • list_processes - 名前フィルタを指定して実行中のプロセスを一覧表示する

  • get_environment - 環境変数を読み取る(一つまたはすべて)

Related MCP server: Enhanced File Operations MCP Server

インストール

  1. このリポジトリをクローンまたはダウンロードします

  2. 依存関係をインストールします:

npm install
  1. プロジェクトをビルドします:

npm run build

使用方法

サーバーの実行

サーバーはstdioを介して通信し、MCPクライアントで使用するように設計されています:

npm start

Claude Desktopでの設定

Claude Desktopの設定ファイルにこのサーバーを追加します:

macOSの場合: ~/Library/Application Support/Claude/claude_desktop_config.json

Windowsの場合: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "pc-control": {
      "command": "node",
      "args": ["/absolute/path/to/first_mcp/build/index.js"]
    }
  }
}

/absolute/path/to/first_mcp をこのプロジェクトディレクトリの実際の絶対パスに置き換えてください。

他のAIクライアントでの設定

MCP互換クライアント(Claude、Cursor、Windsurf、Continueなど)は、同じstdioトランスポートアプローチを使用してこのサーバーに接続できます。クライアントで node を使用してビルド済みの build/index.js を指定してください。

npxを使用した例(代替)

{
  "mcpServers": {
    "pc-control": {
      "command": "npx",
      "args": ["-y", "mcp-pc-control-server"]
    }
  }
}

利用可能なツール

read_file

{ path: string }

read_file_lines

{
  path: string,
  start: number,  // 1-based, inclusive
  end?: number    // 1-based, inclusive (omit to read to end)
}

write_file

{ path: string, content: string }

append_to_file

{ path: string, content: string }

edit_file

{
  path: string,
  edits: [{ oldText: string, newText: string }]
}

copy_file

{ source: string, destination: string }

create_directory

{ path: string }

list_directory

{ path: string }

delete_file

{ path: string }

delete_directory

{ path: string }

move_file

{ source: string, destination: string }

get_file_info

{ path: string }

execute_command

{
  command: string,
  workingDirectory?: string,
  timeout?: number  // ms, default 30000
}
{ path: string, pattern: string }  // pattern supports * and **
{
  path: string,
  query: string,
  filePattern?: string,     // e.g. "*.ts"
  caseSensitive?: boolean   // default false
}

get_system_info

{}  // no arguments required

list_processes

{ filter?: string }  // optional substring filter on process name

get_environment

{ variable?: string }  // omit to get all env vars

セキュリティ上の考慮事項

警告: このサーバーは強力なファイルシステムおよびコマンド実行機能を提供します。

  • ファイルアクセス: プロセスが権限を持つあらゆるファイルを読み取り、書き込み、削除できます

  • コマンド実行: 任意のシェルコマンドを実行できます

  • サンドボックスなし: 操作はサンドボックス化や制限されていません

推奨事項:

  • 信頼できるMCPクライアントでのみ使用してください

  • 最小限の必要な権限で実行してください

  • execute_command および delete_directory ツールには注意してください

  • 本番環境で使用する場合は、追加のアクセス制御の実装を検討してください

  • 機密性の高い環境ではすべての操作を確認してください

開発

ビルド

npm run build

ウォッチモード

npm run watch

プロジェクト構造

.
├── src/
│   └── index.ts          # Main server implementation
├── build/                # Compiled JavaScript (generated)
├── package.json
├── tsconfig.json
└── README.md

ライセンス

MIT

貢献

貢献を歓迎します!問題の報告やプルリクエストを自由に行ってください。

トラブルシューティング

Claude Desktopにサーバーが表示されない

  1. claude_desktop_config.json のパスが絶対パスであり、正しいことを確認してください

  2. ビルドディレクトリが存在し、index.js が含まれていることを確認してください

  3. 設定変更後にClaude Desktopを再起動してください

  4. Claude Desktopのログでエラーを確認してください

権限エラー

  • サーバープロセスが必要なファイルシステム権限を持っていることを確認してください

  • Unixシステムでは、ls -la でファイル/ディレクトリの権限を確認してください

  • 必要な操作に対して適切なユーザー権限で実行してください

コマンド実行の問題

  • 作業ディレクトリが存在し、アクセス可能であることを確認してください

  • シェルコマンドがオペレーティングシステムに適していることを確認してください

  • 長時間実行されるコマンドには timeout パラメータを増やしてください

  • 一部のコマンドには特定の環境変数が必要な場合があります

Available Tools

11 tools
create_directoryA

Create a new directory or ensure a directory exists. Can create multiple nested directories in one operation. If the directory already exists, this operation will succeed silently.

Inputs: path (required).

delete_directoryA

Permanently delete a directory and all of its contents, including all files and subdirectories. This is a recursive operation that cannot be undone. Use with extreme caution.

Inputs: path (required).

delete_fileA

Permanently delete a file from the file system. This operation cannot be undone. The file is immediately removed from the storage device.

Inputs: path (required).

edit_fileA

Make line-based edits to a text file. Provide original lines and their replacements. Returns a git-style diff showing the changes made. Each edit replaces exact line sequences with new content.

Inputs: path (required), edits (required).

execute_commandA

Execute shell commands on the system. SECURITY WARNING: This tool provides direct system access. Only use with trusted commands. Commands run with the same permissions as the MCP server process.

Inputs: command (required), workingDirectory.

get_file_infoA

Retrieve detailed metadata about a file or directory, including size, creation time, modification time, access time, type, and permissions. This does not read file contents.

Inputs: path (required).

list_directoryA

Get a detailed listing of all files and directories in a specified path. Results include names, types (file/directory), sizes, and modification times. Useful for understanding directory structure and finding files.

Inputs: path (required).

move_fileA

Move or rename files and directories. Can move files between directories and rename them in a single operation. If the destination exists, the operation will fail.

Inputs: source (required), destination (required).

read_fileA

Read the complete contents of a file from the file system. Handles various text encodings and returns the full file content. Use this to examine file contents before editing.

Inputs: path (required).

search_filesA

Recursively search for files matching a pattern in a directory. Supports wildcards (* and **) and returns matching file paths. Useful for finding files by name or extension.

Inputs: path (required), pattern (required).

write_fileA

Create a new file or completely overwrite an existing file with new content. Use with caution as it will overwrite existing files without warning. Handles text content with proper encoding.

Inputs: path (required), content (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no ambiguity: create_directory vs. delete_directory, read_file vs. edit_file vs. write_file, list_directory vs. search_files, etc. The descriptions reinforce unique roles, such as get_file_info for metadata only and execute_command for shell operations, preventing misselection.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case, such as create_directory, delete_file, and execute_command. This predictable naming scheme makes it easy for agents to understand and use the tools without confusion from mixed conventions.

    Tool Count5/5

    With 11 tools, the server is well-scoped for PC control, covering essential file system operations (CRUD for files/directories), metadata retrieval, searching, and command execution. Each tool earns its place without being overwhelming or insufficient for the domain.

    Completeness5/5

    The tool set provides complete coverage for file system management: create, read, edit, write, delete, move, list, search, and get info for files and directories, plus execute_command for broader system control. There are no obvious gaps, enabling agents to handle full workflows without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      D
      quality
      D
      maintenance
      Enables AI models to perform file system operations (reading, creating, and listing files) on a local file system through a standardized Model Context Protocol interface.
      3
      ISC
    • F
      license
      Not graded
      quality
      C
      maintenance
      A comprehensive Model Context Protocol server that provides over 50 file and system management tools for AI models, including navigation, file operations, search, compression, and system information capabilities.
      -
    • A
      license
      A
      quality
      D
      maintenance
      A comprehensive Model Context Protocol server that enables AI assistants to interact with and manage Windows systems, providing capabilities for file system operations, process management, system information retrieval, registry operations, service management, network diagnostics, and performance monitoring.
      7
      16 npm
      6
      Apache 2.0