selenium-mcp: Instructions file for Codex

AGENTS.md

selenium-mcp AGENTS.md is an instructions file for Codex, OpenCode from gaforov/selenium-mcp. It costs 1,571 tokens per session, scanned A, original, MIT.

Repository instructions for an MCP server that exposes Selenium WebDriver to AI agents. Selenium is a tool for controlling web browsers; the instructions cover the TypeScript project structure, build checks, unit tests, and end-to-end tests in headless Chrome.

In plain words
What is it for?
Use them to install dependencies, type-check and build the server, run unit tests, run browser tests, and find the code for browser sessions and tools.
Why use it?
They tell the coding agent how this browser-automation project is organised and which checks to run. They also distinguish tests that need Chrome from those that do not.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is gaforov/selenium-mcp's own configuration. It tells Codex and OpenCode how to work on selenium-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything selenium-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to gaforov/selenium-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gaforov/selenium-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/gaforov/selenium-mcp

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for selenium-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/gaforov/selenium-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/gaforov/selenium-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/gaforov/selenium-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/gaforov/selenium-mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for selenium-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/gaforov/selenium-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/gaforov/selenium-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,571 This file is loaded in full into every session.
When invoked 1,571 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01571 $0.01571
Opus 5.5 $0.00628 $0.00628
Sonnet 5.5 $0.00314 $0.00314
Haiku 4.5 $0.00157 $0.00157

Measured 1mo ago against content hash 292be40a2a5d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

selenium-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Guidance for AI coding assistants (and humans) changing this repository. For end-user docs, see README.md and docs/.

What this is

A Model Context Protocol server that exposes Selenium WebDriver to AI agents over stdio. TypeScript (strict, ESM), Node.js 20+, @modelcontextprotocol/sdk (McpServer.registerTool), and zod v4 (import from "zod/v4").

Commands

npm install
npm run typecheck   # tsc --noEmit
npm run build       # compile to dist/
npm test            # build + unit tests (test/*.test.mjs), no browser needed
npm run test:e2e    # build + end-to-end tests in headless Chrome (Chrome must be installed)
npm run dev         # run the server from source with tsx

Tests import from dist/, so they always build first. Run all three checks before finishing: npm run typecheck && npm test && npm run test:e2e.

File map

Path What lives there
src/server.ts Entry point: CLI flags (--help, --version, --list-tools), stdio transport, shutdown. The version comes from package.json at runtime.
src/driver/driverManager.ts Browser sessions (single and multi-session) and which one is active.
src/tools/index.ts Registers every tool. CORE_TOOL_NAMES must list exactly the registered tools; an E2E test fails if they drift.
src/tools/<tool>.ts One file per tool, or per tight family (assertions, cookies, session, selectorHints).
src/tools/shared/ Reusable pieces: selector.ts (selector schema, timeoutMs), targetSelector.ts (selector-or-ref), waits.ts, pageRefs.ts (capture_page refs), selectorHints.ts (hint storage), and logic shared with batch_execute (selectOption.ts, pageWaits.ts).
src/resources/index.ts MCP resources browser-status://current and accessibility://current.
src/utils/ toolResult.ts (textResult, errorResult, toErrorMessage) and optional tracing.
test/*.test.mjs Unit tests, including toolDescriptions.test.mjs.
test/e2e/ End-to-end tests grouped by feature; helpers/harness.mjs provides useBrowserSession().
test/fixtures/ Local HTML pages the E2E tests drive, served over HTTP.

Read the full file on GitHub · 107 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 107 lines · 1,571 tokens per session scan A 292be40a2a5d

Subscribe to this mod's changes

selenium-mcp AGENTS.md is an instructions file published in the GitHub repository gaforov/selenium-mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 1,571 tokens to every session, about $0.0063 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-14.

Related

selenium-mcp AGENTS.md compared with instructions from other repositories

selenium-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
selenium-mcp AGENTS.mdgaforov/selenium-mcpInstructions file01mo agoMITA1,571Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode