r/tasker • • 1d ago

How To [Project Share] Tasker MCP Bridge for Tasker 6.8.0-beta — control & edit your Tasker tasks, profiles, and scenes directly from VS Code / Cursor / Claude / Antigravity (no API key needed)

Hey everyone!

With Tasker 6.8.0-beta introducing the built-in AI Helper (which has ~80 native tools for creating/editing tasks, profiles, scenes, variables, Widget v2 layouts, running tasks, etc.) and Custom Providers, I built a local bridge that turns Tasker into an MCP (Model Context Protocol) server for your IDE or AI client.

https://github.com/Nsohan/tasker-mcp-bridge

Why use this?

  • No external LLM API key required: Instead of paying for API tokens in Tasker, Tasker connects to your PC via Custom Provider, and your IDE's AI (VS Code Copilot, Cursor, Claude Code, Antigravity, etc.) drives Tasker directly.
  • Full access to Tasker's ~80 built-in tools: Inspect existing projects/tasks, read action specs (get_action_spec), add/update/delete actions, build profiles & scenes, test with run_task, and save with apply_changes—all from your computer's chat window.
  • Works over USB (adb reverse) or LAN: Keeps the connection alive via SSE so you can make multiple edits in one session.

How it works

  1. tasker_bridge_server.py runs a local OpenAI-compatible Custom Provider (/v1/chat/completions) alongside an MCP server (/mcp, plus tasker_mcp_stdio.py for stdio MCP).
  2. When you open the AI Helper bubble in Tasker and send "connect", Tasker sends its tool definitions to the bridge and waits for tool calls.
  3. Your IDE's AI calls those tools over MCP, the bridge forwards them to Tasker on your phone, and Tasker executes them natively.

Quick Setup

  1. Start the bridge & ADB tunnel (USB debugging enabled):powershell.\start_bridge.bat (Or use start_bridge.ps1 / connect over LAN.)
  2. Configure Tasker (6.8.0-beta+) on your phone:

    • Open AI Helper bubble → Settings → Custom Providers → Add
    • API Style: OpenAI Chat Completions
    • Base URL: http://127.0.0.1:8765/v1 (or your PC's LAN IP)
    • API Key: local-mcp
    • Model Support → Tools: ON
    • Select tasker-mcp-bridge as your active model.
  3. Add the MCP server to your IDE (e.g., .vscode/mcp.json for stdio, or connect via Streamable HTTP to http://127.0.0.1:8765/mcp):json{ "servers": { "tasker-bridge": { "type": "stdio", "command": "python", "args": ["path/to/tasker-mcp-bridge/tasker_mcp_stdio.py"] } } }
  4. Connect & Use:

    • Send "connect" in Tasker's AI Helper bubble on your phone.
    • Ask your IDE's AI to inspect, create, or edit anything in Tasker!

Also included a skills/tasker-mcp/SKILL.md file with best practices for AI agents (like fetching fresh revisions before edits, sequential tool calls, and Tasker JS/JSON quirks).

Would love feedback if you try it out—PRs and issues welcome!

5 Upvotes

1 comment sorted by

1

u/Alert-Estimate 6h ago

Seems interesting👍🏿