mcp: Instructions file for Claude Code

CLAUDE.md

mcp CLAUDE.md is an instructions file for Claude Code from webdriverio/mcp. It costs 3,688 tokens per session, scanned A, original, MIT.

Repository instructions for working on a WebdriverIO MCP server, including its commands, structure, session state, and tool patterns. MCP is a standard way for AI clients to use external tools.

In plain words
What is it for?
Running development and production commands, choosing focused Vitest tests, understanding the source layout, and working with browser-based MCP connections.
Why use it?
It gives an coding agent the project-specific guidance needed to build, test, lint, and run the server correctly.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is webdriverio/mcp's own configuration. It tells Claude Code how to work on 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 mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to webdriverio/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/webdriverio/mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/webdriverio/mcp

Made for: Claude Code.

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 mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/webdriverio/mcp/claude-md/github.svg)](https://agentmods.dev/instructions/webdriverio/mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/webdriverio/mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/webdriverio/mcp/claude-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 mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/webdriverio/mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/webdriverio/mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,688 This file is loaded in full into every session.
When invoked 3,688 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.03688 $0.03688
Opus 5.5 $0.01475 $0.01475
Sonnet 5.5 $0.00738 $0.00738
Haiku 4.5 $0.00369 $0.00369

Measured 7d ago against content hash f23dda832a11, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mcp CLAUDE.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 7d 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.

CLAUDE.md · 269 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Commands

npm run bundle      # Build: clean + tsup + make executable + create .tgz
npm run lint        # ESLint (--fix) + TypeScript type-checking (tsc --noEmit)
npm test            # Run all unit tests (vitest run; env: happy-dom)
npm run dev         # Development server (tsx --watch) — picks up code changes automatically; rebundle only needed for npm package changes
npm run dev:http    # Dev server with HTTP transport (for browser-based MCP clients)
npm start           # Run built server from lib/server.js
npm run start:http  # Built server with HTTP transport (for browser-based MCP clients)

# Single test file / focused run (vitest is not exposed via an npm script):
npx vitest run tests/tools/get-elements-tool.test.ts   # one file
npx vitest run -t "filter pattern"                      # tests matching a name
npx vitest tests/trace/                                 # watch mode for a directory

# Type-check. Use the repo-pinned TypeScript, not a plain `tsc` from PATH — a global
# TypeScript 7 rejects this repo's tsconfig (`baseUrl` removed) and reports TS5102
# instead of any real error.
./node_modules/.bin/tsc --noEmit

vitest.config.ts sets environment: 'happy-dom'. Its typecheck.tsconfig names a tsconfig.test.json that is not in the repo, so tsc --noEmit — which covers tests/ via the root include — is the real type gate.

Architecture

src/
├── server.ts          # MCP server entry — registers all tools + resources
├── session/           # Session state (state.ts) + lifecycle (lifecycle.ts)
├── providers/         # SessionProvider implementations
│   ├── registry.ts    # getProvider() — routes to local or cloud provider
│   ├── local-browser.provider.ts  # Chrome/Firefox/Edge/Safari
│   ├── local-appium.provider.ts   # iOS/Android via Appium
│   └── cloud/
│       ├── browserstack.provider.ts  # BrowserStack (browser + App Automate)
│       ├── saucelabs.provider.ts     # Sauce Labs (browser + App Storage)
│       ├── testmu.provider.ts        # TestMu / LambdaTest (browser + mobile)
│       ├── testingbot.provider.ts    # TestingBot (browser + mobile + Storage)
│       └── digitalai.provider.ts     # Digital.ai Testing (browser + mobile; accessKey cap, deviceQuery)
├── trace/             # Playwright-compatible trace recording (recorder.ts, tool-mapping.ts, zip-writer.ts)
├── tools/             # One file per MCP tool (see Tool Pattern below); includes the Electron
│                       #   surface (electron-execute, electron-deeplink), mocking, and web extensions
├── resources/         # One file per MCP resource (see Recording below)
├── recording/         # step-recorder.ts (withRecording HOF) + code-generator.ts
├── scripts/           # Browser/mobile scripts executed via browser.execute() — no try/catch, raw data only
├── locators/          # Element detection, selector generation, XML parsing (mobile)
├── config/            # appium.config.ts — iOS/Android capability builders
├── utils/             # auth.ts, parse-args.ts, http-helpers.ts, zod-helpers.ts (coerceBoolean),
│                       #   docs-index.ts + docs-client.ts (docs corpus)
└── types/             # ToolDefinition, ResourceDefinition, RecordedStep interfaces

Read the full file on GitHub · 269 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. 7d ago Changed · -7 tokens per session f23dda832a11
  2. 8d ago Changed · +1 lines · +67 tokens per session 796d2cd4a2ba
  3. 1mo ago Changed · +12 lines · +503 tokens per session 2f6b8c523c40
  4. 2mo ago First seen · 256 lines · 3,125 tokens per session scan A 016157900ced

Subscribe to this mod's changes

mcp CLAUDE.md is an instructions file published in the GitHub repository webdriverio/mcp (44 stars, last pushed 2d ago), licensed MIT. It adds 3,688 tokens to every session, about $0.0148 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-08-30.

Related

mcp CLAUDE.md compared with instructions from other repositories

mcp CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp CLAUDE.mdwebdriverio/mcpInstructions file442d agoMITA3,688Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file275k3d agoMITA4,313Codex, OpenCode