Content
# Yandex Cloud MCP Server
Unofficial MCP server for interacting with Yandex Cloud API.
## Functionality:
```
📋 List of all buckets in your account
📁 View contents of a specific bucket
⬇️ Download files to a local folder
```
## Technical Details:
Uses official AWS SDK (compatible with Yandex Cloud)
Configured endpoint for Yandex Cloud (https://storage.yandexcloud.net)
Supports all basic operations via MCP protocol
## Security:
Access keys are stored in environment variables
Can configure access rights through service accounts
After creating and configuring this server, Claude can connect to your buckets in Yandex Cloud and help with data analysis, file management, and other tasks!
## Step 1: Create a Project
Execute the commands in the terminal:
```
mkdir yandex-cloud-mcp
cd yandex-cloud-mcp
npm init -y
```
## Step 2: Install Dependencies
Main dependencies
```
npm install @modelcontextprotocol/sdk @aws-sdk/client-s3 dotenv
Dev dependencies for TypeScript
npm install -D typescript @types/node ts-node nodemon
```
## Step 3: Create Folder Structure
```
mkdir src
```
## Step 4: Configuration Files
Create a file tsconfig.json in the project root:
```
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
```
Update package.json by adding scripts:
```
{
"scripts": {
"build": "tsc",
"start": "node dist/index.js",
"dev": "ts-node src/index.ts",
"watch": "nodemon --exec ts-node src/index.ts"
}
}
```
## Step 5: Environment Variables File
Create a file .env in the project root:
```
YANDEX_ACCESS_KEY_ID=your_yandex_access_key_id_here
YANDEX_SECRET_ACCESS_KEY=your_yandex_secret_access_key_here
```
⚠️ Leave placeholder values for now - we will fill them in after receiving the keys
## Step 6: Main Code
Create a file src/index.ts and copy the entire code from the artifact (also called index.ts) above (starting with #!/usr/bin/env node).
## Step 7: Obtaining Access Keys in Yandex Cloud
Go to the Yandex Cloud console: https://console.cloud.yandex.ru/
Log in to your account or create a new one if you don't have it
Create or select a folder in your cloud
Go to IAM:
In the left menu, find "Identity and Access Management" or "IAM"
Select "Service accounts"
Create a service account:
Click "Create service account"
Enter a name (e.g., "mcp-s3-access")
Assign the role storage.editor (for full access) or storage.viewer (read-only)
Click "Create"
Create a static access key:
Open the created service account
Go to the "Access keys" tab
Click "Create new key" → "Static access key"
Save the Access Key ID and Secret Access Key (they are only shown once!)
## Step 8: Update .env File
Open the .env file and replace the placeholder values with your keys:
```
YANDEX_ACCESS_KEY_ID=YCAJEyour_access_key_id_here
YANDEX_SECRET_ACCESS_KEY=YCyour_very_long_secret_key_here
```
## Step 9: Testing
Try running the server:
```
npm run build
npm start
```
If everything is set up correctly, you should see a message:
Yandex Cloud MCP server started
## Step 10: Connecting to Claude Desktop
1. Find the Claude Desktop configuration file
The configuration file is located in different places depending on the OS:
```
Windows:
%APPDATA%\Claude\claude_desktop_config.json
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Linux:
~/.config/Claude/claude_desktop_config.json
```
3. Create or edit the configuration
If the file doesn't exist, create it. If it exists, add your server.
New configuration file:
```
{
"mcpServers": {
"yandex-cloud": {
"command": "node",
"args": ["/full/path/to/your/project/yandex-cloud-mcp/dist/index.js"],
"env": {
"YANDEX_ACCESS_KEY_ID": "your_access_key_id",
"YANDEX_SECRET_ACCESS_KEY": "your_secret_access_key"
}
}
}
}
```
If the file already exists, add to the mcpServers section:
```
{
"mcpServers": {
"existing-servers": { ... },
"yandex-cloud": {
"command": "node",
"args": ["/full/path/to/your/project/yandex-cloud-mcp/dist/index.js"],
"env": {
"YANDEX_ACCESS_KEY_ID": "your_access_key_id",
"YANDEX_SECRET_ACCESS_KEY": "your_secret_access_key"
}
}
}
}
```
5. Find the full path to the project
In the terminal, being in the yandex-cloud-mcp folder:
```
Windows:
cmd
echo %cd%\dist\index.js
macOS/Linux:
bash
echo "$(pwd)/dist/index.js"
```
7. Restart Claude Desktop
Completely close and reopen the Claude Desktop application.
8. Check the connection
After restarting, try writing in the chat:
Can you show my buckets in Yandex Cloud?
If everything is set up correctly, Claude can use the tools to work with your Yandex Cloud!
Important: Replace /full/path/to/your/project/ with the actual path to your project folder.
## Explanations by Steps:
## Step 4:
Creating tsconfig.json
Open a text editor (e.g., VS Code, Notepad++, or any other)
Create a new file in the yandex-cloud-mcp root folder (where package.json is located)
Name the file tsconfig.json (important: exactly this name, with the .json extension)
Copy and paste this code:
```
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
```
Save the file
Updating package.json
Open the package.json file (it already exists after npm init -y)
Find the "scripts" section (it might look like this):
```
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
}
```
Replace it with:
```
"scripts": {
"build": "tsc",
"start": "node dist/index.js",
"dev": "ts-node src/index.ts",
"watch": "nodemon --exec ts-node src/index.ts",
"test": "echo \"Error: no test specified\" && exit 1"
}
```
Save the file
Alternative way (via terminal)
If you prefer the command line:
Creating tsconfig.json
```
cat > tsconfig.json << 'EOF'
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
EOF
```
Verification
After execution, you should have the following structure:
```
yandex-cloud-mcp/
├── node_modules/
├── src/
├── package.json
├── package-lock.json
└── tsconfig.json
```