LINE Adapter
Overview
Section titled “Overview”The LINE LIFF adapter enables MCP Apps to run inside LINE’s in-app browser framework.
import { LineAdapter } from "@casys/mcp-bridge";
// Client-side: runs inside the LINE LIFF WebViewconst adapter = new LineAdapter();await adapter.init({ resourceBaseUrl: "https://your-domain.com" });Features
Section titled “Features”- OAuth Token Handling: Automatic token management via LIFF SDK
- Platform Detection: Detects mobile vs web browser environments
- Locale Mapping: Maps LINE’s locale to MCP context
- External Links: Opens links via
liff.openWindow() - Safe Area: Reports viewport dimensions for proper UI rendering
Authentication
Section titled “Authentication”LINE authentication uses OAuth 2.0 tokens:
- User opens the LIFF app in LINE
- LIFF SDK handles the OAuth flow
- The adapter extracts the access token
- Token is validated server-side against LINE’s API