MCP-сервер и командная строка к API Яндекс Директа v5: 113 методов из машиночитаемой схемы, узкая поверхность, изменение выключено по умолчанию
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add api-v5 --env YANDEX_DIRECT_TOKEN='<YANDEX_DIRECT_TOKEN>' -- npx -y yandex-direct-api-mcp~/.codex/config.toml
[mcp_servers.api-v5]
command = "npx"
args = ["-y", "yandex-direct-api-mcp"]
env = { YANDEX_DIRECT_TOKEN = "<YANDEX_DIRECT_TOKEN>" }
# codex mcp add api-v5 --env YANDEX_DIRECT_TOKEN='<YANDEX_DIRECT_TOKEN>' -- npx -y yandex-direct-api-mcp~/.cursor/mcp.json
{
"mcpServers": {
"api-v5": {
"command": "npx",
"args": [
"-y",
"yandex-direct-api-mcp"
],
"env": {
"YANDEX_DIRECT_TOKEN": "<YANDEX_DIRECT_TOKEN>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"api-v5": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"yandex-direct-api-mcp"
],
"env": {
"YANDEX_DIRECT_TOKEN": "<YANDEX_DIRECT_TOKEN>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"api-v5": {
"command": "npx",
"args": [
"-y",
"yandex-direct-api-mcp"
],
"env": {
"YANDEX_DIRECT_TOKEN": "<YANDEX_DIRECT_TOKEN>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"api-v5": {
"command": "npx",
"args": [
"-y",
"yandex-direct-api-mcp"
],
"env": {
"YANDEX_DIRECT_TOKEN": "<YANDEX_DIRECT_TOKEN>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"api-v5": {
"command": "npx",
"args": [
"-y",
"yandex-direct-api-mcp"
],
"env": {
"YANDEX_DIRECT_TOKEN": "<YANDEX_DIRECT_TOKEN>"
}
}
}
}需要的环境变量
YANDEX_DIRECT_TOKEN
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。