3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

LINE Bot MCP Serverを使ってみた

Last updated at Posted at 2025-04-14

本日 LINE Bot MCP Server が公開されたようなので早速使ってみました。

使い方はREADMEにある通りです。

# READMEはtypoで git@github.com/line/... となっているので注意
git clone git@github.com:line/line-bot-mcp-server.git

cd line-bot-mcp-server && npm install && npm run build

チャンネルアクセストークンと受信者のユーザーIDは LINE Developers の Messaging API チャネルから取得できます。
(受信者を自分にする場合はチャネル基本設定の "あなたのユーザーID" にユーザーIDが記載されているのでこれをつかえます)

僕は VSCode の GitHub Copilot から使用するので、VSCodeの settings.json に下記を追加します。

    "mcp": {

        "inputs": [],
        "servers": {
            "line-bot": {
                "command": "node",
                "args": [
                  "/path/to/line-bot-mcp-server/dist/index.js"
                ],
                "env": {
                  "CHANNEL_ACCESS_TOKEN" : "...チャネルアクセストークン...",
                  "DESTINATION_USER_ID" : "...ユーザーID..."
                }
            }
        }
    },

ss2.png

現状で、下記の機能があるようです。

  • flexメッセージの送信
  • テキストメッセージの送信
  • プロフィール情報の取得

が、僕の環境では flex メッセージの送信機能をONにしていると Failed to validate tool 590_push_flex_message: TypeError: Cannot use 'in' operator to search for 'type' in true というエラーがでて使えなかったのでOFFにしました。

便利な使い方がまだちょっと思いつきませんが、未対応の機能も順次追加予定とのことなので今後も注目していきたいです。

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?