timeweb-s3-mcp-ai-cli
Read-only S3 inspection and recovery support for Timeweb Cloud buckets, objects, versions, multipart uploads, usage, and presigned downloads.
List visible buckets and scoped object prefixes with pagination.
Read object metadata, inline object content up to 262144 bytes, previews up to 65536 bytes, and object tags.
Inspect bucket configuration including location, versioning, CORS, policy, and Object Lock status.
List object versions/delete markers and unfinished multipart uploads/parts.
Run bounded analytics for largest objects and prefix usage, with partial-result continuation handling.
Generate presigned GET URLs for downloading larger objects.
Find stale unfinished uploads older than a configurable threshold.
This schema exposes only read tools; no write, delete, or admin operations are available.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@timeweb-s3-mcp-ai-cli list the objects in my backups bucket"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Timeweb Cloud S3 MCP Server & AI CLI
MCP-сервер и CLI для S3 Timeweb Cloud (Таймвеб): просмотр объектов, проверка объёма бэкапов и скачивание архивов через Claude Code, Cursor и Codex. Бинарь timeweb-s3 подключается к S3 API отдельно от выбора тарифа бакета в панели.
English guide · Каталог S3 MCP-серверов
English
A Go MCP server, CLI and agent skill for Timeweb Cloud S3 Object Storage. Connect Claude Code, Cursor and Codex to scoped object storage for inspection and backup recovery. Bucket plans are chosen in the console; PUT Object Lock config is disabled. See the full English guide.
Related MCP server: MinIO MCP Server
Быстрый старт
Для cold/premium создайте бакет в панели; mb использует класс по умолчанию. Классы standard/hot/cold в профиле — тарифный каталог, не заголовок StorageClass объекта. Цена 0 означает неизвестную ставку за ГБ. PUT конфигурации Object Lock выключен до подтверждения; блокировки облака описаны в ресерче.
Возьми бинарь своей платформы из Releases (v0.1.1 опубликован; есть в MCP Registry и Smithery) либо собери с Go 1.27.2:
bash scripts/go.sh go build -o timeweb-s3 ./cmd/timeweb-s3
./timeweb-s3 version
./timeweb-s3 auth set
./timeweb-s3 auth status
./timeweb-s3 ls --jsonauth set спрашивает key ID и secret без эха; без TTY читает две строки stdin. Не передавай секрет в argv. Файл ~/.config/timeweb-s3/credentials создаётся атомарно с 0600; более широкие права отклоняются.
Приоритет: флаги > env > файл. Переменные: TIMEWEB_S3_ACCESS_KEY_ID, TIMEWEB_S3_SECRET_ACCESS_KEY, TIMEWEB_S3_POOL (ru-1), TIMEWEB_S3_ENDPOINT. HTTP требует TIMEWEB_S3_ALLOW_INSECURE=1.
Образ: ghcr.io/stufently/timeweb-s3-mcp-ai-cli:0.1.1; локальная сборка: docker build -t timeweb-s3 . Образ запускает MCP от uid 65532, содержит CA-сертификаты. Передай креды через приватное окружение/файл.
Возможности
Потоковые object CRUD, copy, multipart и presigned URL в пределах профиля.
Версии, теги, CORS, политика и Object Lock configuration регистрируются при наличии поддержки.
Ограниченные сканы, диагностика, JSON, установка MCP и встроенного skill.
Подключение к Claude Code, Cursor, Codex
Кнопка ставит MCP из Docker-образа ghcr.io/stufently/timeweb-s3-mcp-ai-cli:0.1.1 в режиме только чтения. Ключи в конфиг не пишутся: Cursor подставляет ${env:…} из окружения, поэтому задай TIMEWEB_S3_ACCESS_KEY_ID и TIMEWEB_S3_SECRET_ACCESS_KEY там, откуда запускается Cursor; TIMEWEB_S3_POOL — если бакет не в пуле по умолчанию (пустое значение = пул по умолчанию). Тот же блок — для Windsurf (mcp_config.json) и вручную для ~/.cursor/mcp.json:
{
"mcpServers": {
"timeweb-s3": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"TIMEWEB_S3_ACCESS_KEY_ID",
"-e",
"TIMEWEB_S3_SECRET_ACCESS_KEY",
"-e",
"TIMEWEB_S3_POOL",
"ghcr.io/stufently/timeweb-s3-mcp-ai-cli:0.1.1"
],
"env": {
"TIMEWEB_S3_ACCESS_KEY_ID": "${env:TIMEWEB_S3_ACCESS_KEY_ID}",
"TIMEWEB_S3_SECRET_ACCESS_KEY": "${env:TIMEWEB_S3_SECRET_ACCESS_KEY}",
"TIMEWEB_S3_POOL": "${env:TIMEWEB_S3_POOL}"
}
}
}
}timeweb-s3 mcp install --client cursor --dry-run
timeweb-s3 mcp install --client cursor
timeweb-s3 mcp install --client claude-desktop
timeweb-s3 mcp install --client codex
timeweb-s3 mcp install --client claude-code --scope project
timeweb-s3 mcp install --client claude-code --scope userПоследняя команда только печатает claude mcp add. Путь бинаря абсолютный; ключи в конфиг не пишутся. Cursor: ~/.cursor/mcp.json, Claude Code project: ./.mcp.json; Desktop — каталог конфигурации своей ОС. JSON сохраняет чужие ключи, .bak и идемпотентность.
Codex: ~/.codex/config.toml. Существующая таблица требует --force; заменяется только блок между # >>> timeweb-s3 (managed) / # <<< timeweb-s3 (managed). Таблица без маркеров не заменяется даже с --force; остальные байты TOML целы.
Уровни включаются независимо: timeweb-s3 mcp --allow-write --allow-delete --allow-admin либо TIMEWEB_S3_ALLOW=write,delete,admin. Флаги доступны и в mcp install. FILE_ROOT включается через TIMEWEB_S3_FILE_ROOT.
Инструменты MCP
Level | Tools |
read | s3_list_buckets, s3_list_objects, s3_head_object, s3_get_object, s3_preview_object, s3_presign_get, s3_list_object_versions, s3_list_multipart_uploads, s3_list_parts, s3_get_bucket_config, s3_largest_objects, s3_prefix_usage, s3_unfinished_uploads, s3_get_object_tagging |
read + FILE_ROOT | s3_download_file |
write | s3_put_object, s3_create_folder, s3_copy_object, s3_presign_put, s3_multipart_create, s3_multipart_presign_part, s3_multipart_complete, s3_put_object_tagging |
write + FILE_ROOT | s3_upload_file |
delete | s3_delete_object, s3_delete_objects, s3_multipart_abort |
admin | s3_create_bucket, s3_put_bucket_versioning, s3_put_bucket_cors, s3_put_bucket_policy, s3_delete_bucket_policy |
admin + delete | s3_delete_bucket |
Ресурсы: timeweb-s3://config, timeweb-s3://capabilities, timeweb-s3://pools. Неподдерживаемые возможности исключают инструменты.
Списки — до 1000 элементов с continuation_token; версии/multipart имеют второй маркер. Inline get/put — 262144 байт, preview — 65536; большие файлы идут через presigned URL или FILE_ROOT. Ответ содержит structuredContent и JSON-текст; текст свыше 256 КиБ заменяется краткой сводкой. Ошибки: code/message/retryable; 429/503 SDK повторяет адаптивно.
Аналитика сканирует максимум max_scan (по умолчанию 10000); partial/token отмечают неполный результат. Prefix usage выдаёт страницы агрегатов через next_result_offset. Это не биллинг.
Сценарий: Восстановление архивов и учёт объёма префикса
Оцените объём существующего префикса и восстановите архив Таймвеб в новый локальный файл. du ограничивает число просматриваемых объектов; результат с partial не является полным объёмом бакета. Продолжение по токену доступно через MCP-инструмент s3_prefix_usage:
timeweb-s3 du backups/daily/ --max-scan 10000 --json
timeweb-s3 stat backups/daily/archive.tar
timeweb-s3 cp s3://backups/daily/archive.tar ./restored-timeweb.tarПримеры используют существующий бакет backups и объект daily/archive.tar; замените их своими значениями. Профиль и API облака ещё требуют живой проверки.
CLI
timeweb-s3 mb backups
timeweb-s3 cp ./archive.tar s3://backups/daily/archive.tar --part-size 5242880 --overwrite --yes
timeweb-s3 ls backups/daily/ --max-keys 100 --json
timeweb-s3 stat backups/daily/archive.tar
timeweb-s3 cp s3://backups/daily/archive.tar ./restored.tar
timeweb-s3 cp ./directory s3://backups/tree/ --recursive --overwrite --yes
timeweb-s3 cp s3://backups/tree/ ./restored-directory --recursive
timeweb-s3 cp s3://backups/daily/archive.tar s3://backups/copy.tar --overwrite --yes
timeweb-s3 cat backups/daily/notes.txt
timeweb-s3 versions backups/daily/ --json
timeweb-s3 du backups/daily/ --max-scan 10000 --json
timeweb-s3 presign backups/daily/archive.tar --expires 3600
timeweb-s3 rm backups/copy.tar --yes
timeweb-s3 rb empty-bucket --yes
timeweb-s3 doctor --json
timeweb-s3 compat --markdowncp принимает обычные локальные пути и S3 URI s3://bucket/key либо timeweb-s3://bucket/key. Большие загрузки используют manager/multipart, --recursive копирует каталоги/префиксы. Перезапись требует --overwrite и подтверждения; выгрузка атомарна. rm/rb/mv без --yes на не-TTY дают код 2; на TTY спрашивают. --json общий, ошибки — stderr и ненулевой код.
doctor проверяет источник/права кредов, DNS/TLS, часы по Date и ListBuckets: >5 минут — предупреждение, >15 — ошибка.
Skill для AI-агентов
timeweb-s3 skill install
timeweb-s3 skill install --target ./agent-skills/timeweb-s3По умолчанию ~/.claude/skills/timeweb-s3. Идемпотентно устанавливает SKILL.md и шесть references: backup/restore, share, least privilege, cost hygiene, migration, incident response. Триггеры: «timeweb s3», «бакет Timeweb Cloud», «загрузи в s3», «presigned», «бэкап в s3».
Безопасность
Если conditional_writes:false, запись без перезаписи отказывает до S3-запросов: HEAD не даёт атомарной защиты. Для согласованной записи используй --overwrite --yes в CLI либо overwrite:true, confirm:true в MCP, сохраняя политику подтверждения. Если conditional_delete:false, mv и s3_move_object отключены.
MCP по умолчанию регистрирует только read; неподдерживаемые возможности и отсутствующие уровни исключают инструмент.
TIMEWEB_S3_DESTRUCTIVE_POLICY: confirm использует elicitation при поддержке клиента, иначе нужен confirm:true после согласия человека; elicit требует elicitation и не допускает обхода confirm:true; block всегда запрещает, allow выполняет без гейта. Отказ предшествует любым S3-запросам. Гейт покрывает удаления, move, presigned PUT, политику/Object Lock, suspension versioning и перезаписи.
При conditional_writes:true операции put/copy/move/multipart complete/upload file используют overwrite:false, HEAD цели и If-None-Match: *; при false запись по умолчанию отказывает. overwrite:true требует тот же гейт.
Скоуп: TIMEWEB_S3_ALLOWED_BUCKETS=backups и TIMEWEB_S3_ALLOWED_PREFIXES=backups/daily/. Префикс учитывает границу сегмента; daily-evil не подходит. Сегменты '..' отклоняются. Частичный скоуп запрещает целый бакет и широкие списки даже при наличии его в ALLOWED_BUCKETS. Copy/move проверяет источник и цель.
Файловые MCP-инструменты используют os.Root: только относительные пути внутри FILE_ROOT; '..', абсолютные пути и симлинки наружу отклоняются. На каждый вызов одна JSON-строка в stderr; TIMEWEB_S3_AUDIT_FILE дополнительно пишет в 0600. Секреты и X-Amz-Signature/Credential/Security-Token редактируются в логах/ошибках. Полная подписанная ссылка — только результат операции. Ограничивай также права самого S3-ключа.
s3_download_file по умолчанию публикует скачанный файл без замены существующего, в том числе созданного во время скачивания. Для замены передай overwrite:true: применяется разрушительная политика с подтверждением через форму либо confirm:true после согласия человека.
Пулы и классы хранения Timeweb Cloud
Пулы, эндпоинты и классы — в таблице совместимости; каждый факт, цены и ошибки с первоисточниками — в ресерче. Пул по умолчанию: ru-1; регион SigV4 равен выбранному пулу. В профиле verified:false: проверка на versitygw не подтверждает API облака. Неподтверждённые сведения помечены [предположение]; цены в профиле не являются калькулятором биллинга.
Lifecycle, ACL, bucket tagging и object retention могут поддерживаться облаком, но эта версия не предоставляет инструментов для их настройки; данные профиля описывают совместимость S3 API.
FAQ
Как подключить S3 Таймвеб к Cursor? Сохраните ключи командой timeweb-s3 auth set, посмотрите mcp install --client cursor --dry-run, затем выполните установку без --dry-run. Файл клиента не содержит S3-секретов.
Можно ли выбрать холодный тариф Timeweb через StorageClass? В этом проекте standard/hot/cold описывают каталог тарифов бакета, а не значения заголовка X-Amz-Storage-Class. Выбор тарифа делайте через панель; подробности — в ресерче Timeweb.
Почему нет инструмента настройки Object Lock в Timeweb? PUT Object Lock configuration выключен в профиле до подтверждения. Возможность сервиса и зарегистрированный инструмент проекта — разные вещи; смотрите compat и статус живой проверки.
Что такое MCP-сервер? Программа предоставляет агентам инструменты и ресурсы через Model Context Protocol; здесь stdio.
Как подключить MCP-сервер к Claude Code? Сохрани ключи auth set, затем используй project install либо напечатанную user-команду.
Безопасно ли давать агенту доступ к S3? Ограничь ключи, скоуп и уровни; сохрани confirm/block и одобряй разрушительные эффекты осознанно.
Чем это отличается от aws-cli и rclone? Бинарь объединяет MCP, гейт, аудит, аналитику, skill и CLI; aws-cli/rclone остаются самостоятельными средствами передачи/автоматизации.
Какие возможности поддерживаются? См. capabilities и compat. Инструменты регистрируются по профилю; lifecycle, ACL, bucket tagging и object retention эта версия не настраивает.
Другие провайдеры
Общий каталог: MCP-серверы и CLI для российских S3.
Провайдер | Репозиторий | Сценарий |
Selectel | Выбор пула и восстановление резервных копий | |
Yandex Cloud | Инвентаризация объектов и проверка версий бэкапов | |
VK Cloud | Проверка Hotbox/Icebox и доступ к нужному региону | |
Cloud.ru | Диагностика доступа к Evolution Object Storage | |
Timeweb Cloud | Восстановление архивов и учёт объёма префикса | |
MWS | Проверка HMAC-доступа и короткие ссылки на архивы | |
Beget | Просмотр и восстановление файлов из готового бакета | |
Shared Go kit | Общие MCP, CLI, защиты и CI |
Лицензия
MIT. Проверенные факты и предположения.
Проверки в Docker: bash scripts/go.sh go test -race ./..., bash scripts/conformance.sh, bash scripts/mcp_smoke.sh, bash scripts/mutation_gate.sh, bash scripts/check_docs.sh. Conformance использует versitygw v1.8.0 и тестовые ключи.
Общие MCP/CLI, защиты и проверки поставляет s3-mcp-ai-cli-kit v0.1.2; в этом репозитории остаются встроенный профиль, тонкий main и документы Timeweb Cloud.
Available Tools
14 toolss3_get_bucket_configA
Read a bucket's configuration in one call: location, versioning status, CORS rules, bucket policy JSON and Object Lock configuration; read-only. Use it before changing any of them with the s3_put_bucket_* tools. Each section holds its value (versioning status is empty when versioning was never enabled), {"status":"absent"} when nothing is configured, or {"status":"unsupported"} when the provider lacks the feature. Needs whole-bucket scope: fails with scope_denied when only some prefixes of the bucket are allowed.
Inputs: bucket (required).
s3_get_objectA
Return a small object's whole body inline as UTF-8 text or base64; read-only. Use it for objects up to 262144 bytes (256 KiB); to look at the start of a larger file use s3_preview_object, to save it to disk use s3_download_file, and to hand it over use s3_presign_get. Returns key, bytes, data, encoding and content_type. Fails instead of truncating when the object exceeds max_bytes, and fails on non-UTF-8 content unless encoding is base64.
Inputs: key (required), bucket (required), encoding, max_bytes, +1 more.
s3_get_object_taggingA
Read the tag set of one object or of a specific version; read-only. Use it before s3_put_object_tagging, which replaces the whole set. Returns tags[] as Key/Value pairs; an object without tags returns an empty list.
Inputs: key (required), bucket (required), version_id.
s3_head_objectA
Read one object's metadata without downloading its body; read-only. Use it to check existence, size or content type before s3_get_object, s3_download_file or s3_presign_get. Returns key, size (bytes), etag, content_type, last_modified, version_id and user metadata. A missing key fails with a not-found error (NotFound or http_404).
Inputs: key (required), bucket (required), version_id.
s3_largest_objectsA
Find the largest objects under a prefix by scanning up to max_scan keys (default 10000); read-only. Use it to locate what consumes space; use s3_prefix_usage for totals per sub-prefix and s3_list_objects for plain browsing. Returns objects[] sorted by size descending (at most limit, default 10), scanned, partial and continuation_token. partial:true means the scan stopped early and the ranking covers only scanned keys; pass continuation_token to rank the next batch.
Inputs: bucket (required), limit, prefix, max_scan, +1 more.
s3_list_bucketsA
List the buckets these credentials can see, filtered by the configured bucket scope; read-only, up to 1000 per page. Use it to discover bucket names; to list keys inside a bucket use s3_list_objects. Returns buckets[] (name, created_at) and continuation_token, which is empty on the last page. Buckets outside the allowed scope are omitted rather than reported as errors.
Inputs: max_keys, continuation_token.
s3_list_multipart_uploadsA
List in-progress multipart uploads (started, not yet completed or aborted) in a bucket; read-only, one page of up to 1000. Use it for a raw page of uploads; use s3_unfinished_uploads to find uploads older than N hours across many pages, and s3_list_parts for the parts of one upload. Returns uploads[] (Key, UploadId, Initiated and more), truncated, continuation_token and upload_id_marker; send them back as continuation_token and upload_id for the next page.
Inputs: bucket (required), prefix, max_keys, upload_id, +1 more.
s3_list_objectsA
List one page of current object keys under a prefix in a bucket; read-only. Use it to browse objects; use s3_list_object_versions for old versions and delete markers, and s3_largest_objects or s3_prefix_usage for size analysis across many pages. Returns objects[] (key, size in bytes, etag, last_modified, storage_class), truncated, and continuation_token for the next page. Fails with scope_denied outside the configured bucket/prefix scope.
Inputs: bucket (required), prefix, max_keys, continuation_token.
s3_list_object_versionsA
List object versions and delete markers under a prefix; read-only, one page of up to 1000 entries. Use it to find a version_id to inspect or restore with s3_head_object, s3_get_object or s3_download_file; use s3_list_objects when only current objects matter. Returns versions[], delete_markers[], truncated, continuation_token and version_marker; send both markers back together for the next page.
Inputs: bucket (required), prefix, max_keys, version_marker, +1 more.
s3_list_partsA
List the parts already uploaded for one multipart upload; read-only. Use it before s3_multipart_complete to collect part numbers and ETags, or to check upload progress. Returns parts[] (PartNumber, ETag, Size, LastModified), truncated and continuation_token (a part-number marker) for the next page. An unknown upload_id fails with NoSuchUpload.
Inputs: key (required), bucket (required), upload_id (required), max_keys, +1 more.
s3_prefix_usageA
Sum bytes and object counts per first-level sub-prefix under prefix, scanning up to max_scan keys (default 10000); read-only. Use it to see which folders take space; use s3_largest_objects for individual files. Returns prefixes[] (prefix, bytes, count; objects directly under prefix are grouped under prefix itself), scanned, partial, continuation_token and next_result_offset when more than 1000 rows exist. partial:true means totals cover only the scanned keys; this is an estimate, not billing data.
Inputs: bucket (required), prefix, max_scan, result_offset, +1 more.
s3_presign_getA
Create a time-limited signed HTTPS GET URL for one object; read-only, signs locally and does not check that the key exists. Use it to hand a large object to a human or another program instead of reading bytes through s3_get_object. Returns url, method, headers and expires_seconds (default 3600). Anyone holding the URL can download the object until it expires, so share it only with the intended recipient.
Inputs: key (required), bucket (required), version_id, expires_seconds.
s3_preview_objectA
Read only the first bytes of an object (default and maximum 65536) with a ranged GET; read-only. Use it to inspect the format or header of a file of any size; use s3_get_object when you need the full body of a small object. Returns key, bytes, data, encoding (base64 is chosen automatically for binary data when encoding is omitted), content_type, detected_type (sniffed MIME type) and, for .csv keys or CSV content types, csv_header.
Inputs: key (required), bucket (required), encoding, max_bytes, +1 more.
s3_unfinished_uploadsA
Find multipart uploads started more than older_than_hours ago (default 24), scanning up to max_scan uploads (default 10000); read-only. Use it to spot abandoned uploads that still occupy storage, then remove them with s3_multipart_abort; use s3_list_multipart_uploads for a raw page regardless of age. Returns uploads[] (key, upload_id, initiated; at most 1000), scanned, partial, continuation_token and upload_id_marker; when partial is true send both markers back to continue.
Inputs: bucket (required), prefix, max_scan, upload_id, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Boundaries are unusually well drawn: get_object vs preview_object vs head_object vs presign_get are separated by size/body/metadata/transfer intent, and list_objects vs list_object_versions vs largest_objects vs prefix_usage carry explicit routing hints. The only residual overlap is the cluster of four object-listing/scanning tools, which an agent could still conflate at a glance, but each description names when to prefer a sibling.
All 14 tools share the s3_ prefix and snake_case, with clear verb_noun forms (s3_get_object, s3_list_parts, s3_presign_get, s3_head_object). A few names drop the verb entirely (s3_largest_objects, s3_prefix_usage, s3_unfinished_uploads, s3_get_bucket_config), which is a minor deviation rather than a broken convention.
14 tools is a comfortable size for an S3 inspection surface and each one covers a genuinely different query shape (metadata, tagging, versions, parts, usage, presigning). The count is slightly under-scoped relative to what the descriptions promise, since the write/cleanup half of the lifecycle is absent.
The read surface is genuinely thorough (bucket config, versions, parts, usage, preview, presign), but there are hard dead ends: descriptions tell the agent to follow up with s3_put_bucket_*, s3_put_object_tagging, s3_multipart_complete, s3_multipart_abort, and s3_download_file, none of which exist in this tool set. Agents following the documented workflows will attempt calls that cannot be made, turning 'read then fix' flows into guaranteed failures.
Maintenance
Related MCP Connectors
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
MCP-first toolbox for agents: KV storage, auth, queue, and utility tools. Free in early access.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables AI models to interact with Akave's S3-compatible storage by providing tools for managing storage buckets and objects through standardized Model Context Protocol (MCP).1334 npm3-
- FlicenseAqualityDmaintenanceProvides tools for interacting with MinIO and S3-compatible object storage through MCP clients like Claude. It enables comprehensive bucket and object management, including listing, creating, uploading, and generating presigned URLs.132-
- AlicenseAqualityDmaintenanceEnables browsing S3 buckets and objects, and generating secure presigned URLs for downloads and uploads, through natural language commands in MCP clients like Claude Desktop.34MIT
- AlicenseNot gradedqualityBmaintenanceProvides MCP tools for AWS S3 and S3-compatible storage, enabling file upload, download, listing, deletion, and temporary remote file staging via natural language.BSD 3-Clause