Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Create Line Bot

БесплатноПоддерживается

Scaffold a LINE bot that survives production (Next.js + Supabase + Vercel), with a built-in MCP server so Claude or Cursor can run it: queue health, retries, pu

GitHubEmbed

Описание

Scaffold a LINE bot that survives production (Next.js + Supabase + Vercel), with a built-in MCP server so Claude or Cursor can run it: queue health, retries, push, Rich Menu.

README

M8ven Verified

Scaffold a LINE bot that survives production.

npx create-line-bot my-bot

Next.js 16 (App Router) + Supabase + Vercel. No @line/bot-sdk, no heavy imports in the webhook path — because the webhook has five seconds and cold starts eat them.

Why this exists

Starting a LINE bot is easy. Keeping one alive is not. Every LINE bot I have shipped hit the same six problems, and none of them are in the quickstart:

Problem What this template does
LINE times out the webhook after 5 seconds, and a cold start with a fat SDK import eats most of it Webhook verifies, writes one row, returns 200; work moves to a separate worker route via after()
LINE retries webhooks, and serverless functions can run twice Four independent idempotency layers — event id, reply token, job claim, business dedupe key
A reply token is single-use; spending it twice throws Conditional update claims the token before it is spent
Rich Menu uploads are not idempotent — run the script twice, get two menus Name-based uploader that removes the previous menu first
LIFF ID tokens are trusted client-side far too often Token is verified against LINE's API server-side on every link
.env.local is not read by Vercel Deploy section spells out vercel env add per variable

Operate it from Claude, Cursor or any AI agent

Every generated project comes wired to line-bot-ops-mcp, an MCP server that reads its own queue and database. Open the project in Claude Code and ask:

"Why did the bot stop replying?" → line_queue_health, line_failed_jobs, line_retry_job "How many followers did we gain yesterday, and how much push quota is left?" "Switch user U123… to the seller menu."

Generic LINE MCP servers can send messages. This one also knows your webhook queue, so it can tell you why a message was never answered. Broadcast is off unless you opt in.

Already have a bot? Run the same server on its own: npx -y line-bot-ops-mcp.

What you get

src/app/api/line/webhook/route.ts   signature verify + fast ack
src/app/api/line/worker/route.ts    claim jobs, reply, retry safely
src/app/api/liff/link/route.ts      server-side ID token verification
src/app/liff/page.tsx               LIFF init + login
src/lib/line.ts                     signature, reply, push, verifyIdToken (fetch only)
src/lib/jobs.ts                     enqueue, claim, reply-token guard
scripts/rich-menu.ts                idempotent Rich Menu uploader
.mcp.json                           Claude Code loads line-bot-ops-mcp automatically
supabase/migrations/0001_init.sql   line_jobs, line_users, claim_line_jobs()

Setup

The generated project ships its own README with the full table of environment variables, the message-flow diagram, and the deploy steps. Short version:

npx create-line-bot my-bot
cd my-bot
npm install
cp .env.example .env.local     # LINE + Supabase credentials
npm run db:push
npm run dev

Then set the channel webhook to https://<origin>/api/line/webhook.

The long-form versions

Each shortcut above started as a written-up incident:

Upstream fixes

Fixes found while building this, sent back to LINE's own repositories:

Status

v0.2 — bot + LIFF + Supabase on Vercel, wired to an MCP server to run it from an AI agent. Issues and PRs welcome, especially from anyone running LINE bots at scale in Thailand or Japan.

Sponsor

LINE changes its Messaging API several times a year, and a scaffolder is only useful if what it generates still works on the day you run it. Sponsorship pays for keeping it that way: tracking API changes, re-testing the template against new Next.js and Supabase releases, and answering issues.

If your team runs a bot built from this, sponsor on GitHub.

Privacy

The CLI and the generated app send nothing to the maintainer. See PRIVACY.md.

License

MIT

from github.com/MankhongGarden/create-line-bot

Установить Create Line Bot в Claude Desktop, Claude Code, Cursor

Рекомендуется · одна команда, все IDE
unyly install create-line-bot

Ставит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.

Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh

Или настроить вручную

Выполни в терминале:

claude mcp add create-line-bot -- npx -y create-line-bot

Пошаговые гайды: как установить Create Line Bot

FAQ

Create Line Bot MCP бесплатный?

Да, Create Line Bot MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Create Line Bot?

Нет, Create Line Bot работает без API-ключей и переменных окружения.

Create Line Bot — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Create Line Bot в Claude Desktop, Claude Code или Cursor?

Открой Create Line Bot на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Opencode Omniroute Plugin

OpenCode plugin for the OmniRoute AI Gateway. Drives dynamic model discovery, /connect auth flow, and multi-instance OmniRoute providers via the official @openc

GitHub Actionsавтор: GitHub Actions
83

Roblox Studio

Enables AI coding tools to control Roblox Studio for workspace exploration, instance manipulation, and script management. It provides tools for playtesting, sce

paralovавтор: paralov

Antigravity Drawio

MCP server that enables AI assistants to create, parse, render, and validate Draw.io diagrams programmatically.

S-SUJAN-Sавтор: S-SUJAN-S

Fetch

Web content fetching and conversion for efficient LLM usage.

автор: Community

AWS KB Retrieval

Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.

modelcontextprotocolавтор: modelcontextprotocol

Spring AI MCP Server

Provides auto-configuration for setting up an MCP server in Spring Boot applications.

автор: Community

llm-analysis-assistant

A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also

xuzexin-hzавтор: xuzexin-hz

MCP-Agent

A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)

lastmile-aiавтор: lastmile-ai

Spring AI MCP Client

Provides auto-configuration for MCP client functionality in Spring Boot applications.

автор: Community

mcp.natoma.ai

A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)

автор: Community

Compare Create Line Bot with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории ai