PocketMCP: Instructions file for Codex

AGENTS.md

PocketMCP AGENTS.md is an instructions file for Codex, OpenCode from axonixtools/PocketMCP. It costs 5,348 tokens per session, scanned C, original, MIT.

An agent guide for PocketMCP, an Android application that turns a phone into a network server for desktop AI agents. It explains the repository layout, Kotlin and Android setup, server architecture, security storage, and available phone tools.

In plain words
What is it for?
Use it when changing PocketMCP features such as phone control, notifications, shell commands, sensors, networking, or encrypted settings.
Why use it?
It gives coding agents the project context needed to make safe changes across the Android app and its companion server.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; mentions Codex; built for openclaw.

This is axonixtools/PocketMCP's own configuration. It tells Codex and OpenCode how to work on PocketMCP 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 PocketMCP configures →

Reuse

Borrowing it

Nothing to install: this file belongs to axonixtools/PocketMCP. 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/axonixtools/PocketMCP/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/axonixtools/PocketMCP

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 PocketMCP AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/axonixtools/pocketmcp/agents-md/github.svg)](https://agentmods.dev/instructions/axonixtools/pocketmcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/axonixtools/pocketmcp/agents-md"><img src="https://agentmods.dev/badge/instructions/axonixtools/pocketmcp/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 PocketMCP AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/axonixtools/pocketmcp/agents-md"><img src="https://agentmods.dev/badge/instructions/axonixtools/pocketmcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,348 This file is loaded in full into every session.
When invoked 5,348 The same file — it is already loaded in full.
Security scan C 1 finding. 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.05348 $0.05348
Opus 5.5 $0.02139 $0.02139
Sonnet 5.5 $0.01070 $0.01070
Haiku 4.5 $0.00535 $0.00535

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

Security

Grade C, and why

PocketMCP AGENTS.md scanned grade C with 1 finding 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 20d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **Shell tool** blocks dangerous fragments (`rm -rf`/`rm -fr`/`rm -r -f`/`rm -f -r`, `mkfs`, `dd if=`, `reboot`, `poweroff`, `halt`, `fastboot`, fork bombs, `setenforce 0`, `pm uninstall`). Max command length 500 chars,
AGENTS.md · 358 lines

How it starts

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

PocketMCP — Agent Guide

Purpose: This document helps AI coding agents understand the PocketMCP project quickly and make safe, correct changes.

Project Overview

PocketMCP is an Android application that turns a phone into an MCP (Model Context Protocol) server. Desktop AI agents and scripts can call the phone over LAN (or Tailscale) to execute tools like sending messages, checking notifications, running shell commands, controlling the screen, and querying device sensors.

  • App package: com.pocketmcp
  • Language: Kotlin (Android)
  • License: MIT
  • Server version: derived from the Gradle versionName (1.0.0-beta.9) via BuildConfig.VERSION_NAME in McpServer.kt
  • Protocol version: 2024-11-05

Repository Layout

phone-mcp/
├── app/                          # Android app module (Gradle subproject)
│   ├── src/main/java/com/pocketmcp/
│   │   ├── MainActivity.kt       # Single-activity Compose host + app state
│   │   ├── accessibility/        # PhoneAccessibilityService.kt
│   │   ├── agent/                # Experimental orchestration (NLU -> plan -> execute)
│   │   ├── security/             # SecurePrefs (Keystore-encrypted storage)
│   │   ├── server/               # Ktor MCP HTTP/WebSocket server + JSON-RPC types
│   │   ├── service/              # McpServerService (Android foreground service)
│   │   ├── tools/                # ~35 MCP tool implementations
│   │   ├── ui/                   # Compose theme, components, screens
│   │   └── util/                 # ApiKeyGenerator, McpConfigBuilder
│   ├── src/main/res/             # strings, colors, drawables
│   ├── src/main/assets/          # app_action_presets.json (human-intelligence presets)
│   ├── src/main/AndroidManifest.xml
│   ├── src/test/java/            # JVM unit tests (JUnit 4)
│   └── build.gradle.kts          # App-level build config
├── .github/workflows/            # CI: build + unit tests on push/PR
├── mcp-bridge/                   # Node.js stdio-to-HTTP MCP bridge
│   ├── bridge.mjs                # Main entry point
│   └── package.json
├── scripts/
│   ├── setup-emulator-mcp.ps1    # PowerShell ADB port-forward helper for emulators
│   ├── setup-wireless-adb.ps1    # One-time wireless-ADB unlock: pair, grant WRITE_SECURE_SETTINGS, enable accessibility + notification listener
│   └── pocket.mjs                # Instant command runner — local intent library + chains ("pocket open youtube and torch on"), zero AI
├── pocket_mcp_client.py          # Python client library + CLI
├── mcp-config.example.json       # Example MCP client config (Claude Desktop, Cursor, etc.)
├── build.gradle.kts              # Root build file
├── settings.gradle.kts           # Project settings
├── gradle.properties             # Gradle JVM options, AndroidX flags
└── README.md                     # User-facing documentation

Read the full file on GitHub · 358 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. 20d ago Changed · +20 lines · +602 tokens per session fe3e40b191bc
  2. 21d ago First seen · 338 lines · 4,746 tokens per session scan C 609661591957

Subscribe to this mod's changes

PocketMCP AGENTS.md is an instructions file published in the GitHub repository axonixtools/PocketMCP (19 stars, last pushed 20d ago), licensed MIT. It adds 5,348 tokens to every session, about $0.0214 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-16.

Related

PocketMCP AGENTS.md compared with instructions from other repositories

PocketMCP AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
PocketMCP AGENTS.mdaxonixtools/PocketMCPInstructions file1920d agoMITC5,348Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,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