Skip to main content
Glama
MCP PC Control Server

MCP PC Control Server

MCP PC Control Server

Мощный сервер протокола Model Context Protocol (MCP), предоставляющий комплексные возможности управления ПК, включая файловые операции, управление директориями, выполнение команд, проверку системы и управление процессами. Разработан для предоставления ИИ-ассистентам (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 - Получение информации об ОС, процессоре, памяти, времени работы, имени хоста и сетевых интерфейсах

  • 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 на фактический абсолютный путь к директории этого проекта.

Настройка с другими ИИ-клиентами

Любой MCP-совместимый клиент (Claude, Cursor, Windsurf, Continue и др.) может подключиться к этому серверу, используя тот же подход с транспортом stdio. Укажите клиенту путь к собранному build/index.js с помощью node.

Пример с 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

Режим отслеживания (Watch Mode)

npm run watch

Структура проекта

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

Лицензия

MIT

Участие в разработке

Приветствуются любые вклады! Пожалуйста, не стесняйтесь отправлять issues или pull requests.

Устранение неполадок

Сервер не отображается в 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