droid-mcp: Instructions file for Claude Code

CLAUDE.md

droid-mcp CLAUDE.md is an instructions file for Claude Code from stixez/droid-mcp. It costs 5,005 tokens per session, scanned A, original, Apache-2.0.

Project instructions for droid-mcp, an Android software development kit that lets AI tools use phone features through a common connection standard.

In plain words
What is it for?
Use it when developing or maintaining droid-mcp, including its calendar, contacts, messaging, media, sensors, camera, and device-control modules.
Why use it?
It gives contributors quick references, project conventions, permissions, build commands, and module boundaries for a large Kotlin and Android codebase.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/stixez/droid-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/stixez/droid-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,005 This file is loaded in full into every session.
When invoked 5,005 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.05005 $0.05005
Opus 5.5 $0.02002 $0.02002
Sonnet 5.5 $0.01001 $0.01001
Haiku 4.5 $0.00500 $0.00500

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

Security

Grade A, and why

droid-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 9d 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 · 218 lines

How it starts

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

droid-mcp

Android MCP SDK: 160 phone capabilities as tools, across 53 modules, for on-device LLMs (in-process calls) and desktop MCP clients (HTTP server on the phone).

Quick Reference

  • Language: Kotlin 2.4, Android SDK 28+ (compile/target 36), Gradle 9.8, AGP 9 (built-in Kotlin — modules don't apply kotlin.android)
  • Build: ./gradlew assembleDebug | Test: ./gradlew :droid-mcp-core:test
  • Opt-in modules (not in :droid-mcp-all, they pull third-party deps): shizuku, root (shell tools), audit (Room), tls (BouncyCastle), server-service
  • Checks before committing: ./gradlew assembleDebug testDebugUnitTest apiCheck lintDebug (CI runs the same)

Key Conventions

  • Every tool implements McpTool interface: name, description, parameters, suspend fun execute()
  • description is what a model reads to pick a tool: one or two plain sentences that start with a verb, say what comes back, and name the sibling tool to use instead when two overlap (e.g. tap vs find_and_tap). Leave out Android API names unless the model needs them; descriptions aren't part of the frozen wire contract
  • Every tool declares outputSchema = OutputSchema.obj { ... } matching exactly what execute() returns on success: nullable = true for values that can be null, optional = true for keys only sometimes present, and no entry for a key passed to withImage() (it isn't in structuredContent)
  • Every module has a provider object (e.g. CalendarTools) with all(context), requiredPermissions(), hasPermissions(context)
  • Modules with browsable data also expose resources(...): a ResourceProvider that checks its own permissions, returns empty / null instead of throwing, and sets requiredTools to the tool serving the same data so gating that tool hides the resource too (media, files, contacts, calendar)
  • Limit params: (params["limit"] as? Number)?.toInt()?.coerceIn(1, 100) ?: 10, declared with minimum = 1.0, maximum = 100.0 so the schema advertises the clamp
  • Fixed-choice params declare enumValues; numeric clamps declare minimum/maximum — keep them identical to what execute() enforces
  • ContentResolver queries: use ?.use { cursor -> }, NO LIMIT/OFFSET in sortOrder (handle in cursor loop)
  • File access: sandboxed via PathValidator — external storage only
  • Shared module logic lives in io.droidmcp.core.support (ActivityLaunch.canStartActivity, SqlLike.escape, StrictDates.parse, CalendarSupport.findWritableCalendarId, UsageAccess.isGranted, AppLabels, CompletionSupport.upcomingDates) — use these instead of module-local copies
  • Tool calls run on Dispatchers.IO (enforced by ToolRegistry.executeTool, with a per-call timeout — default 5 min, Builder.toolTimeout()), never main thread
  • No fully qualified names inline — use proper imports
  • Long-running tools call reportProgress(done, total, message) (no-op when nobody listens); tools needing user input can call elicit(message, schema) (returns null when unsupported)

Read the full file on GitHub · 218 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. 9d ago Changed · +1 lines · +92 tokens per session 251b2469aeea
  2. 19d ago Changed · +7 lines · +368 tokens per session 7d34d667db6e
  3. 1mo ago Changed · -2 lines · +472 tokens per session 72518227b099
  4. 2mo ago First seen · 212 lines · 4,073 tokens per session scan A d0ca7c3a8455

Subscribe to this mod's changes

droid-mcp CLAUDE.md is an instructions file published in the GitHub repository stixez/droid-mcp (42 stars, last pushed yesterday), licensed Apache-2.0. It adds 5,005 tokens to every session, about $0.0200 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

droid-mcp CLAUDE.md compared with instructions from other repositories

droid-mcp CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
droid-mcp CLAUDE.mdstixez/droid-mcpInstructions file42yesterdayApache-2.0A5,005Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,649GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot