| English | Русский |
MCP server
sberdisk-mcp is a Model Context Protocol server that lets AI agents — Claude Desktop, Claude Code, Cursor and other MCP clients — work with your SberDisk. It runs on your machine and talks to the client over stdio. Your session cookie never leaves the machine.
Unofficial. Not affiliated with SberBank or the SberDisk operator. The web API is undocumented and can change without notice.
Install
brew install --cask sergio-zerg/tap/sberdisk # macOS; installs sberdisk-mcp with the CLI
Or download the sberdisk_… archive for your system from the latest release, or build it:
go install github.com/sergio-zerg/sberdisk-bridge/cmd/sberdisk-mcp@latest
Or run it in Docker (Linux amd64/arm64 image, stdio; the cookie comes from the environment — -cookie-keyring does not work in a container):
{
"mcpServers": {
"sberdisk": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "SBERDISK_COOKIE", "ghcr.io/sergio-zerg/sberdisk-mcp"],
"env": { "SBERDISK_COOKIE": "<Cookie header>" }
}
}
}
Authentication
Copy the Cookie request header from a logged-in browser session (DevTools → Network → any request to apigw.sberdisk.ru → Request Headers → Cookie) and either:
- put it in the
SBERDISK_COOKIEenvironment variable, or - save it to a file readable only by you (
chmod 600) and pass-cookie-file <path>— this keeps the cookie out of the client’s config file; - or sign in with the tray app
sberdisk-trayand pass-cookie-keyring: the server takes the session the app saved in the system secret store (Keychain on macOS; on first use macOS asks to allow access — choose “Always Allow”). Nothing is written to a file.
When the session expires, tools return an error asking to refresh the cookie.
Tools
| Tool | What it does | Enabled |
|---|---|---|
about |
storage usage in bytes | always |
list |
files and folders in a folder | always |
stat |
details of one item | always |
read |
a UTF-8 text file; long files are truncated to -max-read-bytes |
always |
upload |
create a new file from text or base64 content; never overwrites | unless -read-only |
mkdir |
create a folder | unless -read-only |
trash |
move an item to the trash (restorable in the web app) | only with -allow-destructive |
rename |
rename an item in place; SberDisk keeps a file’s extension, so a new name with another extension is refused | only with -allow-destructive |
Paths are slash-separated. Relative paths resolve against -root; nothing outside -root is reachable, and the root itself cannot be trashed or renamed. Read tools carry the MCP readOnlyHint, trash and rename carry destructiveHint.
Not yet: search, share links, move and copy — their request formats are not verified (see API notes).
Flags
| Flag | Default | Meaning |
|---|---|---|
-root |
/ |
only allow access to this folder and below |
-cookie-file |
— | read the cookie from a file when SBERDISK_COOKIE is empty |
-cookie-keyring |
off | if no cookie is given otherwise, use the session sberdisk-tray saved in the system secret store; it is read once at start, so restart the client after signing in again |
-read-only |
off | offer only about, list, stat, read |
-allow-destructive |
off | also offer trash and rename |
-max-read-bytes |
1048576 | largest text returned by read |
-max-upload-bytes |
10485760 | largest file accepted by upload |
-version |
— | print the version and exit |
Claude Desktop
Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/):
{
"mcpServers": {
"sberdisk": {
"command": "/Users/you/go/bin/sberdisk-mcp",
"args": ["-cookie-file", "/Users/you/.config/sberdisk/cookie", "-root", "/AI"]
}
}
}
With the tray app, "args": ["-cookie-keyring", "-root", "/AI"] instead.
Restart Claude Desktop. Start with a narrow -root and without -allow-destructive.
Claude Code
claude mcp add sberdisk -- sberdisk-mcp -cookie-file ~/.config/sberdisk/cookie -root /AI
Being gentle
The server uses the core client’s rate limit (4 requests per second). Ask the agent to work folder by folder; listing a whole disk is slow on purpose.