mcp CLAUDE.md

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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/webdriverio/mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/webdriverio/mcp
Per session 3,125 This file is loaded in full into every session.
When invoked 3,125 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.03125 $0.03125
Opus 5 $0.01563 $0.01563
Sonnet 5 $0.00625 $0.00625
Haiku 4.5 $0.00313 $0.00313

Measured 2d ago against content hash 016157900ced, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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 · 256 lines

How it starts

The opening of the file, as written. The whole thing — 256 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

vitest.config.ts sets environment: 'happy-dom' and typechecks tests against tsconfig.test.json.

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)
├── 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/             # parse-variables.ts, zod-helpers.ts (coerceBoolean)
└── types/             # ToolDefinition, ResourceDefinition, RecordedStep interfaces

Read the full file on GitHub · 256 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. 2d 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 (37 stars, last pushed 21d ago), licensed MIT. It adds 3,125 tokens to every session, about $0.0156 per session on Opus 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

Other instructions, from other repositories

maui-labs mcp-tools.instructions.md

Instructions for dotnet/maui-labs, covering mcp tool development guide, adding a new mcp tool, step 1: create the tool file, step 2: register the tool and naming conventions.

dotnet/maui-labs · 1,338 tokens

cc-pocket AGENTS.md

Instructions for heypandax/cc-pocket, covering agents.md — cc-pocket, ⚠️ 本机 daemon 操作铁律(最重要,先读这一段), 改完 daemon 代码要更新本机 daemon —— 只用这一条命令, 绝对不要做(每一条都会制造第二个 daemon → 立刻不可用) and 必须知道的两个反直觉事实(本机环境).

heypandax/cc-pocket · 1,507 tokens

blueprint-mcp CLAUDE.md

Instructions for railsblueprint/blueprint-mcp, covering claude.md, project overview, development commands, server development and run mcp server in debug mode.

railsblueprint/blueprint-mcp · 3,161 tokens

plasmate AGENTS.md

Instructions for plasmate-labs/plasmate, covering agents.md — plasmate codebase guide, what plasmate is, build, test and key directories.

plasmate-labs/plasmate · 1,534 tokens

compose-ai-tools GEMINI.md

Instructions for yschimke/compose-ai-tools, a project described as: Helping the Agents Compose the Things.

yschimke/compose-ai-tools · 106 tokens

mobile-ai-agents AGENTS.md

Instructions for salmanashraf/mobile-ai-agents, covering agents.md — mobile ai agents, what this repo is, repo map, how to use an agent and option a — paste into codex chat.

salmanashraf/mobile-ai-agents · 2,353 tokens