Skip to content

cj-elevate/tasker-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

type doc project updated
doc
readme
tasker-mcp
2026-01-12

tasker-mcp

MCP server for LLM-driven Android phone automation via Tasker.

Hardened fork of dceluis/tasker-mcp with security fixes and platform integration.

Features

Control your Android phone from Claude or any MCP client:

Category Tools
Clipboard tasker_set_clipboard, tasker_get_clipboard
Voice tasker_say (TTS), tasker_play_music
Communication tasker_send_sms, tasker_call_number, tasker_get_contacts
Media tasker_take_photo, tasker_screenshot
Device tasker_get_battery_level, tasker_get_location
Settings tasker_set_volume, tasker_toggle_wifi, tasker_toggle_flashlight
Utilities tasker_set_alarm, tasker_flash_text, tasker_browse_url

Requirements

  • Android phone with Tasker installed
  • Tailscale for secure network access (recommended)
  • Go 1.21+ for building from source

Quick Start

1. Set Up Tasker on Phone

  1. Import dist/mcp_server.prj.xml into Tasker
  2. Run the MCP generate_api_key task to create an API key
  3. Note the generated key (format: tk_...)

2. Build the Server

# Clone and build
cd D:\servers\tasker-mcp
cd cmd && go build -o ../bin/tasker-mcp .

# Or build for Android (to run on phone)
GOOS=linux GOARCH=arm64 go build -o ../bin/tasker-mcp-arm64 .

3. Run the Server

# STDIO mode (for Claude Desktop)
./bin/tasker-mcp \
  --tools dist/toolDescriptions.json \
  --tasker-host 100.x.x.x \
  --tasker-api-key tk_your_key

# SSE mode (for remote clients like master-mcp-proxy)
./bin/tasker-mcp \
  --tools dist/toolDescriptions.json \
  --tasker-host 100.x.x.x \
  --tasker-api-key tk_your_key \
  --mode sse \
  --host 127.0.0.1 \
  --port 8000

4. Configure Claude Desktop

Add to your Claude Desktop config:

{
  "mcpServers": {
    "tasker": {
      "command": "D:/servers/tasker-mcp/bin/tasker-mcp.exe",
      "args": [
        "--tools", "D:/servers/tasker-mcp/dist/toolDescriptions.json",
        "--tasker-host", "100.x.x.x",
        "--tasker-api-key", "tk_your_key"
      ]
    }
  }
}

Command-Line Flags

Flag Default Description
--tools (required) Path to tool definitions JSON
--mode stdio Transport: stdio or sse
--host 127.0.0.1 SSE bind address
--port 8000 SSE port
--tasker-host (required) Phone IP (use Tailscale IP)
--tasker-port 1821 Tasker HTTP port
--tasker-api-key (required) API key from Tasker

Security

This fork includes security hardening over the original:

Issue Fix
SSE bound to 0.0.0.0 Now defaults to 127.0.0.1
No auth enforcement Fails closed if API key unset
No request timeout 30s timeout added
Verbose logging Sensitive args redacted
Type assertion panic Guarded with fallback

Network Security: Always use Tailscale to connect to your phone. Never expose Tasker's HTTP server directly to the internet.

Adding Custom Tasks

  1. Create a new task in Tasker with a comment (becomes tool description)
  2. Configure task variables as tool arguments (see original docs)
  3. Add MCP#parse_args action at the top of your task
  4. Export the project from Tasker
  5. Generate new tool definitions:
cd utils
node xml-to-tools.js /path/to/exported.prj.xml > ../dist/toolDescriptions.json

Directory Structure

tasker-mcp/
  cmd/           # Go source
    main.go      # MCP server entry point
    go.mod       # Go module
  dist/          # Tasker artifacts
    toolDescriptions.json   # Tool definitions
    mcp_server.prj.xml      # Tasker profile
  utils/         # Build tools
    xml-to-tools.js         # XML to JSON converter
  bin/           # Built binaries (gitignored)
  docs/          # Documentation

Credits

  • Original implementation: dceluis/tasker-mcp
  • Security review: Codex
  • Platform integration: CJ

License

MIT License - see original repository for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages