DT

dceluis/tasker-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

53 stars 11 forks 质量 65 趋势 0MIT

dceluis/tasker-mcp 是从 https://github.com/dceluis/tasker-mcp. 导入的 MCP 服务器候选。

概览

dceluis/tasker-mcp 是从 https://github.com/dceluis/tasker-mcp. 导入的 MCP 服务器候选。

概述(AI 翻译)

本文档将指导你如何设置和运行Tasker MCP集成,包括安装依赖、准备服务器和更新任务的说明。


使用指南

步骤1:导入Tasker配置文件

  • 将dist/mcp_server.prj.xml导入你的Tasker应用。
  • 导入后,运行 MCP generate_api_key 任务生成 API 密钥以实现安全访问。

步骤2:选择并运行你的服务器

CLI 服务器:

  • 从 dist/ 文件夹中,选择适合您设备架构的 CLI 服务器二进制文件,例如 tasker-mcp-server-cli-aarch64。
  • 将二进制文件和toolDescriptions.json文件复制到你的设备(手机或电脑)。
  • 复制后将二进制重命名为mcp-server。

示例:

使用 scp:

使用 adb push:

  • 以SSE模式运行服务器,支持:

  • 或者通过stdio传输方式呼叫:

命令行旗标

tasker-mcp-server-cli 应用程序接受以下标志:

  • --tools:指向带有Tasker工具定义的JSON文件的路径。
  • --host:用于监听SSE服务器的主机地址(默认:0.0.0.0)。
  • --port:用于监听SSE服务器的端口(默认:8000。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Tasker MCP

This document will guide you through setting up and running the Tasker MCP integration, including instructions for installing dependencies, preparing servers, and updating tasks.


Usage Guide

Step 1: Import the Tasker Profile

  • Import dist/mcp_server.prj.xml into your Tasker app.
  • After importing, run the MCP generate_api_key task to generate an API key for secure access.

Step 2: Select and Run Your Server

CLI Server:

  • From the dist/ folder, select the correct CLI server binary for your device’s architecture, such as tasker-mcp-server-cli-aarch64.
  • Copy both the binary and the toolDescriptions.json file to your device (phone or PC).
  • Rename the binary to 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
  • Run the server in SSE mode with:
./mcp-server --tools /path/to/toolDescriptions.json --tasker-api-key=tk_... --mode sse
  • Or call it through the stdio transport:
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_...

Command-Line Flags

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.

Step 3: Connect Your MCP-enabled App

  • Connect your MCP-enabled application by pointing it to the running server.

Example Configuration for Claude Desktop with stdio transport

{
  "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"
      ]
    }
  }
}

Building the CLI Server Yourself

Unix/Linux:

  • Install Go using your package manager:
sudo apt-get install golang-go
  • Build the CLI server (cross-compiling example for ARM64):
cd cli
GOOS=linux GOARCH=arm64 go build -o dist/tasker-mcp-server-cli-aarch64 main.go

Updating the MCP Profile with Additional Tasks

Due to limitations in Tasker’s argument handling, follow these steps carefully to mark tasks as MCP-enabled:

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "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" ] } } }