Skip to main content
Glama

LineWhiz

Premium MCP server that lets AI agents manage LINE Official Accounts.

Users type natural language in Claude / ChatGPT / Cursor → LineWhiz calls the LINE Messaging API.

Python 3.11+ MCP License: MIT

Features

Tool

Tier

Description

get_account_info

Free

Get LINE OA info: name, plan, picture

get_friend_count

Free

Get follower count on a specific date

get_message_quota

Free

Get remaining message quota this month

send_broadcast

Pro

Send message to ALL friends

send_push_message

Pro

Send DM to a specific user

send_multicast

Pro

Send message to multiple users (max 500)

get_message_delivery_stats

Pro

Get delivery stats for a date

get_user_profile

Pro

Get user's display name, picture, etc.

list_rich_menus

Pro

List all rich menus for this LINE OA

Related MCP server: LINE OA MCP Ultimate

Quick Start

Prerequisites

Setup

# Clone and install
cd linewhiz && uv sync

# Configure environment
cp .env.example .env
# Edit .env → fill in LINE_CHANNEL_ACCESS_TOKEN and LINE_CHANNEL_SECRET

# Run the server
uv run src/server.py

# Test with MCP Inspector
mcp dev src/server.py

# Run tests
uv run pytest

MCP Client Configuration

Add to your MCP client config (e.g., Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "linewhiz": {
      "command": "uv",
      "args": ["run", "src/server.py"],
      "cwd": "/path/to/linewhiz",
      "env": {
        "LINE_CHANNEL_ACCESS_TOKEN": "your_token_here",
        "LINE_CHANNEL_SECRET": "your_secret_here",
        "LINEWHIZ_TIER": "pro"
      }
    }
  }
}

Project Structure

linewhiz/
├── CLAUDE.md              # AI coding spec (single source of truth)
├── pyproject.toml
├── Dockerfile
├── docker-compose.yml
├── .env.example
├── src/
│   ├── server.py          # MCP entry point + tool registration
│   ├── config.py          # Env config via pydantic Settings
│   ├── auth/
│   │   ├── api_keys.py    # Key validation (SHA-256)
│   │   └── tiers.py       # Free/Pro/Business gating + rate limits
│   ├── tools/
│   │   ├── account.py     # get_account_info, get_friend_count, get_message_quota
│   │   ├── messaging.py   # send_broadcast, send_push, send_multicast
│   │   ├── richmenu.py    # list/create/set/link rich menus
│   │   ├── insights.py    # get_message_stats, get_user_profile
│   │   ├── automation.py  # [future] auto-reply
│   │   └── reporting.py   # [future] weekly report
│   ├── services/
│   │   ├── line_api.py    # Async LINE API wrapper
│   │   └── flex_builder.py
│   ├── models/
│   │   ├── user.py        # API key + tier models
│   │   └── usage.py       # Usage log model
│   └── db/
│       └── database.py    # SQLite async init + migrations
├── tests/
│   ├── conftest.py
│   ├── test_account.py
│   ├── test_messaging.py
│   ├── test_richmenu.py
│   └── test_auth.py
└── docs/

Tier System

Tier

Price

Daily Calls

Tools

Free

$0/mo

100

Account info, friend count, quota

Pro

$15/mo

5,000

+ Messaging, rich menus, insights

Business

$45/mo

Unlimited

All tools

Docker

# Build and run
docker compose up --build

# Or build manually
docker build -t linewhiz .
docker run --env-file .env linewhiz

Development

# Install with dev dependencies
uv sync --all-extras

# Lint
uv run ruff check src/ tests/

# Type check
uv run mypy src/

# Test
uv run pytest -v

License

MIT

Available Tools

10 tools
get_account_infoB

Get LINE Official Account info: name, friend count, plan, picture URL.

Inputs: no named parameters.

get_followersA

Get the list of user IDs of followers of this LINE OA. Use this to find user IDs for send_push_message or get_user_profile.

Inputs: limit.

get_friend_countA

Get the number of LINE OA friends/followers on a specific date. Provide date as YYYYMMDD or omit for yesterday.

Inputs: date.

get_message_delivery_statsB

Get delivery statistics (sent, opened, clicked) for messages sent on a specific date.

Inputs: date (required).

get_message_quotaA

Get remaining message quota for this month. Shows total allowed, used, and remaining messages.

Inputs: no named parameters.

get_user_profileB

Get profile info of a LINE user: display name, picture, status message.

Inputs: user_id (required).

list_rich_menusB

List all rich menus created for this LINE OA.

Inputs: no named parameters.

send_broadcastA

Send a text message to ALL friends of this LINE OA. Use carefully — this reaches everyone and costs message quota.

Inputs: message (required).

send_multicastB

Send a text message to multiple users at once (max 500 user IDs).

Inputs: user_ids (required), message (required).

send_push_messageA

Send a direct text message to a specific user by their LINE user ID.

Inputs: user_id (required), message (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific LINE Official Account operations. For example, get_followers retrieves user IDs, get_friend_count provides counts, and send_* tools handle different message delivery methods with clear boundaries. No tools appear to overlap or cause confusion.

    Naming Consistency5/5

    All tools follow a consistent verb_noun naming pattern using snake_case throughout. Examples include get_account_info, send_broadcast, and list_rich_menus, with no deviations in style or convention.

    Tool Count5/5

    With 10 tools, the set is well-scoped for managing a LINE Official Account, covering account info, user data, messaging, and analytics. Each tool earns its place without feeling excessive or insufficient for the domain.

    Completeness4/5

    The tools provide strong coverage for core LINE OA workflows, including account management, user profiling, and message sending. A minor gap exists in operations like updating or deleting rich menus, but agents can work around this with the available tools.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to run one or many LINE Official Accounts through natural language — sending broadcasts and image, Flex, Rich, and coupon messages, building rich menus and audiences, pulling insights, and managing LINE Shopping products and orders. Includes zero-setup image hosting, pre-flight quota and quiet-hour guardrails, multi-account switching, and Thai-localized templates, errors, and guides.
      206 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to operate one or many LINE Official Accounts through natural language — broadcasts, Flex and tappable Rich Messages with zero-setup image hosting, rich menus, coupons, audiences, insights, webhooks, and LINE Shopping — with pre-flight quota and quiet-hour guardrails. It ships 51 tools (37 messaging + 14 shopping) plus resources and guided prompts, and runs over stdio or token-authenticated HTTP with any MCP-compatible host.
      206 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to operate one or many LINE Official Accounts through natural language, covering broadcasts and other message types, Flex/Rich/Card message design, rich menus, audiences, insights, coupons, webhooks, LIFF, and LINE Shopping. Includes pre-flight quota safety, quiet-hour warnings, zero-setup image hosting for Rich Messages, and Thai-localized templates and error messages.
      206 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to operate one or many LINE Official Accounts through natural language — broadcasts, Flex and tappable Rich Messages, rich menus, audiences, coupons, insights, LIFF, and LINE Shopping storefronts. Includes 51 tools with image hosting, quota guardrails, quiet-hour warnings, and Thai-localized templates.
      206 npm
      MIT