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 "Install 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 Serversend 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 Bot MCP Server (SSE Support)
必要なもの
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
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | The first number | |
| b | Yes | The second number |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the core function (addition) and output (result), but lacks details on error handling, input constraints (e.g., number types, overflow), or performance characteristics. This leaves gaps in understanding how the tool behaves beyond the basic operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the key information ('Add two numbers') and avoids any unnecessary words. Every part of the sentence contributes directly to understanding the tool's function, making it optimally concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (simple arithmetic), no annotations, and no output schema, the description covers the basic purpose adequately. However, it lacks details on return format, error cases, or behavioral nuances that would be helpful for full contextual understanding, making it minimally viable but incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with both parameters clearly documented in the schema. The description adds no additional meaning beyond what the schema provides (e.g., it doesn't explain parameter relationships or usage nuances), so it meets the baseline for adequate but not enhanced parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Add two numbers') and the outcome ('return the result'), making the purpose immediately understandable. It uses precise verbs and specifies the resource (numbers), leaving no ambiguity about what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for numerical addition, but provides no explicit guidance on when to use this tool versus alternatives (e.g., other mathematical operations). Since there are no sibling tools, the lack of comparative guidance is less critical, but it still offers only basic context without exclusions or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
- First observed
add
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Messaging tools for AI agents: send messages, manage chats, groups and channels.
Carbon Voice MCP serves as a bridge that connects AI assistants like ChatGPT, Claude, and Cursor to a user's Carbon Voice account, turning voice messages and conversations into a private, on-demand knowledge base. It provides 28 specialized tools for comprehensive voice messaging management, including creating and sending messages, accessing conversation history with instant transcription, running AI actions (summarization, TLDR generation, meeting notes), and managing workspace collaboration through folders, contacts, and team communications.
Build and send email, SMS, and push straight from your AI agent.
Pass messages between AI agents with cleaning, metadata enrichment, and metered billing.
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.18630Apache 2.0
- AlicenseAqualityDmaintenanceIntegrates the LINE Messaging API with AI agents via the Model Context Protocol, supporting both stdio and SSE transport protocols. It allows agents to send messages, manage rich menus, and retrieve user profile information for LINE Official Accounts.10630Apache 2.0
- AlicenseAqualityDmaintenanceAI-powered MCP server for managing LINE Official Accounts. Send broadcasts, push messages, check analytics, manage rich menus — all through natural language via Claude, ChatGPT, or Cursor. 10 tools included: * Account info, friend count, message quota * Broadcast, push message, multicast * Delivery stats, user profiles, follower list * Rich menu management Supports 95M+ LINE users across Jap10MIT
- AlicenseAqualityBmaintenanceOperate your LINE Official Account from any AI agent through natural language.378297MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/4geru/mcp-handson'
If you have feedback or need assistance with the MCP directory API, please join our Discord server