🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@kuailian/mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kuailian/mcp-server

Publish AI-generated web pages to a live URL from Cursor or Claude Code. 在 Cursor / Claude Code 里一句话把 AI 生成的网页发布成网址。

latest
npmnpm
Version
0.1.5
Version published
Weekly downloads
835
Maintainers
1
Weekly downloads
 
Created
Source

Kuailian MCP Server

Publish AI-generated web pages to a live, shareable URL — straight from Cursor, Claude Code, or any MCP client.

中文文档 · kuailian (快链)

Ask your agent to "build a landing page and put it online" and it comes back with https://link.3ceng.cn/view/a1b2c3d4. No git repo, no build pipeline, no deploy config.

Kuailian is a Chinese-language hosting service. Account registration currently requires a mainland-China mobile number.

Setup

  • Sign in at link.3ceng.cn, open the MCP tab, and generate an API key.
  • Add the snippet below to your MCP client config (mcp.json for Cursor). The key is shown only once — store it somewhere safe.
{
  "mcpServers": {
    "kuailian": {
      "command": "npx",
      "args": ["-y", "@kuailian/mcp-server"],
      "env": {
        "KUAILIAN_API_KEY": "kl_live_xxx"
      }
    }
  }
}

Nothing to install and no service to keep running — your client spawns the server as a child process on demand over stdio and shuts it down afterwards. Publishing itself calls the Kuailian API, so an internet connection is required.

Environment variables

VariableRequiredDefault
KUAILIAN_API_KEYyes
KUAILIAN_API_URLnohttps://link.3ceng.cn/api
KUAILIAN_SITE_URLnohttps://link.3ceng.cn

Tools

ToolWhat it does
kuailian_publish_htmlCreate and publish a page from html / css / js
kuailian_update_pageUpdate an existing code page (partial updates are safe)
kuailian_publish_dirZip and publish a local static directory such as dist/
kuailian_update_dirOverwrite a folder site from a local directory
kuailian_list_pagesList your sites with view counts and origin
kuailian_get_pageFetch one project's details and source
kuailian_delete_pageMove a project to trash
kuailian_get_quotaCheck membership status and remaining quota
kuailian_get_statsTraffic stats for a short link (paid feature)

Every publish returns a permanent short link: https://link.3ceng.cn/view/{shortId}.

Examples

Single page. kuailian_publish_html takes name plus any of html, css, js. Pass a full HTML document or just body markup. The whole request body is capped at 2 MB; beyond that you get CODE_SIZE_EXCEEDED and should switch to kuailian_publish_dir.

Partial updates. kuailian_update_page merges rather than replaces. Sending only js leaves the existing html and css untouched, so an agent iterating on one part of a page can't accidentally blank the rest.

Static build output. kuailian_publish_dir takes a path to a directory containing index.html; node_modules and .git are skipped automatically. On kuailian_update_dir the server refreshes the CDN cache for changed files — including CSS, JS, and images — so you don't need cache-busting query strings of your own.

Resources

The server also exposes reference documents your agent can read before acting:

  • kuailian://docs/limits — size and quota limits
  • kuailian://docs/kv-api — the key-value API available to published pages
  • kuailian://docs/publish-guide — how to choose between the publish tools

Errors and quotas

Failures come back as structured errors with a machine-readable code, so an agent can react instead of retrying blindly:

CodeMeaning
CODE_SIZE_EXCEEDEDRequest body over 2 MB — use kuailian_publish_dir
QUOTA_EXCEEDEDSite or traffic quota used up
FEATURE_LOCKEDPaid-only feature; includes an upgrade_url
NOT_MCP_PROJECTSite was created in the web app; delete it there instead
INVALID_IDproject_id is not a 24-character hex string

An API key can create, read, and update sites, but it may only delete sites that were created through MCP. Anything a user made by hand in the web app is off limits, which keeps an over-eager agent from destroying work it didn't create. Upgrades always happen in the browser — MCP cannot make a payment on the user's behalf.

Development

cd mcp-server && npm i && npm run dev

To point a client at your working copy, set command to npx and args to ["-y", "tsx", "<absolute path to mcp-server/src/index.ts>"], then override KUAILIAN_API_URL and KUAILIAN_SITE_URL to your local server.

License

MIT

Keywords

mcp

FAQs

Package last updated on 04 Aug 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts