LINE

LINE

MCP server enabling LMs to read and analyze LINE conversations via a standard interface.

18
Stars
6
Forks
0
Releases

Overview

A Model Context Protocol 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 emphasizes asynchronous operation using asyncio, environment-based configuration via python-dotenv, and comprehensive logging for observability. LINE webhook events are processed to ingest messages, which are stored in a JSON file (data/messages.json). The project uses FastAPI for API endpoints and Pydantic models for data validation, exposing resources that describe and read LINE message data. It supports multiple message types, including text, sticker, and image, and allows filtering when reading resources by date, user, or content. The repository includes a sample structure (src/line/server.py, data/messages.json, tests/test_line.py) and a Claude Desktop configuration for easy deployment. Security considerations include LINE signature validation, error handling for webhook failures, storage errors, and URI validation. This MCP server is designed to be deployed with environment-driven configuration, making LINE message data accessible to language models via MCP.

Details

Owner
amornpan
Language
Python
License
Updated
2025-12-07

Features

Asynchronous operation

Uses asyncio for non-blocking processing of LINE events.

Environment-based configuration

Managed via python-dotenv to configure the MCP server.

Comprehensive logging system

Extensive logs for observability and debugging.

LINE Bot webhook event handling

Handles LINE webhook events to ingest messages into MCP.

Message storage in JSON

Stores LINE messages in data/messages.json.

FastAPI integration

Provides API endpoints using FastAPI for MCP interactions.

Pydantic data validation

Uses Pydantic models to validate incoming and outgoing data.

Support for multiple message types

Supports text, sticker, and image messages from LINE.

Tags

LINEMCPFastAPIPythonwebhookJSONasynchronousloggingpydanticline-bot-sdkenvironment configurationmessages.jsontextstickerimage