MCP ExplorerExplorer

Cf Page Publish Mcp

@Actrueon 11 days ago
2 MIT
FreeCommunity
AI Systems
# Page Publishing MCP Tool The Page Publishing MCP tool allows you to directly publish HTML pages to Cloudflare Workers and obtain a preview link.

Overview

What is Cf Page Publish Mcp

cf-page-publish-mcp is a tool designed for publishing HTML pages directly to Cloudflare Workers, allowing users to obtain preview links for their pages.

Use cases

Use cases include creating landing pages, documentation sites, or any HTML content that needs to be quickly published and accessed via a URL.

How to use

To use cf-page-publish-mcp, clone the repository, create and bind a KV namespace on Cloudflare, configure your domain in the wrangler.jsonc file, and then deploy the project using npm and pnpm.

Key features

Key features include the ability to publish HTML content by providing a page title and content, upload to Cloudflare KV, and receive a direct access link for the published page.

Where to use

cf-page-publish-mcp can be used in web development, particularly for developers looking to quickly publish and preview HTML pages on the Cloudflare platform.

Content

简介

English | English

cloudflare 页面发布 mcp 工具,可以将 html 页面发布到 cloudflare,worker 上。

sse 体验地址:cf-page-publish-sse

streamableHttp 体验地址:cf-page-publish-stream

体验地址使用worker绑定github的方式部署,确保体验地址与源码保持同步。

核心功能

页面发布

接受两个参数,页面标题和页面内容,可以将 html 内容上传到 cloudflare kv,

返回一个参数,页面的访问链接

自部署教程

环境要求

  • cloudflare 账户
  • node
  • pnpm

部署教程

复制源码

git clone https://github.com/Actrue/cf-page-publish-mcp.git #复制源代码
cd cf-page-publish-mcp #导航到源码

创建并绑定 kv

wrangler kv namespace create cf-page-publish-mcp #创建kv

执行上述命令后获得以下内容

🌀 Creating namespace with title "cf-page-publish"
✨ Success!
Add the following to your configuration file in your kv_namespaces array:
{
  "kv_namespaces": [
    {
      "binding": "cf_page_publish",
      "id": "7d776eaeacd0412380f6eb39ca4aea9a"
    }
  ]
}

复制 kv_namespaces 的 id

打开 wrangler.jsonc 文件

	"routes": [{"pattern": "page.sereniblue.com","custom_domain": true}],//替换成你的域名
	"vars": {
		"host":"page.sereniblue.com",//替换成你的域名
	},
	"kv_namespaces": [
		{
		  "binding": "KV",
		  "id": "7d776eaeacd0412380f6eb39ca4aea9a"//替换成刚创建的kv的id
		}
	  ],

page.sereniblue.com 这个域名替换为自己的域名,把 kv 的 id 切换成刚创建的 id

部署项目

npm i pnpm -g #安装pnpm
pnpm i #安装项目依赖
npx wrangler deploy #发布项目至cloudflare

核心技术

Tools

No tools

Comments