Yandex Browser MCP Server

MCP server for controlling Yandex Browser with advanced functionality.

README.md

Yandex Browser Tabs MCP Server v2.0

MCP (Model Context Protocol) сервер для управления вкладками Яндекс Браузера с расширенной функциональностью.

🚀 Новые возможности в версии 2.0

📊 Прямой доступ к консоли браузера

  • Перехват всех логов консоли (log, warn, error, info)
  • Сохранение истории консоли
  • Фильтрация логов по типу

🎯 Быстрый скроллинг

  • Скролл к элементу с плавной анимацией
  • Скролл в любом направлении на заданное расстояние
  • Поддержка smooth и instant режимов

📄 Получение информации без скриншотов

  • Извлечение текста со страницы или элемента
  • Получение HTML контента (inner/outer)
  • Чтение атрибутов элементов
  • Получение метаинформации страницы

🎮 Расширенное взаимодействие

  • Hover эффекты
  • Нажатие клавиш и комбинаций
  • Заполнение форм
  • Ожидание появления элементов

📋 Установка

# Клонируйте репозиторий
git clone <repository-url>
cd yandex-browser-mcp

# Установите зависимости
npm install

# Соберите проект
npm run build

🔧 Использование

1. Запустите Яндекс Браузер в режиме отладки

Используйте один из предоставленных батников:

start-yandex-debug.bat

Или вручную:

"C:\Users\%USERNAME%\AppData\Local\Yandex\YandexBrowser\Application\browser.exe" --remote-debugging-port=9222

2. Подключите MCP сервер к Claude Desktop

Добавьте в конфигурацию Claude Desktop:

{
  "mcpServers": {
    "yandex-browser": {
      "command": "node",
      "args": ["C:\\Users\\Professional\\Desktop\\yandex-browser-mcp\\build\\index.js"]
    }
  }
}

📚 Полный список функций

Базовые функции

connect_to_browser

Подключиться к уже открытому Яндекс Браузеру

connect_to_browser({ port?: number })
list_tabs

Получить список всех открытых вкладок

list_tabs({})
navigate

Перейти по URL в указанной вкладке

navigate({ 
  url: string, 
  tabIndex?: number, 
  waitForSelector?: string 
})

Взаимодействие с элементами

click

Кликнуть по элементу

click({ selector: string, tabIndex?: number })
type

Ввести текст в поле

type({ 
  selector: string, 
  text: string, 
  tabIndex?: number, 
  delay?: number 
})
hover

Навести курсор на элемент

hover({ selector: string, tabIndex?: number })
key_press

Нажать клавишу или комбинацию

key_press({ 
  key: string, 
  modifiers?: ['Control' | 'Shift' | 'Alt' | 'Meta'][], 
  tabIndex?: number 
})

Скроллинг

scroll

Прокрутить страницу или к элементу

scroll({ 
  tabIndex?: number,
  direction?: 'up' | 'down' | 'left' | 'right',
  distance?: number,
  selector?: string,
  smooth?: boolean
})

Получение информации

get_text

Получить текстовое содержимое

get_text({ selector?: string, tabIndex?: number })
get_html

Получить HTML содержимое

get_html({ 
  selector?: string, 
  outerHTML?: boolean, 
  tabIndex?: number 
})
get_attributes

Получить атрибуты элемента

get_attributes({ 
  selector: string, 
  attributes?: string[], 
  tabIndex?: number 
})
get_page_info

Получить информацию о странице

get_page_info({ tabIndex?: number })
// Возвращает: URL, title, description, viewport, metaTags
get_console_logs

Получить логи консоли браузера

get_console_logs({ 
  tabIndex?: number,
  type?: 'all' | 'log' | 'warn' | 'error' | 'info',
  limit?: number
})

Работа с формами

fill_form

Заполнить форму данными

fill_form({ 
  formSelector?: string,
  fields: { [selector: string]: any },
  tabIndex?: number
})

Утилиты

wait_for_element

Ждать появления элемента

wait_for_element({ 
  selector: string,
  tabIndex?: number,
  timeout?: number,
  visible?: boolean
})
screenshot

Сделать скриншот

screenshot({ 
  name: string,
  tabIndex?: number,
  fullPage?: boolean,
  selector?: string
})
evaluate

Выполнить JavaScript код

evaluate({ script: string, tabIndex?: number })
execute_test

Выполнить тест (выбрать ответы и отправить)

execute_test({ 
  tabIndex: number,
  testSelectors: string[],
  submitButtonSelector: string
})

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

Пример: Мониторинг консоли и извлечение данных

// Подключаемся к браузеру
connect_to_browser({})

// Переходим на страницу
navigate({ url: "https://example.com" })

// Получаем логи консоли
get_console_logs({ type: 'error' })

// Извлекаем текст
get_text({ selector: '.main-content' })

Tools 18

connect_to_browserConnect to an already open Yandex Browser instance.
list_tabsGet a list of all open tabs.
navigateNavigate to a URL in a specified tab.
clickClick on a specific element.
typeType text into a field.
hoverHover over an element.
key_pressPress a key or combination.
scrollScroll the page or to an element.
get_textGet text content from the page or an element.
get_htmlGet HTML content from the page or an element.
get_attributesGet attributes of a specific element.
get_page_infoGet page metadata including URL, title, and viewport.
get_console_logsRetrieve browser console logs.
fill_formFill a form with provided data.
wait_for_elementWait for an element to appear on the page.
screenshotCapture a screenshot of the page or element.
evaluateExecute custom JavaScript code in the browser.
execute_testPerform a test sequence by selecting options and submitting.

Try it

List all currently open tabs in my Yandex Browser.
Navigate to https://example.com and extract the main content text.
Check the console logs for any errors on the current page.
Fill out the login form on the current page with my credentials.
Take a full-page screenshot of the current tab and save it.

Frequently Asked Questions

What are the key features of Yandex Browser MCP?

Direct access to browser console logs with filtering capabilities.. Advanced element interaction including hover, form filling, and key presses.. Precise scrolling control with smooth animation support.. Comprehensive data extraction including text, HTML, and element attributes.. Custom JavaScript execution and automated test sequence support..

What can I use Yandex Browser MCP for?

Automating repetitive web form submissions and data entry tasks.. Monitoring web application performance by capturing console errors in real-time.. Scraping dynamic web content that requires interaction or scrolling.. Automated testing of web interfaces by simulating user clicks and keyboard input..

How do I install Yandex Browser MCP?

Install Yandex Browser MCP by running: git clone <repository-url> && cd yandex-browser-mcp && npm install && npm run build

What MCP clients work with Yandex Browser MCP?

Yandex Browser MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Yandex Browser MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare