EdgeOne 页面 MCP
概览
什么是 EdgeOne Pages MCP?
EdgeOne Pages MCP 是一个旨在将 HTML 内容部署到 EdgeOne Pages 的服务,允许用户为其内容获取一个公开可访问的 URL。
如何使用 EdgeOne Pages MCP?
要使用 EdgeOne Pages MCP:
- 将您的 HTML 内容提供给 MCP 服务
- 服务将部署该内容
- 您将收到一个 公开 URL,可以立即访问
EdgeOne Pages MCP 的主要特点
- 使用 MCP 协议快速部署 HTML 内容
- 自动生成已部署内容的公开可访问 URL
EdgeOne Pages MCP 的使用案例
- 快速部署静态 HTML 网站
- 通过公开 URL 分享 HTML 内容以便于访问
- 与 EdgeOne Pages Functions 集成以实现无服务器应用程序
EdgeOne Pages MCP 的常见问题解答
什么是 MCP 协议?
MCP 协议是一种快速将内容部署到 EdgeOne Pages 的方法,确保快速访问和交付。
我可以部署的 HTML 内容有限制吗?
可能会根据 EdgeOne Pages 服务政策存在限制,因此最好参考文档以获取具体信息。
我如何访问已部署的内容?
部署后,服务将提供一个可以通过网页浏览器访问的公开 URL。
详情
EdgeOne Pages MCP
An MCP service for deploying HTML content, folder, and zip file to EdgeOne Pages and obtaining a publicly accessible URL.
<a href="https://glama.ai/mcp/servers/@TencentEdgeOne/edgeone-pages-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@TencentEdgeOne/edgeone-pages-mcp/badge" alt="EdgeOne Pages MCP server" /> </a>Demo
Deploy HTML
Deploy Folder
Requirements
- Node.js 18 or higher
Configure MCP
stdio MCP Server
Suitable for most MCP applications
{
"mcpServers": {
"edgeone-pages-mcp-server": {
"command": "npx",
"args": ["edgeone-pages-mcp"],
"env": {
// Optional. If deploying a folder or zip file to an EdgeOne Pages project
// provide your EdgeOne Pages API token.
// How to obtain your API token: https://edgeone.ai/document/177158578324279296
"EDGEONE_PAGES_API_TOKEN": "",
// Optional. Leave empty to create a new EdgeOne Pages project.
// Provide a project name to update an existing project.
"EDGEONE_PAGES_PROJECT_NAME": ""
}
}
}
}
Streamable HTTP MCP Server
Available in applications supporting Streamable HTTP MCP Server
{
"mcpServers": {
"edgeone-pages-mcp-server": {
"url": "https://mcp-on-edge.edgeone.site/mcp-server"
}
}
}
Architecture
The architecture diagram illustrates the workflow:
- Large Language Model generates HTML content
- Content is sent to the EdgeOne Pages MCP Server
- MCP Server deploys the content to EdgeOne Pages Edge Functions
- Content is stored in EdgeOne KV Store for fast edge access
- MCP Server returns a public URL
- Users can access the deployed content via browser with fast edge delivery
Features
- MCP protocol for rapid deployment of HTML content to EdgeOne Pages
- Automatic generation of publicly accessible URLs
Implementation
This MCP service integrates with EdgeOne Pages Functions to deploy static HTML content. The implementation uses:
-
EdgeOne Pages Functions - A serverless computing platform that allows execution of JavaScript/TypeScript code at the edge.
-
Key Implementation Details :
- Uses EdgeOne Pages KV store to store and serve the HTML content
- Automatically generates a public URL for each deployment
- Handles API errors with appropriate error messages
-
How it works :
- The MCP server accepts HTML content through the
deploy_html
tool - It connects to EdgeOne Pages API to get the base URL
- Deploys the HTML content using the EdgeOne Pages KV API
- Returns a publicly accessible URL to the deployed content
- The MCP server accepts HTML content through the
-
Usage Example :
- Provide HTML content to the MCP service
- Receive a public URL that can be accessed immediately
For more information, see the EdgeOne Pages Functions documentation and EdgeOne Pages KV Storage Guide.
License
MIT
Server配置
{
"mcpServers": {
"edgeone-pages-mcp-server": {
"command": "npx",
"args": [
"edgeone-pages-mcp"
]
}
}
}