A
amornpan/py-mcp-line
python mcp LINE
View on GitHub ↗Link checked 2026-11-12 · HTTP 200 · opens the vendor's own site
We have neither an install command nor a public remote endpoint from this repository, so we do not print a config. A made-up one is worse than none. How each client wires MCP up →
- Source
- collected from the abordage/awesome-mcp list · type: MCP server
- Harvest history
- first seen 2026-11-05 · last seen 2026-11-14 · seen 10× · listed by 10 sources
- Score
- score 1,003 · 10 sources · mcp
FAQ (answers come from our records)
Who is it for?
We filed it under these tags: MCP 服务. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
first catalogued 2026-11-05;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.
# Python LINE MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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.
## Features
### Core Functionality
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
## Prerequisites
Python 3.8+
Required Python packages:
fastapi
pydantic
python-dotenv
mcp-server
line-bot-sdk
uvicorn
## Installation
bash
git clone https://github.com/amornpan/py-mcp-line.git
cd py-mcp-line
pip install -r requirements.txt
## Project Structure
PY-MCP-LINE/
├── src/
│ └── line/
│ ├── init.py
│ └── server.py
├── data/
│ └── messages.json
├── tests/
│ ├── init.py
│ └── testline.py
├── .env
├── .env.example
├── .gitignore
├── README.md
├── Dockerfile
└── requirements.txt
### Directory Structure Explanation
src/line/ - Main source code directory
init.py - Package initialization
server.py - Main server implementation
data/ - Data storage directory
messages.json - Stored LINE messages
tests/ - Test files directory
init.py - Test package initialization
testline.py - LINE functionality tests
.env - Environment configuration file (not in git)
.env.example - Example environment configuration
.gitignore - Git ignore rules
README.md - Project documentation
Dockerfile - Docker configuration
requirements.txt - Project dependencies
## Configuration
Create a .env file in the project root:
env
LINECHANNELSECRET=yourchannelsecret
LINEACCESSTOKEN=youraccesstoken
SERVERPORT=8000
MESSAGESFILE=data/messages.json
## API Implementation Details
### Resource Listing
python
@app.listresources()
async def listresources() -> list[Resource]
Lists available message types from the LINE Bot
Returns resources with URIs in the format line:// /data
Includes resource descriptions and MIME types
### Resource Reading
python
@app.readresource()
async def readresource(uri: AnyUrl) -> str
Reads messages of the specified type
Accepts URIs in the format line:// /data
Returns messages in JSON format
Supports filtering by date, user, or content
## Usage with Claude Desktop
Add to your Claude Desktop configuration:
On MacOS: ~/Library/Application Support/Claude/claudedesktopconfig.json
On Windows: %APPDATA%/Claude/claudedesktopconfig.json
json
"mcpServers": {
"line": {
"command": "python",
"args": [
"server.py"
],
"env": {
"LINECHANNELSECRET": "yourchannelsecret",
"LINEACCESSTOKEN": "youraccesstoken",
"SERVERPORT": "8000",
"MESSAGESFILE": "data/messages.json"
## Error Handling
The server implements comprehensive error handling for:
Webhook validation failures
Message storage errors
Resource access errors
URI validation
LINE API response errors
All errors are logged and returned with appropriate error messages.
## Features
### Core Functionality
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
## Prerequisites
Python 3.8+
Required Python packages:
fastapi
pydantic
python-dotenv
mcp-server
line-bot-sdk
uvicorn
## Installation
bash
git clone https://github.com/amornpan/py-mcp-line.git
cd py-mcp-line
pip install -r requirements.txt
## Project Structure
PY-MCP-LINE/
├── src/
│ └── line/
│ ├── init.py
│ └── server.py
├── data/
│ └── messages.json
├── tests/
│ ├── init.py
│ └── testline.py
├── .env
├── .env.example
├── .gitignore
├── README.md
├── Dockerfile
└── requirements.txt
### Directory Structure Explanation
src/line/ - Main source code directory
init.py - Package initialization
server.py - Main server implementation
data/ - Data storage directory
messages.json - Stored LINE messages
tests/ - Test files directory
init.py - Test package initialization
testline.py - LINE functionality tests
.env - Environment configuration file (not in git)
.env.example - Example environment configuration
.gitignore - Git ignore rules
README.md - Project documentation
Dockerfile - Docker configuration
requirements.txt - Project dependencies
## Configuration
Create a .env file in the project root:
env
LINECHANNELSECRET=yourchannelsecret
LINEACCESSTOKEN=youraccesstoken
SERVERPORT=8000
MESSAGESFILE=data/messages.json
## API Implementation Details
### Resource Listing
python
@app.listresources()
async def listresources() -> list[Resource]
Lists available message types from the LINE Bot
Returns resources with URIs in the format line:// /data
Includes resource descriptions and MIME types
### Resource Reading
python
@app.readresource()
async def readresource(uri: AnyUrl) -> str
Reads messages of the specified type
Accepts URIs in the format line:// /data
Returns messages in JSON format
Supports filtering by date, user, or content
## Usage with Claude Desktop
Add to your Claude Desktop configuration:
On MacOS: ~/Library/Application Support/Claude/claudedesktopconfig.json
On Windows: %APPDATA%/Claude/claudedesktopconfig.json
json
"mcpServers": {
"line": {
"command": "python",
"args": [
"server.py"
],
"env": {
"LINECHANNELSECRET": "yourchannelsecret",
"LINEACCESSTOKEN": "youraccesstoken",
"SERVERPORT": "8000",
"MESSAGESFILE": "data/messages.json"
## Error Handling
The server implements comprehensive error handling for:
Webhook validation failures
Message storage errors
Resource access errors
URI validation
LINE API response errors
All errors are logged and returned with appropriate error messages.
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[](https://anclum.com/en/s/amornpan-py-mcp-line/)
- Source
- awesome · https://github.com/amornpan/py-mcp-line
- Browse by field
- MCP servers
- Listed by
- 10 independent sources
- added
- today
More like this
Filed under
Every tag opens the full list for that filter. Counts are the live catalogue figures.