mobile-freecode
Provides integration with Android devices running the FreeCode Agent app, enabling discovery, pairing, and remote control of phones over a local network. Includes tools for listing paired devices, retrieving device details and foreground app, sending taps, swipes, and text, capturing screenshots, and starting a live screen stream.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mobile-freecode take a screenshot of my phone and describe what's on screen"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mobile FreeCode
mobile-freecode is an MCP server that lets
any MCP client (Claude Code, Claude Desktop, the FreeCode desktop app, …)
discover and control an Android phone running the FreeCode Agent app over
your local network.
Direction of control: this server runs on your desktop and drives the phone. The phone is the device being controlled; the desktop is the controller. There is no reverse channel — the phone never drives the desktop.
The phone runs a lightweight WebSocket gateway (port 8765); this server finds
it on the LAN, pairs with it once, and then routes tool calls to the phone's
native capabilities (accessibility tree, taps / swipes / text, screenshots, and
a live screen stream).
Tools
Tool | Purpose |
| List discovered / paired phones on the network. |
| Details + capabilities + current foreground app for one device. |
| Pair with a device (enter the code shown on the phone, or generate one). |
| Remove a device's trust. |
| Run a native tool on the phone ( |
| Run one tool across several phones at once. |
| Capture the current screen (MediaProjection when active, else accessibility). |
| Start/stop a live screen stream; the first frame is returned as an image. |
The full device-tool reference (every computer.* / screen.* / device.* /
app.* tool, its parameters and return shape) is in
docs/MOBILE_MCP_TOOLS.md.
Related MCP server: phone-control
Requirements
Node.js ≥ 18.
The FreeCode Agent app installed on the Android phone, its accessibility service enabled, notifications allowed, and the phone on the same Wi‑Fi as the computer running this server.
What this repo ships
This repository distributes the compiled connector (dist/) — the ready-to-run
MCP server — not the TypeScript source. Clone it, install the two runtime
dependencies, and run:
git clone https://github.com/zunairvf-sys/MCP-Mobile-FreeCode.git
cd MCP-Mobile-FreeCode
npm install # pulls @modelcontextprotocol/sdk + ws
node dist/index.js # speaks MCP over stdioWire it into an MCP client
Add an entry to your client's MCP config (here, .mcp.json):
{
"mcpServers": {
"mobile-freecode": {
"command": "node",
"args": ["/absolute/path/to/MCP-Mobile-FreeCode/dist/index.js"]
}
}
}Paired devices and this host's identity are stored per-user in
~/.freecode/ (mobile-paired.json, mobile-host.json) so every client that
runs this server shares the same trust store.
License
Licensed under the Apache License, Version 2.0. See LICENSE and
NOTICE.
Trademarks
The Apache-2.0 license covers the code. It does not grant any right to the names or brand. "FreeCode", "FreeCode Agent", and "Mobile FreeCode", and their logos, are trademarks of the project author. You may fork and redistribute this code under the Apache-2.0 terms, but you may not:
ship your fork under the "FreeCode" / "FreeCode Agent" name or logo,
represent your build as the official FreeCode app, or
reuse the FreeCode Agent Android package id or AdMob/publisher identifiers.
If you distribute a modified version, give it your own name.
Available Tools
8 toolsbatchA
Run an operation against multiple devices concurrently. Returns results for each device.
Inputs: tool (required), devices (required), arguments.
callB
Execute a tool on a paired Android device. See docs/MOBILE_MCP_TOOLS.md for the full tool reference. Available device tools: computer.tap, computer.double_tap, computer.long_press, computer.swipe, computer.drag_path, computer.multi_touch, computer.pinch, computer.type, computer.key, computer.scroll, screen.screenshot, screen.dump, screen.observe, device.info, device.brightness, device.volume, device.clipboard, app.current, app.list, app.launch. The device routes the call through its MobileGatewayService to the appropriate service.
Inputs: tool (required), device (required), arguments.
get_deviceA
Get detailed information about a specific device, including capabilities, connection state, and current foreground app.
Inputs: device (required).
list_devicesA
List all discovered and paired Android devices running the FreeCode Agent app. If no devices appear, the user needs to: (1) install the FreeCode Agent app on their Android phone from the Play Store or by installing the APK directly, (2) enable the accessibility service in the app, and (3) ensure the phone is on the same WiFi network as the computer. The app automatically discovers the desktop on the local network once installed.
Inputs: status.
pairA
Initiate pairing with a discovered Android device. The device must have the FreeCode Agent app installed and running. If a pairing code was generated on the device, pass it via the "code" parameter. Otherwise a code is generated automatically — the user enters this code on their phone to confirm pairing.
Inputs: device (required), code.
screenshotC
Capture a screenshot from a device. Uses MediaProjection when active, falls back to AccessibilityService.
Inputs: device (required).
screen_streamA
Start, poll, or stop a persistent screen stream from a device. Use action="start" to begin streaming, action="poll" to fetch the most recent frames (a sliding window of the last few, oldest→newest, so you see recent motion — call this repeatedly to keep watching a screen that changes on its own, e.g. a video or animation), action="stop" to end.
Inputs: action (required), device (required), format.
unpairA
Remove pairing for a device. The device will need to be paired again before it can be controlled.
Inputs: device (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool maps to a distinct lifecycle stage: discovery (list/get), pairing (pair/unpair), command execution (call), multi-device execution (batch), and screen capture (screenshot/screen_stream). Some overlap exists between 'screenshot' and 'screen_stream'—and 'call' can also trigger screen.screenshot—but the descriptions clarify single-frame versus streaming.
Names are readable and snake_case, but not one consistent pattern: list_devices/get_device use verb_noun, pair/unpair are simple verbs, call/batch are generic verbs, and screenshot/screen_stream are compound nouns. This is mixed but still understandable.
Eight tools is well-scoped for an Android device-control server. Each tool has a clear role, with no obvious filler, and the count sits comfortably in the typical 3-15 range.
The core lifecycle is covered: discovery, pairing, unpairing, device info, command execution, batch execution, and screen capture/streaming. One minor gap is that the 'call' tool defers to an external docs file and the server exposes no schema-listing for the device tools, which could create dead ends if those device tools change.
Maintenance
Related MCP Connectors
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Melaya is a remote MCP server. It gives an assistant hands on your own Android phone and browser: it reads the screen through the accessibility tree, then taps, types and navigates inside the apps and sites you allow-list, with no per-app API. It also builds, schedules and runs agent pipelines across 6k+ connected tools. OAuth 2.1, nothing to install.
Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi
An authenticated remote MCP server for user-owned devices and one-shot capability invocation.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables MCP-compatible agents to control an Android device over the network via ADB, providing tools for shell commands, screen capture, UI inspection, file operations, and input simulation.16 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables controlling an Android device from an MCP client via ADB, including wireless debugging discovery, UI-tree inspection, and performing taps, swipes, typing, app actions, and shell commands without relying on screen coordinates.12 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible AI assistants to see and control Android devices through ADB and a fast device-control protocol, including screenshots, touch input, typing, app management, UI inspection, file transfer, shell commands, and audio/video streaming.374 npmMIT
- AlicenseNot gradedqualityBmaintenanceProvides an MCP server that lets AI agents inspect and control an Android phone over Wi-Fi or USB, including screenshot element maps, OCR, taps, typing, scrolling, app launching, notifications, clipboard, and device settings/controls.160 npm3MIT