Ask your AI

Copy this and paste it into ChatGPT, Claude or another assistant to get an answer based on this site.

How do I connect LINE Official Account to an AI agent? Please use this URL as a reference:
https://agentok.jp/en/services/line-official-account.md
Chat

How to connect LINE Official Account to AI agents

TL;DR

The short answer
VerdictOfficial, individuals OK Individuals can connect through an official route (MCP, connector or API) without a business contract or review
Who can use itOperators of LINE Official Accounts (individuals and companies). An official account can be created for free, and the Messaging API and the official MCP server can be used from the free Communication plan (up to 200 messages per month).
MethodOfficial MCP
PricingPricing follows the LINE Official Account plans: Communication at 0 yen (up to 200 messages per month), Light at 5,000 yen per month (up to 5,000), and Standard at 15,000 yen per month (up to 30,000, with extra messages billed per message beyond that). All prices exclude tax. Reply messages do not count toward the quota.
RiskThe channel access token has no scopes: a single token can do everything up to broadcasting to all friends. Both a token leak and an agent's accidental send have a large blast radius.

There is an official MCP server from LINE (open source, run locally) that lets agents push messages, broadcast, fetch profiles, and manage rich menus. Authentication is a channel access token, and the lack of scopes on that token is the biggest caveat. Note that this operates an official account (a bot), not a personal LINE account's chats.

AuthenticationChannel access token
Checked by the operator2026.12.05
How the operator checkedChecked against official documentation

For AI agents: Markdown ・ JSON

Official MCP and AI guides

Official MCP serverYes

Hosting: Local

An open-source MCP server from LY Corporation (Apache-2.0). Run the npm package @line/line-bot-mcp-server locally via npx or Docker. The README states it is a preview (latest version v0.5.0). It calls the Messaging API internally. A group summary tool has been added on the GitHub main branch but is not included in the published npm v0.5.0.

https://github.com/line/line-bot-mcp-server

Official guide for AI agentsUnverified

LINE Developers documentation and the official OpenAPI definitions (line/line-openapi) are public. Whether an llms.txt is offered is unverified.

Tools of the official MCP server

ToolTypeWhat it does
push_text_messageWriteユーザーにテキストメッセージをプッシュ送信する
push_flex_messageWriteユーザーにFlexメッセージをプッシュ送信する
broadcast_text_messageWrite全友だちにテキストメッセージを一斉配信する
broadcast_flex_messageWrite全友だちにFlexメッセージを一斉配信する
get_profileReadユーザーのプロフィール(表示名、画像URL、ステータスメッセージ、言語)を取得する
get_message_quotaRead当月のメッセージ上限と利用状況を取得する
get_rich_menu_listReadリッチメニューの一覧を取得する
delete_rich_menuWriteリッチメニューを削除する
set_rich_menu_defaultWriteリッチメニューをデフォルトに設定する
cancel_rich_menu_defaultWriteデフォルトのリッチメニュー設定を取り消す
create_rich_menuWriteリッチメニューを作成し、画像を生成・アップロードしてデフォルトに設定する
get_follower_idsRead友だちのユーザーID一覧を取得する(認証済アカウントまたはプレミアムアカウント限定)

Connectors

Official connectors from AI services

Not supported: Claude, Gemini, Microsoft Copilot

Unverified: ChatGPT

Third-party integration services

  • Make

    There is a LINE (Messaging API) app with modules for watching events (webhooks), sending reply messages, and managing rich menus. Connecting requires a channel access token.

  • n8n

    There is a LINE node that can send notifications (push messages) to users and groups.

  • Pipedream

    There is a LINE Messaging API app with actions such as broadcast and reply messages, plus a new-message trigger. Each action is also published as a Pipedream MCP tool.

  • Composio

    There is a LINE toolkit that exposes Messaging API tools to agents. Your own channel access token is required.

  • Yoom

    There is a LINE Official Account app that automates flows starting from webhooks and text message sending without code (available on Yoom's Mini plan and above).

Not supported: Zapier, Power Automate

Unverified: IFTTT

Security assessment

For each available connection method: who provides it, the permissions it requires, how the terms treat it, and the data path. Items we could not confirm are marked Unverified.

Official MCPOfficial MCP serverThe service provider
Permissions requiredRead and write

チャネルアクセストークンにはスコープの概念がなく、プロフィールの取得から、全友だちへのブロードキャスト、リッチメニューの作成・削除まで、同じトークンで実行できる。読み取り専用にはできない。

Terms of serviceNo issues

LINE公式のオープンソース。Messaging APIの利用自体は、LINE公式アカウントの規約と料金プランに従う。

Source: relevant section of the terms

Data pathローカルで動作し、自環境からLINEのAPI(api.line.me)へ直接接続する。取得したプロフィールなどはMCPクライアント経由でLLMに渡る。
Third-party integrationMakeOfficial from the integration service
Permissions requiredRead and write

チャネルアクセストークンでできる操作の範囲すべて(トークンにスコープはない)。

Terms of serviceConditional

公式APIを使う連携だが、チャネルアクセストークンをMakeに預ける構成になる。

Source: relevant section of the terms

Data pathMakeのサーバーを経由する。チャネルアクセストークンはMake側に保存される。
Third-party integrationn8nOfficial from the integration service
Permissions requiredRead and write

プッシュメッセージの送信のみ。

Terms of serviceNo issues

公式APIを使う連携。

Source: relevant section of the terms

Data pathn8nの実行環境からLINEのAPIへ直接接続する。チャネルアクセストークンはn8nの認証情報として保存される。
Third-party integrationPipedreamOfficial from the integration service
Permissions requiredRead and write

チャネルアクセストークンでできる操作の範囲すべて(トークンにスコープはない)。

Terms of serviceConditional

公式APIを使う連携だが、チャネルアクセストークンをPipedreamに預ける構成になる。

Source: relevant section of the terms

Data pathPipedreamのサーバーを経由する。チャネルアクセストークンはPipedream側に保存される。
Third-party integrationComposioOfficial from the integration service
Permissions requiredRead and write

チャネルアクセストークンでできる操作の範囲すべて(トークンにスコープはない)。

Terms of serviceConditional

公式APIを使う連携だが、チャネルアクセストークンをComposioに預ける構成になる。トークンにスコープがないため、預ける影響は大きい。

Source: relevant section of the terms

Data pathComposioのサーバーを経由する。チャネルアクセストークンもComposio側に保存される。
Third-party integrationYoomOfficial from the integration service
Permissions requiredRead and write

チャネルアクセストークンでできる操作の範囲すべて(トークンにスコープはない)。Yoomのアプリが提供するアクションを通じて使う。

Terms of serviceConditional

公式APIを使う連携だが、チャネルアクセストークンをYoomに預ける構成になる。トークンにスコープがないため、預ける影響は大きい。

Source: relevant section of the terms

Data pathYoomのサーバーを経由する。チャネルアクセストークンはYoom側に保存される。

Data you can fetch within the terms of service

Fetching with the agent's own browser

There is an official API or MCP server, so we do not recommend having an agent sign in and operate the site in a browser on your behalf.

Usage

How to connect

  1. LINE公式アカウントを作成する。
  2. LINE Official Account ManagerでMessaging APIを有効化する(プロバイダーの選択は後から変更できない)。
  3. LINE Developersコンソールでチャネルアクセストークンを発行する。
  4. 使うAIツールのMCP設定に @line/line-bot-mcp-server を登録し、環境変数CHANNEL_ACCESS_TOKENを設定する。
  5. 必要に応じてDESTINATION_USER_ID(既定の宛先)を設定する。

Setup examples

Paste these as they are. Replace the API key, domain and similar values with your own.

Claude Desktop等のMCP設定(npx)
{
  "mcpServers": {
    "line-bot": {
      "command": "npx",
      "args": ["@line/line-bot-mcp-server"],
      "env": {
        "NPM_CONFIG_IGNORE_SCRIPTS": "true",
        "CHANNEL_ACCESS_TOKEN": "<チャネルアクセストークン>",
        "DESTINATION_USER_ID": "<既定の宛先ユーザーID(任意)>"
      }
    }
  }
}

公式READMEの記載例。Node.js v22以降が必要。DESTINATION_USER_IDは、ツールの入力でuserIdを省略する場合に必要。

Official page checked: https://github.com/line/line-bot-mcp-server

Claude Code
claude mcp add line-bot -e NPM_CONFIG_IGNORE_SCRIPTS=true -e CHANNEL_ACCESS_TOKEN=<チャネルアクセストークン> -e DESTINATION_USER_ID=<既定の宛先ユーザーID> -- npx @line/line-bot-mcp-server

公式READMEの設定例をClaude Code用に書いたもの。DESTINATION_USER_IDは任意(省略する場合は、ツールの入力でuserIdを指定する)。

Official page checked: https://github.com/line/line-bot-mcp-server

Limiting the features

アカウント(チャネル)を分けて影響範囲を区切る
テスト用と本番用でLINE公式アカウント(チャネル)を分け、それぞれ別のチャネルアクセストークンを発行する

チャネルアクセストークンにはスコープがないため、トークン単位で権限を絞ることはできない。影響範囲を分けるには、アカウント(チャネル)自体を分けるのが実質的な方法になる。

Official page checked: https://github.com/line/line-bot-mcp-server

Send a message to one user

Instruction to the agent

Send 'Meeting tomorrow at 10:00' to the test user

Use push_text_message. You need the recipient's user ID, or DESTINATION_USER_ID set in the environment.

Check the remaining message quota

Instruction to the agent

How many messages do I have left this month?

Use get_message_quota to check this month's limit and usage.

Broadcast to all friends

Instruction to the agent

Send a sale announcement to all friends

Use broadcast_text_message. It reaches every friend, so confirmation before sending is essential.

Pitfalls and tips

Pitfalls

  • Channel access tokens have no scopes. A token handed over for read-only purposes can still broadcast to all friends and delete rich menus.
  • Broadcast tools deliver to all friends immediately. If an agent runs them, require confirmation before sending.
  • Push and broadcast messages count toward the message quota (reply messages do not). The free plan allows 200 messages per month.
  • The MCP server is a preview (v0.5.0); the official README states that features are incomplete and support is limited.
  • Since September 2024, Messaging API channels can no longer be created directly in the LINE Developers console. You create a LINE Official Account and enable the Messaging API in LINE Official Account Manager. The provider chosen at that time cannot be changed later.
  • The MCP server does not attach a retry key to send requests, so a retry can deliver the same message twice.
  • Message counts are calculated as the number of friends sent to, multiplied by the number of sends. One broadcast consumes the entire target reach, so on the free plan (200 messages per month) an account with more than 200 friends cannot broadcast even once.
  • There are four types of channel access tokens: long-lived (indefinite), short-lived (30 days), user-specified expiration (v2.1, up to 30 days), and stateless (15 minutes). LINE does not recommend long-lived tokens for security reasons. MCP server setups often use long-lived tokens, so know the revoke and reissue procedure in case of a leak.
  • create_rich_menu also sets the new menu as the default, so running it immediately switches the rich menu shown to all friends.
  • The user ID used as a destination is an internal ID starting with 'U', different from the searchable LINE ID. Your own user ID can be found on the Basic settings tab of the channel in the LINE Developers console.

Tips

  • The official MCP server has no tools for receiving webhooks or sending reply messages. A reply-centered design needs your own webhook server, and everything sent through the MCP server counts as push/broadcast messages against the quota.
  • Before letting an agent touch a real account, fix DESTINATION_USER_ID to yourself on a test account and try only the push tools.
  • For routine notification automation, Yoom fits; for letting an agent compose and send messages end to end, the official MCP server fits.

Test environment and change history

How it was checkedChecked against official documentation
Clients triedNot yet tried with a real client
MCP server version@line/line-bot-mcp-server 0.5.0 (latest at the time of writing)

https://www.npmjs.com/package/@line/line-bot-mcp-server

The tool list and configuration examples were checked in the official README (GitHub line/line-bot-mcp-server), and the tools included in the published v0.5.0 were checked in the npm package contents. Pricing plans and message counting were checked against explanations based on official information. No live connection was made.

Change history

  • First edition

Sources

Official and primary sources

Pages published by the service provider, the integration provider or the MCP author about their own product.

References (third-party write-ups)

Third-party blogs and roundups. We use them only to supplement facts confirmed in official sources.

Related articles

How to connect ChatGPT (OpenAI) to AI agents

Official, individuals OK

How to connect Gmail to AI agents

Official, individuals OK

How to connect Google カレンダー to AI agents

Official, individuals OK

How to connect Chatwork to AI agents

Official, individuals OK