LINE logo

LINE

Free

集成 LINE Bot,让 AI 读取和分析 LINE 对话。

FreeFree tier
Type
Open Source

About LINE

A Model Context Protocol (MCP) server implementation in Python that provides access to LINE Bot messages. This server enables Language Models to read and analyze LINE conversations through a standardized interface. It supports asynchronous operation, environment-based configuration, comprehensive logging, LINE Bot webhook event handling, message storage in JSON format, FastAPI integration, Pydantic models for data validation, and support for text, sticker, and image messages.

Key Features

Asynchronous operation using Python's asyncio
Environment-based configuration using python-dotenv
Comprehensive logging system
LINE Bot webhook event handling
Message storage in JSON format
FastAPI integration for API endpoints
Pydantic models for data validation
Support for text, sticker, and image messages
Security features: LINE message signature validation and environment-based configuration
Error handling for webhook validation failures, message storage errors, resource access errors, and LINE API response errors

Pros & Cons

Pros
  • Open source and free to use
  • Standardized MCP interface for easy integration with AI systems
  • Supports multiple message types (text, sticker, image)
  • Comprehensive error handling and logging
  • Security features: signature validation and environment-based configuration
  • Easy to set up with Docker and Docker Compose
Cons
  • Requires self-hosting and technical setup (Python environment, LINE API tokens)
  • Dependent on LINE Bot API and channel configuration
  • No built-in user interface; operates as a server for external consumers
  • Limited documentation beyond the README

Best For

Enable Language Models to read and analyze LINE Bot conversationsIntegrate LINE message data into AI tools like Claude DesktopProcess and store LINE messages for analysis or archivalBuild chatbots or analytics tools that need access to LINE conversation history

FAQ

What is py-mcp-line?
py-mcp-line is a Python MCP (Model Context Protocol) server that provides access to LINE Bot messages, enabling Language Models to read and analyze LINE conversations through a standardized interface.
How do I install py-mcp-line?
Clone the repository from GitHub and install the dependencies: git clone https://github.com/amornpan/py-mcp-line.git, cd py-mcp-line, pip install -r requirements.txt. Required dependencies include fastapi, pydantic, python-dotenv, mcp-server, line-bot-sdk, and uvicorn.
How do I configure the server?
Create a .env file in the project root with LINE_CHANNEL_SECRET, LINE_ACCESS_TOKEN, SERVER_PORT, and MESSAGES_FILE variables. See the .env.example file for reference.
What types of messages does it support?
It supports text messages, sticker messages, and image messages.
Can I use it with Claude Desktop?
Yes, you can add the server to your Claude Desktop configuration by specifying the command and environment variables in the claude_desktop_config.json file.