MCP LINE Server
Enables sending text messages, stamps, and Flex Messages (rich messages) through LINE Messaging API, and provides tools for checking message quota limits.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP LINE Server send a text message to my friend saying I'll be 10 minutes late"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP × LINE ハンズオン
AI に「LINE を送る力」を授ける MCP サーバーを作るハンズオン用リポジトリです。
このリポジトリについて
このリポジトリは、MCP (Model Context Protocol) を使って、AI が LINE にメッセージを送れるようにするハンズオンのスターターキットです。
MCP サーバーを 0 から作成し、以下の機能を実装します:
✅ テキストメッセージの送信
✅ スタンプの送信
✅ Flex Message(リッチメッセージ)の送信
✅ Quota API による送信数の確認
Related MCP server: line-mcp-server
必要なもの
GitHub アカウント
LINE アカウント
Gemini API キー(Google AI Studio から取得)
セットアップ
1. このリポジトリを Fork する
右上の 「Fork」 ボタンをクリックして、自分のアカウントにフォークしてください。
2. GitHub Codespaces で開く
「Code」 ボタンをクリック
「Codespaces」 タブを選択
「Create codespace on main」 をクリック
3. 環境変数を設定
.env.sample をコピーして .env ファイルを作成します:
cp .env.sample .env.env ファイルを編集して、以下の値を設定してください:
# Gemini API Key
GEMINI_API_KEY=your_gemini_api_key_here
# LINE Messaging API
LINE_CHANNEL_ACCESS_TOKEN=your_line_channel_access_token_here
LINE_USER_ID=your_line_user_id_here4. 依存パッケージをインストール
npm install5. ビルド
npm run build6. Gemini CLI に MCP サーバーを登録
gemini mcp add line-server node ~/mcp-line-handson/dist/index.js7. Gemini CLI を起動
gemini8. 動作確認
Gemini CLI で以下のコマンドを実行して、MCP サーバーが正しく登録されているか確認します:
> /mcp足し算ツールを試してみましょう:
> 5 + 3 は?ハンズオン資料
詳しい手順は、Zenn Book を参照してください:
📚 【MCP×LINE】AIに「LINEを送る力」を授けよう!
プロジェクト構成
mcp-line-handson/
├── src/
│ └── index.ts # MCP サーバーのメインファイル
├── dist/ # ビルド出力先(自動生成)
├── .env.sample # 環境変数のサンプル
├── .env # 環境変数(Git管理外)
├── package.json # npm 設定
├── tsconfig.json # TypeScript 設定
└── README.md # このファイル開発
TypeScript を編集した場合は、ビルドしてから Gemini CLI を再起動してください。
npm run build
gemini mcp remove line-server
gemini mcp add line-server node ~/mcp-line-handson/dist/index.js
geminiトラブルシューティング
MCP サーバーが認識されない
npm run buildでビルドが成功しているか確認gemini mcp listで登録されているか確認Gemini CLI を再起動してみる
LINE にメッセージが送れない
.envファイルのLINE_CHANNEL_ACCESS_TOKENとLINE_USER_IDが正しく設定されているか確認LINE 公式アカウントを友だち追加しているか確認
LINE Developers コンソールでチャネルアクセストークンが有効か確認
参考リンク
ライセンス
MIT
作者
このハンズオンは Zenn Book と連動しています。詳しくは Zenn Book をご覧ください。
Available Tools
1 tooladdA
Add two numbers and return the result
Inputs: a (required), b (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools, as there are no other tools to confuse it with. The tool's purpose is clearly distinct by default.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against for patterns or conventions. The name 'add' is straightforward and follows a simple verb pattern.
A single tool for a server named 'MCP LINE Server' suggests a very limited scope, likely too thin for practical use unless it's a minimal utility. Typically, servers have 3-15 tools for adequate functionality, so this is borderline but leans toward being insufficient.
The server appears to be for mathematical operations based on the tool description, but with only an 'add' tool, there are severe gaps—no subtraction, multiplication, division, or other basic operations. This makes the surface incomplete for any meaningful mathematical domain.
Maintenance
Related MCP Connectors
Messaging tools for AI agents: send messages, manage chats, groups and channels.
Send WhatsApp messages and templates, manage chats, contacts, broadcasts and AI agents.
Official WhatsApp Business API (Meta Cloud API) for your own CRM or SaaS, from WasapFlow, a Meta Tech Provider. Your AI can search the Bridge docs, list connected numbers, create Embedded Signup links so clients connect their own WhatsApp (Coexistence supported), send text and template messages, list templates, check and retry failed webhooks, see usage and open support tickets. Docs tools work without a key; account tools use the x-partner-key header.
LinkedIn for AI agents: inbox, invitations, Sales Navigator search, posts, jobs, quotas, webhooks.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to send messages, manage rich menus, and interact with users through LINE Official Accounts via the LINE Messaging API. Supports both individual messaging and broadcasting to all followers with text and customizable flex messages.183,106 npmApache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables sending LINE messages (push, multicast, broadcast), retrieving user profiles, checking quotas, and sending flex messages via Claude using the LINE Messaging API.62 npmApache 2.0
- FlicenseNot gradedqualityCmaintenanceEnables sending LINE text messages and Flex Messages to user or group IDs, checking message quota, and receiving group webhooks via a remote MCP endpoint for ChatGPT integration.-
- AlicenseAqualityBmaintenanceEnables AI agents to control a LINE Official Account via the Messaging API, including sending text and flex messages, broadcasting, retrieving user profiles and follower IDs, and managing rich menus.123,106 npmApache 2.0