This document will guide you through setting up and running the Tasker MCP integration, including instructions for installing dependencies, preparing servers, and updating tasks.
dist/mcp_server.prj.xml
into your Tasker app.MCP generate_api_key
task to generate an API key for secure access.CLI Server:
dist/
folder, select the correct CLI server binary for your device's architecture, such as tasker-mcp-server-cli-aarch64
.toolDescriptions.json
file to your device (phone or PC).mcp-server
after copying.Example:
Using scp
:
scp dist/tasker-mcp-server-cli-aarch64 user@phone_ip:/data/data/com.termux/files/home/mcp-server
Using adb push
:
adb push dist/tasker-mcp-server-cli-aarch64 /data/data/com.termux/files/home/mcp-server
./mcp-server --tools /path/to/toolDescriptions.json --tasker-api-key=tk_... --mode sse
payload='{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "tasker_flash_text", "arguments": { "text": "Hi" } } }'
echo $payload | ./mcp-server --tools /path/to/toolDescriptions.json --tasker-api-key=tk_...
The tasker-mcp-server-cli
application accepts the following flags:
--tools
: Path to JSON file with Tasker tool definitions.--host
: Host address to listen on for SSE server (default: 0.0.0.0
).--port
: Port to listen on for SSE server (default: 8000
).--mode
: Transport mode: sse
, or stdio
(default: stdio
).--tasker-host
: Tasker server host (default: 0.0.0.0
).--tasker-port
: Tasker server port (default: 1821
).--tasker-api-key
: The Tasker API Key.{
"mcpServers": {
"tasker": {
"command": "/home/luis/tasker-mcp/dist/tasker-mcp-server-cli-x86_64",
"args": [
"--tools",
"/home/luis/tasker-mcp/dist/toolDescriptions.json",
"--tasker-host",
"192.168.1.123",
"--tasker-api-key",
"tk_...",
"--mode",
"stdio"
]
}
}
}
sudo apt-get install golang-go
cd cli
GOOS=linux GOARCH=arm64 go build -o dist/tasker-mcp-server-cli-aarch64 main.go
Due to limitations in Tasker's argument handling, follow these steps carefully to mark tasks as MCP-enabled:
Tasker supports only two positional arguments (par1
, par2
). To work around this, we'll use Task Variables:
After setting the above values you can also set some additional metadata:
number
, string
, onoff
, etc).Prompt
field.Same as Value
field is checked.Note: Temporarily enable "Configure on Import" to set the Prompt description if hidden, then disable it again. The prompt will survive.\
These steps will make sure valid tool descriptions can be generated when we export our custom project later.
Task Variables cannot be pass-through from other tasks, though, so we need to do one last thing in order to get all the variables from the MCP request properly set.
Copy the action MCP#parse_args
to the top of your MCP task to enable argument parsing. You can get this from any of the default tasks. But do not modify this action!
Now your custom tasks are ready:
mcp-server
project and save it on your PC.cd utils
npm install
node xml-to-tools.js /path/to/your/exported/mcp_server.prj.xml > toolDescriptions.json
Use this toolDescriptions.json
file with your server.
Happy automation!
{
"mcpServers": {
"tasker": {
"env": {},
"args": [
"--tools",
"/home/luis/tasker-mcp/dist/toolDescriptions.json",
"--tasker-host",
"192.168.1.123",
"--tasker-api-key",
"tk_...",
"--mode",
"stdio"
],
"command": "uv"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.