Skip to content
Back to search

line-desktop-mcp

透過 MCP(Model Context Protocol),使 AI 工具能夠與 LINE Desktop 整合,並執行訊息的讀取與發送操作。Through the MCP (Model Context Protocol), AI tools can be integrated with LINE Desktop to perform message reading and sending operations.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/dtwang--line-desktop-mcp/badge.svg)](/listings/dtwang--line-desktop-mcp)

HTML

<a href="/listings/dtwang--line-desktop-mcp"><img src="/api/listings/dtwang--line-desktop-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Windows

1. **Install Node.js** - Follow Microsoft's official guide: https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows

2. **Install AutoHotkey v2** - Download and install: https://www.autohotkey.com/

3. **Configure Claude Desktop** - Open Claude Desktop configuration file - Add the following to `mcpServers`:

{
  "mcpServers": {
    "line-desktop-mcp": {
      "command": "npx",
      "args": ["line-desktop-mcp@latest"]
    }
  }
}

macOS

1. **Install Node.js** - Using Homebrew: `brew install node` - Or download from: https://nodejs.org/

2. **(Optional) Install cliclick** - If Homebrew is installed, it will be automatically installed on startup - Or install manually: `brew install cliclick`

3. **Configure Claude Desktop** - Open Claude Desktop configuration file - Add the following to `mcpServers`:

{
  "mcpServers": {
    "line-desktop-mcp": {
      "command": "npx",
      "args": ["line-desktop-mcp@latest"]
    }
  }
}

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 415 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # LINE Desktop MCP
  2. [English](#english) | [繁體中文](#繁體中文)
  3. ---
  4. ## 繁體中文
  5. 透過 MCP(Model Context Protocol),使 AI 工具能夠與 LINE Desktop 整合,並執行訊息的讀取與發送操作。
  6. ![LINE Desktop MCP Demo with Claude Desktop](doc_media/line-desktop-demo-4x.gif)
  7. ![LINE Desktop MCP Demo with n8n](doc_media/line-desktop-mcp-demo-n8n-2x.gif)
  8. ### ⚠️ 重要說明
  9. **這個專案不是 LINE 官方的 line-bot-mcp-server**
  10. 如果你要找的是官方版本,請前往:https://github.com/line/line-bot-mcp-server
  11. ### 與官方版本的差異
  12. - **官方 line-bot-mcp-server**:透過 LINE Messaging API 操作 LINE Bot
  13. - **本專案 line-desktop-mcp**:透過 MCP 在 Windows 或 Mac 上直接操作 LINE Desktop 應用程式
  14. ### 重要聲明
  15. 1. **本專案與 LINE 官方無任何關聯**
  16. This project is NOT officially affiliated with LINE.
  17. 2. **無需申請 LINE Developers 或使用 Channel Access Token**
  18. 本專案透過已經完成登入的 LINE Desktop 應用程式進行操作,不需要申請開發者帳號或 API Token。
  19. ### 關於專案
  20. LINE Desktop MCP 是一個基於 Model Context Protocol 的整合工具,讓 AI 工具(如 Claude Desktop, n8n ),能夠直接與 LINE Desktop 應用程式互動。透過此專案,您可以:
  21. - 📖 讀取 LINE 聊天訊息
  22. - ✉️ 發送 LINE 訊息(手動或自動)
  23. - 🤖 將 LINE 整合到您的 AI 工作流程中
  24. ### 功能特色
  25. - 🤖 **AI 整合**:透過 MCP 協議與 Claude Desktop、 n8n 等 AI 工具無縫整合
  26. - 💬 **訊息操作**:支援讀取和發送 LINE 訊息
  27. - 🖥️ **桌面整合**:直接與 LINE Desktop 應用程式互動
  28. - 🔄 **自動化支援**:可選擇手動確認或自動發送訊息
  29. ### 系統需求
  30. #### 基本需求
  31. - **LINE Desktop**:v9.10 或以上版本
  32. - **作業系統**:
  33. - Windows 10 或以上版本
  34. - macOS Ventura 13.0 或以上版本(需要 AppleScript 支援)
  35. #### 與 Claude Desktop 整合
  36. - **Claude Desktop App**:最新版本
  37. - **Claude 訂閱方案**:Pro 方案
  38. #### 與 n8n 整合
  39. - **n8n**:支援 MCP 的版本
  40. ### 安裝方式
  41. #### Windows
  42. 1. **安裝 Node.js**
  43. - 參考微軟官方文件:https://learn.microsoft.com/zh-tw/windows/dev-environment/javascript/nodejs-on-windows
  44. 2. **安裝 AutoHotkey v2**
  45. - 下載並安裝:https://www.autohotkey.com/
  46. 3. **設定 Claude Desktop**
  47. - 開啟 Claude Desktop 設定檔
  48. - 在 `mcpServers` 中加入以下設定:
  49. ```json
  50. {
  51. "mcpServers": {
  52. "line-desktop-mcp": {
  53. "command": "npx",
  54. "args": ["line-desktop-mcp@latest"]
  55. }
  56. }
  57. }
  58. ```
  59. #### macOS
  60. 1. **安裝 Node.js**
  61. - 使用 Homebrew:`brew install node`
  62. - 或從官網下載:https://nodejs.org/
  63. 2. **(選擇性)安裝 cliclick**
  64. - 如果有安裝 Homebrew,會於啟動時自動安裝
  65. - 或手動安裝:`brew install cliclick`
  66. 3. **設定 Claude Desktop**
  67. - 開啟 Claude Desktop 設定檔
  68. - 在 `mcpServers` 中加入以下設定:
  69. ```json
  70. {
  71. "mcpServers": {
  72. "line-desktop-mcp": {
  73. "command": "npx",
  74. "args": ["line-desktop-mcp@latest"]
  75. }
  76. }
  77. }
  78. ```
  79. ### 進階設定
  80. #### Streamable HTTP 模式
  81. 除了預設的 stdio 模式外,本專案也支援透過 Streamable HTTP 方式運行。此模式特別適合在 **n8n** 等支援 MCP 的平台中使用。
  82. **啟動 Streamable HTTP 模式:**
  83. ```bash
  84. # 本機使用(僅 localhost)
  85. npx line-desktop-mcp@latest --http-mode --port 3000
  86. # 開放外部連線(需搭配 token)
  87. npx line-desktop-mcp@latest --http-mode --host 0.0.0.0 --port 3000 --token YOUR_SECRET
  88. ```
  89. **參數說明:**
  90. - `--http-mode`:啟用 Streamable HTTP 模式,使用 HTTP streaming 而非 stdio
  91. - `--port <port>`:指定 HTTP 伺服器的 port(預設:3000)
  92. - `--host <host>`:指定綁定的網路介面(預設:`127.0.0.1`)
  93. - `--token <secret>`:設定 Bearer Token 驗證密鑰。當 `--host` 設為非 loopback 位址時為必填,以確保安全性
  94. **MCP 端點配置:**
  95. 本機連接:
  96. ```
  97. http://127.0.0.1:3000/mcp
  98. ```
  99. Docker 中的 n8n 連接(同一台機器):
  100. ```
  101. http://host.docker.internal:3000/mcp
  102. ```
  103. **傳輸方式:**
  104. - POST 請求:發送 JSON-RPC 訊息並透過 SSE stream 接收回應
  105. - 支援 session 管理,每個連接會獲得唯一的 session ID
  106. **n8n 工作流程範例:**
  107. 如果您想在 n8n 中使用 LINE Desktop MCP,可以下載我們提供的範例工作流程檔案:
  108. - 📥 [下載 n8n 工作流程範例](doc_media/LINE-Desktop-MCP-Demo-chatbot-sample.json)
  109. 此範例展示如何在 n8n 中整合 LINE Desktop MCP 建立聊天機器人工作流程。
  110. ### 使用方式
  111. 在 Claude Desktop 的對話中,您可以使用以下方式操作 LINE:
  112. #### 1. 讀取聊天內容
  113. ```
  114. 請幫我讀取 LINE 群組『專案討論』的訊息,並作出總結
  115. ```
  116. #### 2. 發送訊息(手動確認)
  117. ```
  118. 請幫我撰寫一個問候,發送到 LINE 群組『專案討論』中
  119. ```
  120. Claude 會先撰寫訊息內容,等待您確認後再發送。
  121. #### 3. 發送訊息(自動送出)
  122. ```
  123. 請幫我撰寫一個問候,發送到 LINE 群組『專案討論』中,並自動發送
  124. ```
  125. Claude 會撰寫訊息並自動完成發送動作。
  126. ### 使用注意事項
  127. #### 重要提醒
  128. 1. **避免干擾自動化操作**
  129. 本工具透過圖形使用者介面(GUI)進行自動化操作。在自動化程式執行期間,請勿同時使用滑鼠進行其他操作,以免干擾程式運作。
  130. 2. **LINE Desktop 視窗配置要求**
  131. 請確保 LINE Desktop 使用「展開聊天視窗」模式。在此模式下,聊天視窗會固定顯示在聊天室清單的右側,而非以獨立視窗方式開啟。
  132. 3. **多顯示器環境配置**
  133. 若您使用多個顯示器,請將 LINE Desktop 應用程式放置於主要顯示器(第一個顯示器)上,以確保自動化功能正常運作。
  134. ### 授權條款
  135. 本專案採用 MIT 授權條款 - 詳見 [LICENSE.md](LICENSE.md) 檔案
  136. ### 作者
  137. **Geoffrey Wang**
  138. - GitHub: [@dtwang](https://github.com/dtwang)
  139. - Threads: [@geoff_spacetime](https://www.threads.com/@geoff_spacetime)
  140. ---
  141. ## English
  142. Integrate AI tools with LINE Desktop through MCP (Model Context Protocol) to enable message reading and sending operations.
  143. ![LINE Desktop MCP Demo with Claude Desktop](doc_media/line-desktop-demo-4x.gif)
  144. ![LINE Desktop MCP Demo with n8n](doc_media/line-desktop-mcp-demo-n8n-2x.gif)
  145. ### ⚠️ Important Notice
  146. **This project is NOT the official LINE line-bot-mcp-server**
  147. If you're looking for the official version, please visit: https://github.com/line/line-bot-mcp-server
  148. ### Differences from Official Version
  149. - **Official line-bot-mcp-server**: Operates LINE Bot through LINE Messaging API
  150. - **This project line-desktop-mcp**: Directly operates LINE Desktop application on Windows or Mac through MCP
  151. ### Important Disclaimer
  152. 1. **This project is NOT officially affiliated with LINE**
  153. 本專案與 LINE 官方無任何關聯。
  154. 2. **No need to apply for LINE Developers or use Channel Access Token**
  155. This project operates through the already logged-in LINE Desktop application, without requiring developer account registration or API tokens.
  156. ### About
  157. LINE Desktop MCP is an integration tool based on the Model Context Protocol that allows AI tools (such as Claude Desktop, n8n ) to interact directly with the LINE Desktop application. With this project, you can:
  158. - 📖 Read LINE chat messages
  159. - ✉️ Send LINE messages (manual or automatic)
  160. - 🤖 Integrate LINE into your AI workflows
  161. ### Features
  162. - 🤖 **AI Integration**: Seamlessly integrate with AI tools like Claude Desktop, n8n through the MCP protocol
  163. - 💬 **Message Operations**: Support for reading and sending LINE messages
  164. - 🖥️ **Desktop Integration**: Direct interaction with the LINE Desktop application
  165. - 🔄 **Automation Support**: Choose between manual confirmation or automatic message sending
  166. ### System Requirements
  167. #### Basic Requirements
  168. - **LINE Desktop**: v9.10 or above
  169. - **Operating System**:
  170. - Windows 10 or above
  171. - macOS Ventura 13.0 or above (requires AppleScript support)
  172. #### Integration with Claude Desktop
  173. - **Claude Desktop App**: Latest version
  174. - **Claude Subscription**: Pro plan
  175. #### Integration with n8n
  176. - **n8n**: Version with MCP support
  177. ### Installation
  178. #### Windows
  179. 1. **Install Node.js**
  180. - Follow Microsoft's official guide: https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows
  181. 2. **Install AutoHotkey v2**
  182. - Download and install: https://www.autohotkey.com/
  183. 3. **Configure Claude Desktop**
  184. - Open Claude Desktop configuration file
  185. - Add the following to `mcpServers`:
  186. ```json
  187. {
  188. "mcpServers": {
  189. "line-desktop-mcp": {
  190. "command": "npx",
  191. "args": ["line-desktop-mcp@latest"]
  192. }
  193. }
  194. }
  195. ```
  196. #### macOS
  197. 1. **Install Node.js**
  198. - Using Homebrew: `brew install node`
  199. - Or download from: https://nodejs.org/
  200. 2. **(Optional) Install cliclick**
  201. - If Homebrew is installed, it will be automatically installed on startup
  202. - Or install manually: `brew install cliclick`
  203. 3. **Configure Claude Desktop**
  204. - Open Claude Desktop configuration file
  205. - Add the following to `mcpServers`:
  206. ```json
  207. {
  208. "mcpServers": {
  209. "line-desktop-mcp": {
  210. "command": "npx",
  211. "args": ["line-desktop-mcp@latest"]
  212. }
  213. }
  214. }
  215. ```
  216. ### Advanced Configuration
  217. #### Streamable HTTP Mode
  218. In addition to the default stdio mode, this project also supports running via Streamable HTTP. This mode is particularly suitable for use with platforms like **n8n** that support MCP.
  219. **Start Streamable HTTP Mode:**
  220. ```bash
  221. # Local use (localhost only)
  222. npx line-desktop-mcp@latest --http-mode --port 3000
  223. # Allow external connections (token required)
  224. npx line-desktop-mcp@latest --http-mode --host 0.0.0.0 --port 3000 --token YOUR_SECRET
  225. ```
  226. **Parameters:**
  227. - `--http-mode`: Enable Streamable HTTP mode, using HTTP streaming instead of stdio
  228. - `--port <port>`: Specify the HTTP server port (default: 3000)
  229. - `--host <host>`: Specify the network interface to bind (default: `127.0.0.1`)
  230. - `--token <secret>`: Set Bearer Token authentication secret. Required when `--host` is set to a non-loopback address for security
  231. **MCP Endpoint Configuration:**
  232. Local connection:
  233. ```
  234. http://127.0.0.1:3000/mcp
  235. ```
  236. n8n in Docker (same machine):
  237. ```
  238. http://host.docker.internal:3000/mcp
  239. ```
  240. **Transport Method:**
  241. - POST requests: Send JSON-RPC messages and receive responses via SSE stream
  242. - Supports session management with unique session IDs for each connection
  243. **n8n Workflow Example:**
  244. If you want to use LINE Desktop MCP in n8n, you can download our sample workflow file:
  245. - 📥 [Download n8n Workflow Example](doc_media/LINE-Desktop-MCP-Demo-chatbot-sample.json)
  246. This example demonstrates how to integrate LINE Desktop MCP in n8n to create a chatbot workflow.
  247. ### Usage
  248. In Claude Desktop conversations, you can interact with LINE in the following ways:
  249. #### 1. Read Chat Messages
  250. ```
  251. Please read the messages from LINE group 'Project Discussion' and summarize them
  252. ```
  253. #### 2. Send Messages (Manual Confirmation)
  254. ```
  255. Please write a greeting and send it to LINE group 'Project Discussion'
  256. ```
  257. Claude will compose the message and wait for your confirmation before sending.
  258. #### 3. Send Messages (Automatic)
  259. ```
  260. Please write a greeting and send it to LINE group 'Project Discussion', and send it automatically
  261. ```
  262. Claude will compose the message and automatically complete the sending action.
  263. ### Usage Precautions
  264. #### Important Reminders
  265. 1. **Avoid Interfering with Automation**
  266. This tool performs automation through the graphical user interface (GUI). During automated operations, please refrain from using the mouse for other tasks to prevent interference with the program's execution.
  267. 2. **LINE Desktop Window Configuration**
  268. Please ensure that LINE Desktop is configured in "Expanded Chat Window" mode. In this mode, the chat window remains docked to the right side of the chat list, rather than opening as a separate independent window.
  269. 3. **Multi-Monitor Setup**
  270. If you are using multiple monitors, please ensure that the LINE Desktop application is positioned on the primary display (first monitor) for the automation to function correctly.
  271. ### License
  272. This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
  273. ### Author
  274. **Geoffrey Wang**
  275. - GitHub: [@dtwang](https://github.com/dtwang)
  276. - Threads: [@geoff_spacetime](https://www.threads.com/@geoff_spacetime)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.