DroidMCP

mcp
Guvenlik Denetimi
Uyari
Health Uyari
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 6 GitHub stars
Code Gecti
  • Code scan — Scanned 4 files during light audit, no dangerous patterns found
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Native MCP servers for Android/Termux — ARM64 binaries, no dependencies required.

README.md

DroidMCP

Native Model Context Protocol servers for Android and Termux

Self-contained Go binaries that give any MCP client — Claude Code, Gemini CLI, or your own —
hands on an Android device. No Node.js, no Python, no runtime to install.

CI
Release
Go
Platform
License

English · Español · Usage Guide · Security · Roadmap


At a glance

Zero dependencies Secure by default Fourteen focused servers
One self-contained ARM64 binary per server, pure Go — no CGO, no interpreter, nothing else to install. Loopback-only listener, API-key auth, optional TLS, sandboxed roots, redacted logs, signed releases. Files, GitHub, web scraping, shell, LAN, clipboard, media, SQLite, device sensors, notifications, contacts, SMS, on-device LLMs, and scheduled tasks — each behind a small, auditable tool surface.
      Claude Code · Gemini CLI · any MCP client
                          │
                          │  MCP over Streamable HTTP · SSE · stdio
                          ▼
       ┌──────────────────────────────────────┐
       │      DroidMCP — Termux · ARM64       │
       ├────────────┬────────────┬────────────┤
       │ filesystem │   github   │  scraper   │
       ├────────────┼────────────┼────────────┤
       │   termux   │  network   │ clipboard  │
       ├────────────┼────────────┼────────────┤
       │   media    │   sqlite   │  sensors   │
       ├────────────┴────────────┴────────────┤
       │            notifications             │
       ├────────────┬────────────┬────────────┤
       │  contacts  │    sms     │ llm-proxy  │
       ├────────────┴──────┬─────┴────────────┤
       │     automation    │     calendar     │
       └───────────────────┴──────────────────┘

See it running

Screenshots from an Android 15 phone in Termux, only cropped: the
android/arm64 release binaries of v0.4.1 answering an MCP client over
Streamable HTTP. On the left, tool calls to six servers. On the right, what
they refuse: unsafe configurations at startup and, at call time, a wrong key,
path traversal, a command outside the allowlist, LD_PRELOAD, SSRF to
loopback, SQL ATTACH and a permission Termux:API was not granted.

Termux on Android: seven DroidMCP servers report ok on their health checks, then an MCP client calls get_battery, run_command (uname), extract_metadata on example.com, a file write and read, a SQLite query and an ffmpeg image conversion, all succeeding Termux on Android: mcp-sms without a key, mcp-termux without an allowlist and mcp-filesystem with DROIDMCP_ROOT=/ refuse to start; a wrong API key, path traversal, an unlisted command, LD_PRELOAD, a loopback fetch, SQL ATTACH and list_sms without the READ_SMS permission are each refused with a clear error

Servers

Server Default port Focus Requires
mcp-filesystem 3000 Sandboxed file operations with path-traversal protection DROIDMCP_ROOT + key
mcp-github 3001 Full GitHub API via Personal Access Token GITHUB_TOKEN + key
mcp-scraper 3002 Chromium-free web scraping and extraction —
mcp-termux 3003 Shell execution and package management allowlist + key
mcp-network 3004 LAN discovery and port scanning —
mcp-clipboard 3005 Android clipboard bridge via Termux:API termux-api
mcp-media 3006 Media browsing and ffmpeg-based transforms DROIDMCP_ROOT + key
mcp-sqlite 3007 Local SQLite databases, pure Go — no CGO DROIDMCP_ROOT + key
mcp-sensors 3008 Device sensors: battery, location, WiFi, brightness, volume termux-api
mcp-notifications 3009 Android notifications and Do Not Disturb status termux-api
mcp-contacts 3010 Read-only address book: search, export (JSON/vCard) termux-api
mcp-sms 3011 Read SMS (OTP/2FA) and send real messages termux-api + key
mcp-llm-proxy 3012 On-device LLMs through a local Ollama daemon ollama
mcp-automation 3013 Scheduled shell scripts (cron or interval) under a mandatory allowlist allowlist + key
mcp-calendar 3014 Calendar events on a CalDAV account (Nextcloud, iCloud, Fastmail…) CalDAV account + key

Expand a server for its tool list; the full per-tool reference, with arguments and
examples, lives in the usage guide.

mcp-filesystem — secure file operations within a configurable root
Tool Description
read_file Read the contents of a file
read_file_lines Read a line range from a file
write_file Write or create a file (creates parent dirs)
list_directory List directory contents with type and size
stat File metadata: size, mode, times, owner
search_files Recursive file search using glob patterns
delete_file Delete a file or empty directory (never the root itself)
move_file Move or rename a file/directory (creates parent dirs)
copy_file Copy a file
mcp-github — full GitHub operations, built on google/go-github
Tool Description
list_repos · get_repo · fork_repo Browse and fork repositories
list_branches · list_tags · list_releases List repository refs and releases
list_commits · get_commit Browse commit history and details
create_issue · list_issues Open and list issues (filterable by state)
comment_issue · close_issue · label_issue Manage existing issues
get_file · commit_file Read and write repository files via the Content API
get_pr · create_pr · review_pr · merge_pr Full pull-request lifecycle
search_code · search_issues Search code and issues across GitHub
mcp-scraper — lightweight scraping on net/http + goquery, no Chromium
Tool Description
fetch_page Fetch raw HTML from a URL
extract_text Extract clean text (strips scripts, styles, noise)
extract_links Extract all absolute URLs from a page
extract_table Extract HTML tables as structured JSON
extract_metadata Extract title, description, canonical, og:*, twitter:*
search_in_page Search text or regex in visible text, with context
mcp-termux — direct interaction with the Termux environment
Tool Description
run_command Execute a program from the mandatory allowlist
install_pkg · list_pkgs Package management via pkg
read_env Read one or all environment variables (credentials redacted)
get_storage Storage usage for home, prefix, and shared storage
termux_battery_status · termux_location Device status via Termux:API
termux_notification · termux_toast Show notifications and toasts
termux_sms_send · termux_tts_speak Send SMS and speak text via TTS
mcp-network — LAN discovery via concurrent TCP probes

Android 11+ hides network interfaces from apps, so there the subnet to scan is
the /24 around the Wi-Fi address (read with termux-api) and network_info
reports little beyond the DNS servers.

Tool Description
scan_network Scan a subnet for active hosts (auto-detects local subnet)
check_ports Scan common ports on a specific host
nslookup · reverse_dns Forward and reverse DNS lookups
traceroute Trace the path to a host (no root, via tracepath)
network_info Gateway, DNS servers, interfaces, detected subnet
list_devices · get_device_info Persistent device inventory from previous scans
mcp-clipboard — Android clipboard bridge (requires Termux:API)

Requires the termux-api package and the Termux:API
Android app; without them the tools fail with a hint explaining which step is missing.

Tool Description
get_clipboard Read current clipboard content (binary via base64); Android 10+ only allows it while Termux is in the foreground
set_clipboard Write text or base64-encoded bytes to clipboard
clear_clipboard Reset the clipboard to an empty value
clipboard_history In-memory clipboard history (FIFO-evicted, env-bounded)
mcp-media — media browsing and transforms within a configurable root

Listing and image dimensions are pure Go; conversion, thumbnails, and audio
extraction shell out to ffmpeg, and get_metadata is enriched by exiftool
when installed.

Tool Description
list_media List image/video/audio files (recursive, filterable by kind)
get_metadata Size, image dimensions, and EXIF/metadata for a file
convert_image Convert image format and/or resize
thumbnail Generate a thumbnail from an image or a video frame
extract_audio Extract the audio track from a video
mcp-sqlite — local SQLite databases, pure Go (no CGO)

Backed by modernc.org/sqlite; databases are files under DROIDMCP_ROOT, and
every value is bound as a parameter — ? placeholders keep statements
injection-safe.

Tool Description
open_db Open a database, creating the file (and parent dirs) if needed
query Run a read statement (SELECT/WITH/PRAGMA/…) and return rows as JSON
execute Run a write statement (INSERT/UPDATE/DELETE/DDL); returns rows affected
list_tables List user tables and views (internal sqlite_* objects excluded)
describe_table Column schema for a table (name, type, NOT NULL, default, PK)
export_csv Stream a query's results into a CSV file under root
mcp-sensors — read-only device sensors and status (requires Termux:API)

Requires the termux-api package and the Termux:API Android app. All tools are
read-only; results pass the API's JSON through verbatim, except Termux:API's
own error reports (a missing permission, no location fix), which come back as
errors that say what to grant. get_brightness reads
the Android settings provider (Termux:API has no brightness getter) and may be
unavailable on some devices.

Tool Description
get_battery Battery level, charging status, health, temperature
get_location GPS/network/passive location; last returns the cached fix
get_wifi_info Current WiFi connection: SSID, IP, link speed, RSSI
get_brightness Screen brightness level and auto-brightness mode
get_volume Volume of every audio stream
list_sensors Tool availability plus the hardware sensor inventory
mcp-notifications — Android notifications and Do Not Disturb (requires Termux:API)

Requires the termux-api package and the Termux:API Android app. send and
dismiss have visible side effects but touch no files; running with a key is
recommended. list_notifications needs Notification Access granted to
Termux:API; without it the call may time out with an error that says so. If
Android refuses that access as a restricted setting (Termux:API installed from
an APK), allow restricted settings from its app-info ⋮ menu first. get_dnd_status reads the Android settings provider (Termux:API has
no DND getter) and may be unavailable on some devices.

Tool Description
send_notification Post a notification with content, optional title, id, priority
list_notifications List active notifications as JSON
dismiss_notification Dismiss a notification by id
get_dnd_status Do Not Disturb state read from global zen_mode
mcp-contacts — read-only Android address book (requires Termux:API)

Requires the termux-api package and the Termux:API Android app, with Contacts
permission granted. Read-only, so key-less dev mode is allowed on localhost; a
key is recommended because the address book is personal data. The backend
command takes no arguments — every filter is applied in memory, so nothing a
caller types reaches a command line. list_groups is a documented stub
(Termux:API has no groups endpoint).

Tool Description
search_contacts Filter by name or number (substring, formatting-insensitive)
get_contact Full records for an exact name and/or number
list_groups Stub: groups are unavailable via Termux:API
export_contacts Export (optionally filtered) as JSON or vCard 3.0
mcp-sms — read and send Android SMS (requires Termux:API, no dev mode)

Requires the termux-api package and the Termux:API Android app with SMS
permissions. Highest-privilege Termux:API server: reading messages exposes
OTP/2FA codes and send_sms dispatches a real, billable, irreversible
message — so it refuses to start without a key (DROIDMCP_SMS_KEY or
DROIDMCP_API_KEY). send_sms validates recipients as phone numbers and passes
the body on stdin, so message content never reaches a shell, and is limited to
10 messages per hour unless DROIDMCP_SMS_RATE_LIMITS says otherwise.

Tool Description
list_sms List stored messages by box (inbox/sent/…) with paging
search_sms In-memory filter by body text and/or contact number
send_sms Send a real SMS to one or more recipients
mcp-llm-proxy — local models through Ollama, no cloud round-trip

Requires a running Ollama daemon (pkg install ollama or a desktop on the same
LAN). The address comes from DROIDMCP_OLLAMA_HOST and never from a tool
argument, so a calling model cannot redirect prompts; the default is
http://127.0.0.1:11434. A host outside the device or LAN is refused unless
DROIDMCP_LLMPROXY_ALLOW_REMOTE=1 is set, which keeps prompts from silently
leaving the network; the same rule is re-checked on the dialed IP and no
redirect is ever followed. Responses are returned whole (no streaming), and
on-device generation is slow enough that the default generate timeout is 300s.
Dev mode is allowed; the per-server key is DROIDMCP_LLMPROXY_KEY (no
separator, like the binary).

Tool Description
list_models Installed models with size, family and quantization
generate Single-shot completion with optional system prompt and sampling
embed Embedding vector for a piece of text
model_info Family, parameter size, context window and capabilities
mcp-automation — scheduled scripts, run by the server itself

Runs shell scripts on a cron expression or an interval while the server is up
(keep it alive with tmux or Termux:Boot plus termux-wake-lock). There is no
dev mode and no allow-all default: it refuses to start without a key and without
DROIDMCP_AUTOMATION_ALLOWLIST. Scripts run in an embedded shell interpreter
that checks every external command against that list as it starts — inside
pipes, $(…) and eval too — resolving names through the server's PATH.
Scripts cannot write files with > nor change LD_*/DYLD_*, and each run has
a timeout and capped output. Cron uses DROIDMCP_AUTOMATION_TZ, TZ, or
Android's own time zone.

Tool Description
create_task Schedule a script with cron or interval_seconds
list_tasks Tasks with schedule, next run, and last result
run_task Run a task now and return its output
delete_task Remove a task, stopping it if it is running
task_history The newest 20 runs of a task with their output
mcp-calendar — events on your CalDAV calendar, synced with the phone

Termux:API has no calendar commands, so this server talks CalDAV to the account
the phone's calendar syncs with (Nextcloud, Radicale, Baïkal, iCloud, Fastmail…,
through DAVx⁵ or the provider's app): an event created here shows up on the
phone at its next sync. The address comes from DROIDMCP_CALDAV_URL and the
credentials (an app password) from DROIDMCP_CALDAV_USERNAME and
DROIDMCP_CALDAV_PASSWORD, never from tool arguments; plain http is refused
outside the local network and redirects to another host are not followed.
Recurring events are expanded on the device, with their exceptions, so the
result does not depend on the server. Times are shown in
DROIDMCP_CALENDAR_TZ, TZ, or Android's own time zone. No dev mode: it holds
the account's password, so it refuses to start without a key. Google Calendar
is not supported (its CalDAV requires OAuth).

Tool Description
list_calendars The account's calendars, which are read-only, and the default
list_events Events in a range, recurring ones expanded, with an optional text filter
create_event Timed or all-day event, never overwriting an existing one
update_event Change title, times, notes or location; refuses if changed elsewhere meanwhile
delete_event Delete an event (or series) and read it back to confirm
check_availability Busy blocks and free slots, optionally within working hours

Quick start

From a release — each release ships one binary per server plus a signed
SHA256SUMS (verification details):

curl -LO https://github.com/kahz12/DroidMCP/releases/latest/download/droidmcp-filesystem
curl -LO https://github.com/kahz12/DroidMCP/releases/latest/download/SHA256SUMS
sha256sum -c SHA256SUMS --ignore-missing
chmod +x droidmcp-filesystem && mv droidmcp-filesystem "$PREFIX/bin/"

From source — on the device (Termux, F-Droid build) or cross-compiled:

pkg install golang git make          # prerequisites
git clone https://github.com/kahz12/DroidMCP && cd DroidMCP
make build                           # bin/droidmcp-<server>, one per server
make install                         # optional: copy into $PREFIX/bin

From a PC, make build-arm64 cross-compiles for android/arm64. Build for
GOOS=android, not linux: Android kills a linux binary the first time it
runs a command.

Run — export the server's requirements and start the binary; the MCP
endpoint is http://localhost:<port>/mcp (Streamable HTTP), with the legacy SSE
transport still at /sse:

export DROIDMCP_API_KEY="$(openssl rand -base64 32)"
export DROIDMCP_ROOT="$HOME/workspace"     # never leave this at "/"

DROIDMCP_PORT=3000 droidmcp-filesystem
curl -fsS http://localhost:3000/healthz
# {"status":"ok","server":"mcp-filesystem","version":"v0.4.2"}

Configuration

Every knob is an environment variable prefixed with DROIDMCP_. Shared by all
servers:

Variable Description Default
DROIDMCP_TRANSPORT http (Streamable HTTP at /mcp + legacy SSE at /sse) or stdio (the client launches the binary; no port, no key) http
DROIDMCP_PORT TCP port the HTTP listener binds to per server (table)
DROIDMCP_<SERVER>_RATE_LIMITS Caps on tool calls, e.g. DROIDMCP_SMS_RATE_LIMITS=send_sms=3/h,*=120/m; off removes a built-in one SMS sending: 10/h
DROIDMCP_<SERVER>_DISABLED_TOOLS Tools to switch off, e.g. DROIDMCP_TERMUX_DISABLED_TOOLS=termux_sms_send; an unknown name stops the server unset
DROIDMCP_ROOT Filesystem root, validated at startup — required by filesystem, media, sqlite —
DROIDMCP_API_KEY Global key; if set, every request must carry X-DroidMCP-Key unset
DROIDMCP_<SERVER>_KEY Per-server key, e.g. DROIDMCP_TERMUX_KEY; wins over the global key unset
DROIDMCP_TLS_CERT · DROIDMCP_TLS_KEY PEM cert and key; both set enables HTTPS + HSTS unset
DROIDMCP_LOG_LEVEL · DROIDMCP_LOG_FORMAT debug–error · json or text info · text

Per-server variables — GitHub tokens, the run_command allowlist, SSRF and
scan-target opt-ins, history caps, ffmpeg/exiftool paths — are documented in
the usage guide.

GET /healthz always answers without auth so supervisors can probe liveness;
every other route requires the key when one is configured, compared in constant
time.

Client integration

Claude Code — register the server with the CLI (--scope user stores it in
~/.claude.json for every project):

claude mcp add --transport http --scope user filesystem http://localhost:3000/mcp \
  --header "X-DroidMCP-Key: $DROIDMCP_API_KEY"

Gemini CLI — ~/.gemini/settings.json:

{
  "mcpServers": {
    "filesystem": {
      "httpUrl": "http://localhost:3000/mcp",
      "headers": { "X-DroidMCP-Key": "<your-key>" }
    }
  }
}

Client on the device itself (Claude Code or Gemini CLI in Termux) — skip the
port and the key: with DROIDMCP_TRANSPORT=stdio the client launches the binary
and talks to it over stdin/stdout.

claude mcp add --env DROIDMCP_TRANSPORT=stdio --env DROIDMCP_ROOT="$HOME/workspace" \
  --transport stdio --scope user filesystem -- droidmcp-filesystem

Project-scoped .mcp.json, the Gemini stdio form, and the legacy SSE endpoint
are covered in the usage guide. Switch to
https://… once TLS is configured.

Security

The full threat model and production checklist live in
docs/security.md. The short version:

  • No dev mode for sensitive servers. filesystem, termux, media,
    sqlite, github, sms, automation, and calendar refuse to listen without an
    explicit key, and filesystem, media, and sqlite also require
    DROIDMCP_ROOT — so an unconfigured server can never act on / or run
    unauthenticated. Over stdio there is no listener, so no key is needed.
  • Loopback by design. Every listener binds 127.0.0.1 and checks the
    Host and Origin headers against DNS rebinding; exposure beyond the device
    is an explicit decision that requires a key and TLS.
  • Sandboxed paths. Absolute paths and .. are rejected, symlinks are
    resolved and containment re-checked on every path the servers touch;
    mcp-sqlite additionally binds all SQL values as parameters.
  • Conservative network defaults. mcp-scraper blocks private/loopback
    targets (SSRF) and mcp-network blocks public ones; both are explicit opt-ins.
  • mcp-termux is a remote shell. It will not start without
    DROIDMCP_TERMUX_ALLOWLIST (allowing everything takes an explicit *); give
    it a dedicated key, switch off the tools you don't use with
    DROIDMCP_TERMUX_DISABLED_TOOLS, and run it only when needed.
  • Redacted logs, signed releases. Secret-like attributes are replaced with
    [REDACTED]; releases ship SHA256SUMS with a cosign signature.

Development

cmd/<server>/       one main package per server (filesystem, github, scraper,
                    termux, network, clipboard, media, sqlite, sensors,
                    notifications, contacts, sms, llmproxy, automation,
                    calendar)
internal/           core — shared server (Streamable HTTP · SSE · stdio) ·
                    config · logger · pathsec (root containment) ·
                    proc (running external programs) · phone (SMS rules) ·
                    dnsconf (DNS on Android) · localtz (Android time zone) ·
                    termuxapi (Termux:API wrappers) · buildinfo
docs/               usage guide (EN/ES) · security · Termux setup
scripts/            reproducible ARM64 cross-build

Built with Go 1.26 on mark3labs/mcp-go,
google/go-github,
goquery,
modernc.org/sqlite,
mvdan.cc/sh, and
spf13/viper. CI enforces gofmt, go vet,
go test -race, golangci-lint, gosec, and govulncheck, and builds the
ARM64 target on every change; tagged releases are built reproducibly and
signed. Changes per release are in CHANGELOG.md.

Contributions are welcome — read CONTRIBUTING.md and check
ROADMAP.md for planned work. Report vulnerabilities privately, as
described in SECURITY.md.

License

Released under the MIT License.


Built on Android, for Android — by Ale.

Yorumlar (0)

Sonuc bulunamadi