| 1 | [日本語版 READMEはこちら](README.ja.md) |
| 2 | |
| 3 | # LINE Bot MCP Server |
| 4 | |
| 5 | [](https://www.npmjs.com/package/@line/line-bot-mcp-server) |
| 6 | |
| 7 | [Model Context Protocol (MCP)](https://github.com/modelcontextprotocol) server implementation that integrates the LINE Messaging API to connect an AI Agent to the LINE Official Account. |
| 8 | |
| 9 |  |
| 10 | |
| 11 | > [!NOTE] |
| 12 | > This repository is provided as a preview version. While we offer it for experimental purposes, please be aware that it may not include complete functionality or comprehensive support. |
| 13 | |
| 14 | ## Tools |
| 15 | |
| 16 | 1. **push_text_message** |
| 17 | - Push a simple text message to a user via LINE. |
| 18 | - **Inputs:** |
| 19 | - `userId` (string?): The user ID to receive a message. Defaults to DESTINATION_USER_ID. Either `userId` or `DESTINATION_USER_ID` must be set. |
| 20 | - `message.text` (string): The plain text content to send to the user. |
| 21 | 2. **push_flex_message** |
| 22 | - Push a highly customizable flex message to a user via LINE. |
| 23 | - **Inputs:** |
| 24 | - `userId` (string?): The user ID to receive a message. Defaults to DESTINATION_USER_ID. Either `userId` or `DESTINATION_USER_ID` must be set. |
| 25 | - `message.altText` (string): Alternative text shown when flex message cannot be displayed. |
| 26 | - `message.contents` (any): The contents of the flex message. This is a JSON object that defines the layout and components of the message. |
| 27 | - `message.contents.type` (enum): Type of the container. 'bubble' for single container, 'carousel' for multiple swipeable bubbles. |
| 28 | 3. **broadcast_text_message** |
| 29 | - Broadcast a simple text message via LINE to all users who have followed your LINE Official Account. |
| 30 | - **Inputs:** |
| 31 | - `message.text` (string): The plain text content to send to the users. |
| 32 | 4. **broadcast_flex_message** |
| 33 | - Broadcast a highly customizable flex message via LINE to all users who have added your LINE Official Account. |
| 34 | - **Inputs:** |
| 35 | - `message.altText` (string): Alternative text shown when flex message cannot be displayed. |
| 36 | - `message.contents` (any): The contents of the flex message. This is a JSON object that defines the layout and components of the message. |
| 37 | - `message.contents.type` (enum): Type of the container. 'bubble' for single container, 'carousel' for multiple swipeable bubbles. |
| 38 | 5. **get_profile** |
| 39 | - Get detailed profile information of a LINE user including display name, profile picture URL, status message and language. |
| 40 | - **Inputs:** |
| 41 | - `userId` (string?): The ID of the user whose profile you want to retrieve. Defaults to DESTINATION_USER_ID. |
| 42 | 6. **get_message_quota** |
| 43 | - Get the message quota and consumption of the LINE Official Account. This shows the monthly message limit and current usage. |
| 44 | - **Inputs:** |
| 45 | - None |
| 46 | 7. **get_rich_menu_list** |
| 47 | - Get the list of rich menus associated with your LINE Official Account. |
| 48 | - **Inputs:** |
| 49 | - None |
| 50 | 8. **delete_rich_menu** |
| 51 | - Delete a rich menu from your LINE Official Account. |
| 52 | - **Inputs:** |
| 53 | - `richMenuId` (string): The ID of the rich menu to delete. |
| 54 | 9. **set_rich_menu_default** |
| 55 | - Set a rich menu as the default rich menu. |
| 56 | - **Inputs:** |
| 57 | - `richMenuId` (string): The ID of the rich menu to set as default. |
| 58 | 10. **cancel_rich_menu_default** |
| 59 | - Cancel the default rich menu. |
| 60 | - **Inputs:** |
| 61 | - None |
| 62 | 11. **create_rich_menu** |
| 63 | - Create a rich menu based on the given actions. Generate and upload an image. Set as default. |
| 64 | - **Inputs:** |
| 65 | - `chatBarText` (string): Text displayed in chat bar, also used as rich menu name. |
| 66 | - `actions` (array): The actions of the rich menu. You can specify minimum 1 to maximum 6 actions. Each action can be one of the following types: |
| 67 | - `postback`: For sending a postback action |
| 68 | - `message`: For sending a text message |
| 69 | - `uri`: For opening a URL |
| 70 | - `datetimepicker`: For opening a date/time picker |
| 71 | - `camera`: For opening the camera |
| 72 | - `cameraRoll`: For opening |