scrcpy-mcp AGENTS.md

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

Project instructions for scrcpy-mcp, an MCP server that lets coding agents view and control Android devices through ADB and scrcpy. It describes the project layout and its build, lint, type-checking, and test commands.

In plain words
What is it for?
Use it when developing scrcpy-mcp, reviewing its source, running the server, checking code quality, or running unit and integration tests.
Why use it?
It gives an agent the project context needed to change the code safely and check whether changes work. It also provides the commands needed to run and inspect the server.

Instructions file for CodexOpenCode

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/juancf/scrcpy-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/JuanCF/scrcpy-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 scrcpy-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/juancf/scrcpy-mcp/agents-md.svg)](https://agentmods.dev/instructions/juancf/scrcpy-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/juancf/scrcpy-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/juancf/scrcpy-mcp/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,693 This file is loaded in full into every session.
When invoked 1,693 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.01693 $0.01693
Opus 5 $0.00847 $0.00847
Sonnet 5 $0.00339 $0.00339
Haiku 4.5 $0.00169 $0.00169

Measured 4d ago against content hash 36c6e076c1bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

scrcpy-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 4d 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 · 224 lines

How it starts

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

AGENTS.md

Guidelines for AI coding agents working on scrcpy-mcp.

Project Overview

scrcpy-mcp is a Model Context Protocol (MCP) server that provides AI agents with vision and control over Android devices via ADB and scrcpy. It exposes tools for device management, input, screenshots, and more.

Project Documentation

  • ROADMAP.md - Implementation roadmap with phases and milestones
  • PLAN.md - Detailed implementation plan with architecture and tool specifications

Build/Lint/Test Commands

# Build the project
npm run build

# Development mode (run directly with tsx)
npm run dev

# Run the built server
npm start

# Run MCP Inspector for testing
npm run inspect

# Lint check
npm run lint

# Lint with auto-fix
npm run lint:fix

# Type check
npx tsc --noEmit

# Run all tests
npm run test

# Run integration tests only
npm run test:integration

# Run a single test file
npx vitest run tests/example.test.ts

# Run tests matching a pattern
npx vitest run --testNamePattern "device"

Project Structure

src/
├── index.ts           # Entry point, server setup, tool registration
├── utils/
│   ├── adb.ts         # ADB utility functions (exec, device detection, etc.)
│   ├── scrcpy.ts      # scrcpy session lifecycle, control protocol, video decode
│   ├── mjpeg.ts       # HTTP MJPEG server and ffplay viewer launcher
│   └── constants.ts   # Shared constants (protocol types, env vars, keycodes)
└── tools/
    ├── apps.ts        # App management (start, stop, install, uninstall, list, current)
    ├── clipboard.ts   # Clipboard get/set (scrcpy + ADB fallback)
    ├── device.ts      # Device management (list, info, screen, panels, rotation, WiFi)
    ├── files.ts       # File push/pull/list
    ├── input.ts       # Touch/keyboard/scroll input (scrcpy + ADB fallback)
    ├── session.ts     # scrcpy session start/stop
    ├── shell.ts       # Arbitrary ADB shell command execution
    ├── ui.ts          # UI hierarchy dump and element finder
    ├── video.ts       # MJPEG video stream start/stop
    └── vision.ts      # Screenshot and recording

Read the full file on GitHub · 224 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. 4d ago First seen · 224 lines · 1,693 tokens per session scan A 36c6e076c1bf

Subscribe to this mod's changes

scrcpy-mcp AGENTS.md is an instructions file published in the GitHub repository JuanCF/scrcpy-mcp (91 stars, last pushed 13d ago), licensed MIT. It adds 1,693 tokens to every session, about $0.0085 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

androir-mcp CLAUDE.md

Claude Code instructions for benasbarciauskas/androir-mcp, covering androir-mcp, scope guardrail (enforced), conventions and security.

benasbarciauskas/androir-mcp · 271 tokens

uno CLAUDE.md

Claude Code instructions for unoplatform/uno, a project described as: Open-source platform for building cross-platform native Mobile, Web, Desktop, and Embedded apps from a single C#/XAML codebase. Work from any IDE/CLI with Hot Reload, Visual Designer, MCPs, and Skills built for modern .NET workflows. 200M+ NuGet…

unoplatform/uno · 67 tokens

android-agent CLAUDE.md

Instructions for ghost-in-the-droid/android-agent, covering ghost in the droid — agent tool rules, mcp tool: opencamera, mcp tool: speaktext and general rule.

ghost-in-the-droid/android-agent · 324 tokens

Autofish AGENTS.md

Instructions for felinics/Autofish, covering agents.md, project, context, current baseline and rules.

felinics/Autofish · 684 tokens

native-devtools-mcp AGENTS.md

AGENTS.md instructions for vectora-foundry/native-devtools-mcp, covering agent context: native-devtools-mcp, 🧠 core reasoning loop, 🗺️ capabilities matrix (strategy guide), 🛠️ tool definitions & schemas and 1. vision & perception (the "eyes").

vectora-foundry/native-devtools-mcp · 8,302 tokens

uiautomator2-mcp-server AGENTS.md

Instructions for tanbro/uiautomator2-mcp-server, covering uiautomator2-mcp-server, project overview, project structure, development setup and install dependencies (uses uv lock file).

tanbro/uiautomator2-mcp-server · 3,906 tokens