Skip to main content

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

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

Metadata

Release files for linewhiz 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for linewhiz 0.1.0
File Size Uploaded Provenance Actions
linewhiz-0.1.0.tar.gz 5.8 MB Without provenance Details for linewhiz-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for linewhiz 0.1.0
File Interpreter ABI Platform Actions
linewhiz-0.1.0-py3-none-any.whl Python 3 none any Details for linewhiz-0.1.0-py3-none-any.whl

Total release size: 5.8 MB

Release files / linewhiz-0.1.0.tar.gz

Download URL linewhiz-0.1.0.tar.gz
Size 5.8 MB
Tags Source
SHA-256 checksum
How to use checksums
7570f3eea2a008151d8c91dc9fa9dcdbc3af94e783fc6c20b73109c796742c29
BLAKE2b-256 checksum
How to use checksums
738f78fdd1bc54d38d0306cfd991eeee91d70c6b0b933a07bb26d104d38ca3ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / linewhiz-0.1.0-py3-none-any.whl

Download URL linewhiz-0.1.0-py3-none-any.whl
Size 20.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d71782e00bdbfa662c531825363ebe8252ea8d05d830e0ba403663cae6e3eef9
BLAKE2b-256 checksum
How to use checksums
7072104f2bc822f56a05c38f9379cde44a4c6384ccef8a6c0397870fb41e99f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for linewhiz 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page