tasker-mcp
Provides tools for interacting with Tasker on Android, enabling AI agents to inspect, create, edit, run, and manage tasks, profiles, projects, scenes, global variables, and Tasker action references through Tasker's HTTP Request event and XML import/export.
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., "@tasker-mcprun my Morning Routine task and show me the output"
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.
tasker-mcp
An MCP server that gives AI agents full read, edit, and run access to Tasker on Android. An agent can list and inspect every task, profile, project, and scene, create and edit them, run tasks and ad-hoc action lists, read and write global variables, and look up Tasker's action reference, all without you clicking through the Tasker editor. It works through Tasker's own HTTP Request event and its XML export/import, so the only thing on the phone is one small Tasker project: there is no Android app to install beyond Tasker itself.
Requirements
Tasker 6.2 or newer on the phone (the HTTP Request event is required). Tested on 6.6.20 and 6.7.6-beta.
Node 26 or newer on the machine that runs your MCP client.
adb is optional. It is the safest way to reach the phone (see Quickstart).
Related MCP server: Task API MCP
Quickstart
1. Install the phone project
Copy
tasker/TaskerMCP.prj.xmlfrom this repo to the phone (for example intoTasker/projects/in shared storage).In Tasker, long-press the project tab bar at the bottom, choose Import Project, and pick the file.
Run the
TaskerMCP.Setuptask once (open it and press play). It generates a token and flashes it. You can read it again later in the VARS tab as%TaskerMCP_Token.Make sure Tasker is enabled and the
TaskerMCP HTTPprofile is on.
2. Connect
adb (recommended). Attach the phone by USB or wireless debugging. When
TASKER_URLis unset and exactly one device is attached, tasker-mcp runsadb forwardfor port 1821 itself and talks tolocalhost, so the port never has to be reachable from the network. With several devices, setTASKER_ADB_SERIAL.Direct. The phone project refuses non-localhost callers by default. To use
TASKER_URL=http://<phone-ip>:1821on a network you trust, first set the global%TaskerMCP_AllowRemoteto1in Tasker's VARS tab. Read SECURITY.md: with remote access on, the token is the only protection.
Give the server the token with TASKER_TOKEN or, better, TASKER_TOKEN_FILE
(a file containing just the token).
3. Install the server
The package is not published to npm yet (the publish workflow currently runs
npm publish --dry-run). Until it is, build from source:
git clone https://github.com/pmaxhogan/tasker-mcp.git
cd tasker-mcp
npm ci
npm run build
claude mcp add tasker --scope user \
-e TASKER_TOKEN_FILE=/abs/path/to/tasker-token.txt \
-- node /abs/path/to/tasker-mcp/dist/index.jsOnce published, this becomes:
claude mcp add tasker --scope user \
-e TASKER_TOKEN_FILE=/abs/path/to/tasker-token.txt \
-- npx -y @pmaxhogan/tasker-mcpAny other MCP client that speaks stdio takes the same command in its JSON config:
{
"mcpServers": {
"tasker": {
"command": "node",
"args": ["/abs/path/to/tasker-mcp/dist/index.js"],
"env": {
"TASKER_TOKEN_FILE": "/abs/path/to/tasker-token.txt",
"TASKER_WRITE_ALLOW": "TaskerMCP.Test,TaskerMCP."
}
}
}
}Verify with the ping tool.
Configuration
Every option is an environment variable or a command line flag; flags win.
Env var | Flag | Default | Meaning |
|
| unset | Phone URL, e.g. |
|
| unset | Bearer token. |
|
| unset | File holding the token. Order: |
|
| unset | adb device serial when more than one is attached. |
|
|
| adb executable. |
|
|
| State directory (snapshots, docs cache). |
|
|
| Per-request timeout in milliseconds. |
|
| unset (everything) | Comma separated name prefixes. Mutating tools only touch objects whose name starts with one. |
|
|
| Allow whole-configuration imports (see below). |
Also --help and --version.
Safe mode for a real phone
Start a real phone like this until you trust your agent:
TASKER_WRITE_ALLOW=TaskerMCP.Test,TaskerMCP.Writes are then confined to objects named TaskerMCP.Test... or TaskerMCP....
(tasks, profiles, projects, scenes, globals), and whole-configuration imports
are off. Reads, runs, and snapshots are unaffected. Set
TASKER_ALLOW_CONFIG_IMPORT=true to allow deletes, renames, and profile edits
inside the allowed prefixes. Also pull a Tasker Data Backup before the first
write.
Tools
Tools that change your Tasker configuration or phone state are marked yes.
Raw XML
Tool | What it does | Mutates |
| The full Data Backup XML. | no |
| One task as TaskerData XML. | no |
| One profile as XML. | no |
| One project as XML. | no |
| One scene as XML. | no |
| Import a Task XML (replaced in place by name) or a full config. | yes |
Structured read and edit
Tool | What it does | Mutates |
| Projects and their contents. | no |
| Profiles with their contexts and tasks. | no |
| Tasks, optionally by project. | no |
| Scenes. | no |
| A task as JSON: actions with named, decoded args. | no |
| A profile as JSON. | no |
| A project as JSON. | no |
| Create a task from a JSON action list. | yes |
| Change the actions of a task. | yes |
| Delete a task (whole-configuration import). | yes |
| Create a profile (whole-configuration import). | yes |
| Edit a profile (whole-configuration import). | yes |
| Delete a profile (whole-configuration import). | yes |
| Move a task or profile into a project (whole-configuration import). | yes |
| Rename a task, profile, or project (whole-configuration import). | yes |
Run
Tool | What it does | Mutates |
| Run a task with | yes |
| Run an ad-hoc action list. Uses one reusable task, | yes |
| Stop a running task. | yes |
Variables, profiles, commands
Tool | What it does | Mutates |
| Read a global variable. | no |
| Set a global variable. | yes |
| All global variables. | no |
| Turn a profile on or off. | yes |
| Send a Tasker Command System text. | yes |
Action specs and docs
Tool | What it does | Mutates |
| An action by code or name: args with ids, names, and types. | no |
| Search the action table. | no |
| Action categories. | no |
| Search the Tasker userguide. | no |
| List userguide pages. | no |
| One userguide page. | no |
| Re-download the docs cache. | no |
Logs
Tool | What it does | Mutates |
| Tasker lines from logcat (needs adb and Tasker's "Debug To System Log"); redacts the token. | no |
| Explains that Tasker has no action that exports the Run Log, and points at | no |
Snapshots
Tool | What it does | Mutates |
| Saved snapshots, newest first. | no |
| Save a snapshot of the current configuration. | no |
| Restore a snapshot (whole-configuration import). | yes |
Per-task tools and connection
Any task whose comment (its description in Tasker) contains #mcp becomes a tool
named tasker_<name>, with the rest of the comment as its description and the
task's Task Variables as arguments (the convention from dceluis/tasker-mcp).
Calling it runs the task, so it mutates whatever the task does.
refresh_tools re-reads the configuration and tells the client when the set
changed. ping checks the connection.
Safety net
Snapshot before every mutation. Each write first fetches a full backup and saves it under
~/.tasker-mcp/snapshots, keeping the newest 20. Undo withrestore_snapshot.Verify-readback. After an import the server re-fetches the configuration and checks that the change landed, and reports a mismatch instead of assuming success.
Validation. Edits are checked against the action table (arg ids and types) before anything is sent.
Unknown action codes are allowed as raw XML, so a new Tasker action is not blocked by an out-of-date table.
Write policy. See safe mode above.
How it works
The phone runs a Tasker project with one HTTP Request profile and a JavaScript dispatcher. This server talks to it over HTTP and does all XML parsing, editing, and validation on the desktop. The design and the reasoning behind each decision are in docs/architecture.md. The route table and the Tasker behaviour verified on a device are in tasker/README.md.
Limitations
Imported new tasks always land in the default
Baseproject. Usemove_to_projectafterwards.Tasker's Import Data only takes tasks or a whole configuration. Profile, project, rename, and delete edits therefore replace the whole configuration, which restarts Tasker's monitor for about 3 seconds. The server waits for the phone to answer again.
The Run Log cannot be exported by any Tasker action. Use
get_logcat.Scenes are read-only.
Trial builds of Tasker work as the full app while the trial lasts; behaviour after it expires is Tasker's, not this project's.
Docs search
The Tasker userguide is scraped weekly by a GitHub Action into the orphan
docs-data branch of this repo and downloaded to ~/.tasker-mcp/docs on first
use of a docs tool. The text is (c) joaoapps and is never committed to main
or shipped in the npm package.
Development
npm ci
git config core.hooksPath .githooks # gitleaks pre-push hook
npm run build
npm test # unit and XML fixture tests (what CI runs)
npm run test:coverage # with v8 coverage
npm run coverage:ratchet # fail if coverage dropped more than 0.5 points
npm run test:device # live tests against an emulator or phone, never in CI
npm run lint # eslint plus the ASCII dash check
npm run format
npm run typecheckscripts/device/ holds the emulator drivers (import-project.mjs,
add-actions.mjs, ui.mjs); they default ANDROID_SERIAL to the emulator. See
CONTRIBUTING.md.
Releasing
publish.yml runs on every push to main and publishes a patch release. The
version is computed from the registry (latest published patch + 1, never below
the major.minor.0 floor in package.json) and is not committed back. The job
installs with --ignore-scripts and publishes with provenance. It is armed only
when npm auth exists; otherwise it runs npm publish --dry-run and skips the
tag. Set up one of:
Option A: NPM_TOKEN secret
On npmjs.com, create a granular access token with publish rights for
@pmaxhogan/tasker-mcp(or for the@pmaxhoganscope).In the GitHub repo: Settings > Secrets and variables > Actions > New repository secret, name
NPM_TOKEN, paste the token.Push to
main.
Option B: trusted publishing (OIDC)
On npmjs.com, open the package settings, find Trusted Publisher, choose GitHub Actions, and enter owner
pmaxhogan, repositorytasker-mcp, workflowpublish.yml.In the GitHub repo: Settings > Secrets and variables > Actions > Variables > New repository variable, name
NPM_TRUSTED_PUBLISHING, valuetrue.Push to
main.
Credits
Tasker by joaoapps. Action names, labels, and help text are extracted from the Tasker app for interoperability.
MapTasker (MIT): the action table.
Tasker-XML-Info (MIT): action codes.
dceluis/tasker-mcp (MIT): the per-task
#mcptool convention.
Licenses and notices for the bundled data are in data/NOTICE.
License
MIT, see LICENSE.
Available Tools
1 toolpingPingA
Check that the tasker-mcp server itself is alive. Example: ping {}
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it discloses only that the check targets the server itself. It says nothing about the response shape, latency, or side effects, though for a stateless liveness probe there is little behavior to disclose.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, with the purpose front-loaded ahead of the invocation example. Nothing is wasted, though the 'ping {}' example is largely redundant given the already-empty schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers purpose and invocation, but with no output schema it does not tell the agent what a successful response looks like (e.g., a pong or status payload), leaving a small but real gap for a health-check tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, which is the baseline-4 case; the empty schema already conveys this fully, and the example 'ping {}' reinforces that no arguments are needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a specific verb ('Check') and an explicit resource/scope ('the tasker-mcp server itself is alive'), so the agent knows this is a liveness probe rather than a task operation. No siblings exist, so there is nothing to differentiate against, which keeps it just short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the nature of a ping (use it to verify the server is reachable), but the description never states when to reach for it versus another tool, nor any condition under which it should not be used. Adequate but with a clear gap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
ping
TDQS
Scored across 1 tool
There is only one tool, so there is no risk of confusing it with another tool. Its purpose as a liveness check is clear from the description.
A single tool named 'ping' is readable and conventional, but there is no multi-tool pattern to establish consistency across. It is neither inconsistent nor a strong example of a predictable verb_noun convention.
The server is named tasker-mcp, implying task-management functionality, but exposes only a single trivial health-check tool. This is an extreme mismatch between the apparent domain and the tool surface.
No task-related operations such as create, list, update, or delete are present. The surface cannot support any actual task management workflow, making it severely incomplete.
Maintenance
Related MCP Connectors
- mcp-serverOAuthcom.make
Give your AI agents the tools to build, manage, and run automation workflows.
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.
Task management for people and AI agents, with scoped OAuth access to issues, projects, and docs.
Task management for people and AI agents, with scoped OAuth access to issues, projects, and docs.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to control Android phones via MCP and HTTP. Supports screen capture, taps, swipes, text input, and app management.6AGPL 3.0
- AlicenseBqualityDmaintenanceEnables AI clients to create and manage tasks via a local REST API by converting natural language into HTTP requests through the Model Context Protocol.1MIT
- FlicenseBqualityAmaintenanceEnables an AI agent to control an Android phone over a private Tailscale network via accessibility UI automation, screenshots, gestures, notifications, clipboard, intents, SAF file access, and optional Termux/Shizuku shells without root or ADB.65-
- AlicenseAqualityCmaintenanceEnables AI agents to control, inspect, and automate Android devices, Waydroid containers, and AVD emulators over ADB. Provides tools for screenshots, UI-hierarchy text-based tapping, gestures, key presses, text input, app management, and raw shell commands.12MIT