Skip to main content
Glama
yadisk-mcp

yadisk-mcp

by Patr56

yadisk-mcp

CI PyPI Python

MCP-сервер для Яндекс Диска — управляй файлами, папками, публикацией и корзиной через Claude или любой MCP-совместимый клиент.

English version

Особенности

  • ⚡ Полностью асинхронный — все операции неблокирующие, параллельные запросы работают без задержек

  • 🚀 Фоновая загрузка больших файлов — отправь задачу и сразу получи job_id; прогресс и статус доступны в любой момент

  • 📊 Трекинг прогресса — процент выполнения, загружено байт, имя файла для каждой фоновой задачи

  • 🗂️ 22 инструмента — полное покрытие API Яндекс Диска: файлы, папки, поиск, публикация, корзина

Related MCP server: yandex-mail-mcp

Инструменты

Информация и поиск

Инструмент

Описание

disk_info

Квота, использованное/свободное место, данные пользователя

list_files

Список файлов в папке с сортировкой и пагинацией

list_recent_files

Последние загруженные файлы

search_files

Поиск по имени с фильтром по типу медиа

get_metadata

Метаданные файла или папки

Файловые операции

Инструмент

Описание

create_folder

Создать папку (включая промежуточные)

delete

Переместить в корзину или удалить насовсем

copy

Копировать файл/папку

move

Переместить файл/папку

rename

Переименовать файл/папку

Загрузка и скачивание

Инструмент

Описание

upload_local_file

Загрузить локальный файл на Диск (до ~100 МБ)

upload_local_file_background

Загрузить большой файл в фоне — возвращает job_id мгновенно

get_upload_status

Проверить статус фоновой загрузки (%, байты, имя файла)

list_upload_jobs

Список всех активных/завершённых загрузок

upload_from_url

Загрузить файл по URL

get_download_url

Получить прямую ссылку на скачивание

Публикация

Инструмент

Описание

publish

Опубликовать файл/папку и получить публичную ссылку

unpublish

Закрыть публичный доступ

get_public_resource

Информация о публичном ресурсе по ключу или ссылке

Корзина

Инструмент

Описание

list_trash

Список файлов в корзине

restore_from_trash

Восстановить файл из корзины

empty_trash

Очистить корзину

Получение токена

Шаг 1 — Создай OAuth-приложение на Яндексе

  1. Зайди на oauth.yandex.ru → Создать приложение → Для авторизации пользователей

  2. Введи любое название, загрузи иконку (обязательно)

  3. На шаге Платформы выбери Веб-сервисы, Callback URL:

    https://oauth.yandex.ru/verification_code
  4. На шаге Права в поле Дополнительные добавь по одному:

    • cloud_api:disk.read

    • cloud_api:disk.write

    • cloud_api:disk.app_folder

    • cloud_api:disk.info

  5. Завершил — получишь Client ID и Client Secret

Шаг 2 — Получи токен

Открой в браузере (замени <CLIENT_ID> на свой):

https://oauth.yandex.ru/authorize?response_type=code&client_id=<CLIENT_ID>

Авторизуй приложение, получи код и обменяй его на токен:

curl -X POST https://oauth.yandex.ru/token \
  -d "grant_type=authorization_code" \
  -d "code=<CODE>" \
  -d "client_id=<CLIENT_ID>" \
  -d "client_secret=<CLIENT_SECRET>"

Используй access_token из ответа как YANDEX_DISK_TOKEN. Токен действует 1 год.

Вспомогательный скрипт

python3 get_token.py

Установка

pip install yadisk-mcp

Или из исходников:

git clone https://github.com/Patr56/yadisk-mcp
cd yadisk-mcp
pip install -e .

Настройка

Для работы нужен OAuth-токен Яндекса — как его получить, смотри в разделе Получение токена.

Claude Code (CLI)

claude mcp add yadisk -e YANDEX_DISK_TOKEN=your_token_here -- yadisk-mcp

Или вручную в ~/.claude.json:

{
  "mcpServers": {
    "yadisk": {
      "command": "yadisk-mcp",
      "env": {
        "YANDEX_DISK_TOKEN": "your_token_here"
      }
    }
  }
}

Claude Desktop

В claude_desktop_config.json:

{
  "mcpServers": {
    "yadisk": {
      "command": "yadisk-mcp",
      "env": {
        "YANDEX_DISK_TOKEN": "your_token_here"
      }
    }
  }
}

OpenClaw / другой агент

{
  "mcp": {
    "servers": {
      "yadisk": {
        "command": "yadisk-mcp",
        "env": {
          "YANDEX_DISK_TOKEN": "your_token_here"
        }
      }
    }
  }
}

Режим только для чтения

Запусти сервер с флагом --read-only, чтобы запретить любые операции записи — полезно для безопасного просмотра диска или демонстраций.

Три способа включить (приоритет сверху вниз, явное важнее неявного):

# 1. Флаг командной строки
yadisk-mcp --read-only

# 2. Переменная окружения
YADISK_MCP_READ_ONLY=true yadisk-mcp
# 3. Программно (использование как библиотека)
from yadisk_mcp.server import configure, mcp
configure(read_only=True)
mcp.run()

В конфиге Claude Desktop:

{
  "mcpServers": {
    "yadisk": {
      "command": "yadisk-mcp",
      "args": ["--read-only"],
      "env": {
        "YANDEX_DISK_TOKEN": "your_token_here"
      }
    }
  }
}

Заблокированы: create_folder, delete, copy, move, rename, upload_local_file, upload_local_file_background, upload_from_url, get_upload_status, list_upload_jobs, publish, unpublish, restore_from_trash, empty_trash

Доступны: disk_info, list_files, list_recent_files, search_files, get_metadata, get_download_url, get_public_resource, list_trash

Безопасность

Ограничение загрузки файлов

По умолчанию upload_local_file и upload_local_file_background могут загружать любые локальные файлы. Чтобы ограничить доступ конкретными папками, задай переменную YADISK_MCP_UPLOAD_ALLOWED_DIRS:

# Разрешить загрузку только из /home/user/uploads и /tmp/exports
YADISK_MCP_UPLOAD_ALLOWED_DIRS=/home/user/uploads,/tmp/exports yadisk-mcp

Симлинки за пределы разрешённых папок автоматически блокируются.

Примеры использования

После настройки можно говорить Claude:

«Покажи что у меня на Яндекс Диске» «Создай папку /Бэкапы/2026-04» «Загрузи файл /home/user/video.mp4 на диск в папку /Видео» «Опубликуй /Документы/презентация.pdf и дай ссылку» «Загрузи большой файл в фоне и сообщи когда закончится» «Очисти корзину» «Найди все PDF-файлы»

Лицензия

MIT

Available Tools

22 tools
copyA

Copy a file or folder to a new location.

Args: src: Source path (e.g. "/Documents/file.txt"). dst: Destination path (e.g. "/Archive/file.txt"). overwrite: Overwrite destination if it exists.

Inputs: dst (required), src (required), overwrite.

create_folderA

Create a folder (including intermediate directories).

Args: path: Path of the folder to create (e.g. "/Documents/NewFolder").

Inputs: path (required).

deleteA

Delete a file or folder.

Args: path: Path to delete (e.g. "/Documents/old_file.txt"). permanently: If True, skip trash and delete permanently. Default False.

Inputs: path (required), permanently.

disk_infoA

Get Yandex Disk quota and usage information.

Inputs: no named parameters.

empty_trashA

Permanently delete all files in Trash.

Inputs: no named parameters.

get_download_urlA

Get a temporary direct download URL for a file.

Args: path: Path on Yandex Disk (e.g. "/Documents/report.pdf").

Inputs: path (required).

get_metadataB

Get metadata for a file or folder.

Args: path: Path on Yandex Disk (e.g. "/Documents/file.txt").

Inputs: path (required).

get_public_resourceA

Get information about a public resource by its public key or URL.

Args: public_key: Public key or public URL of the resource. path: Sub-path within a public folder (use "/" for root). limit: Max items to list if the resource is a folder.

Inputs: public_key (required), path, limit.

get_upload_statusB

Check the status of a background upload started with upload_local_file_background.

Args: job_id: The job ID returned by upload_local_file_background.

Inputs: job_id (required).

list_filesA

List files and folders at the given Yandex Disk path.

Args: path: Path on Yandex Disk (e.g. "/" or "/Documents"). limit: Max items to return (1–100). offset: Offset for pagination. sort: Sort field: name, created, modified, size. Prefix with "-" for descending.

Inputs: path, sort, limit, offset. Returns: result

list_recent_filesA

List recently uploaded files across the entire disk.

Args: limit: Max number of files to return (1–100).

Inputs: limit. Returns: result

list_trashA

List files in the Trash.

Args: limit: Max items to return (1–100). offset: Offset for pagination.

Inputs: limit, offset. Returns: result

list_upload_jobsA

List all background upload jobs and their statuses.

Inputs: no named parameters. Returns: result

moveB

Move a file or folder to a new location.

Args: src: Source path (e.g. "/Documents/file.txt"). dst: Destination path (e.g. "/Archive/file.txt"). overwrite: Overwrite destination if it exists.

Inputs: dst (required), src (required), overwrite.

publishA

Publish a file or folder and return its public URL.

Args: path: Path on Yandex Disk to publish (e.g. "/Documents/presentation.pdf").

Inputs: path (required).

renameA

Rename a file or folder (moves it within the same directory).

Args: path: Full path of the item (e.g. "/Documents/old_name.txt"). new_name: New name without path (e.g. "new_name.txt").

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

restore_from_trashA

Restore a file or folder from Trash.

Args: path: Path of the item in Trash (e.g. "/trash/old_file.txt"). destination: Optional new path to restore to. Uses original path if omitted. overwrite: Overwrite if destination already exists.

Inputs: path (required), overwrite, destination.

search_filesA

Search for files on Yandex Disk by name.

Args: query: Search query string. limit: Max results (1–100). media_type: Optional media type filter: audio, backup, book, compressed, data, development, disk_image, document, encoded, executable, flash, font, image, msi, text, unknown, video, web.

Inputs: query (required), limit, media_type. Returns: result

unpublishA

Revoke public access to a file or folder.

Args: path: Path on Yandex Disk (e.g. "/Documents/presentation.pdf").

Inputs: path (required).

upload_from_urlA

Upload a file to Yandex Disk by downloading it from a remote URL.

Args: url: Source URL to download the file from (must be http or https). path: Destination path on Yandex Disk (e.g. "/Downloads/file.zip"). overwrite: Overwrite if file already exists.

Inputs: url (required), path (required), overwrite.

upload_local_fileA

Upload a local file to Yandex Disk (blocking). Use for files under ~100 MB. For large files use upload_local_file_background to avoid timeout.

Args: local_path: Absolute path to the file on the local filesystem. disk_path: Destination path on Yandex Disk (e.g. "/Videos/video.mp4"). overwrite: Overwrite if file already exists on Yandex Disk.

Inputs: disk_path (required), local_path (required), overwrite.

upload_local_file_backgroundA

Start uploading a large local file to Yandex Disk in the background. Returns immediately with a job_id. Use get_upload_status(job_id) to check progress. Suitable for files of any size — no timeout issues.

Args: local_path: Absolute path to the file on the local filesystem. disk_path: Destination path on Yandex Disk (e.g. "/Videos/big_video.mp4"). overwrite: Overwrite if file already exists on Yandex Disk.

Inputs: disk_path (required), local_path (required), overwrite.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 22 tools

    Disambiguation5/5

    Each tool targets a distinct operation or resource: listing files vs recent vs search, upload local vs background vs URL, trash management vs deletion. The only near-overlap (upload_local_file vs upload_local_file_background) is explicitly distinguished by blocking behavior and file size, so no ambiguity remains.

    Naming Consistency4/5

    The majority of tools follow a verb_noun pattern (list_files, search_files, get_metadata, create_folder, upload_local_file). However, a few tools deviate: bare verbs (delete, copy, move, rename, publish, unpublish) and a noun phrase (disk_info). All names are lowercase snake_case, keeping the set readable and mostly predictable.

    Tool Count4/5

    With 22 tools, the server is on the heavier side, but the breadth of Yandex Disk functionality—file operations, uploads (local, background, URL), trash lifecycle, sharing, and disk info—justifies the count. The tools are neither redundant nor trivial, so the size feels appropriate rather than bloated.

    Completeness4/5

    The toolset covers the core file lifecycle (create, list, get, copy, move, rename, delete, trash), uploads from multiple sources, download URLs, publishing/unpublishing, and public resource access. Minor gaps exist, such as no direct file content download (only a URL) and no metadata update, but these are workable given the provided capabilities.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server for performing filesystem operations, enabling file management and manipulation through natural language.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server for Yandex Mail that enables reading, searching, sending, and managing emails via IMAP and SMTP.
      8
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server for Google Drive that enables listing, searching, uploading, downloading, and managing files and folders, as well as handling comments and permissions.
      171 npm
      7
      MIT