静态网站部署工具

Pinme Deploy MCP Server 是一个帮助用户一键将静态网站部署到 IPFS 网络的工具,支持文件或目录上传、智能检测构建目录和状态检查。

  • by liaoshengrong
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 liaoshengrong/pinme-deploy-mcp

使用说明

Pinme Deploy MCP Server

A Model Context Protocol (MCP) server that integrates Pinme functionality to help users deploy static websites to IPFS networks with just one click.

GitHub: https://github.com/liaoshengrong/pinme-deploy-mcp

Features

  • 🚀 One click uploadQuickly upload static websites, HTML files, or front-end projects to Pinme (IPFS)
  • 📁 Flexible support: Supports uploading individual files or entire directories
  • 🔍 Intelligent DetectionAutomatically detect common build output directories (build, dist, out,. next, etc.) without manually specifying paths
  • 🌐 status checkCheck the status and accessibility of deployed projects through CID or ENS URL
  • 📋 Deployment ListView all uploaded project history records, including CID, ENS URL, and other information

install

Method 1: Use NPX from GitHub (recommended, simplest)

No installation required, use directly in the cursor configuration file:

{
  "mcpServers": {
    "pinme-deploy": {
      "command": "npx",
      "args": ["-y", "git+https://github.com/liaoshengrong/pinme-deploy-mcp.git"]
    }
  }
}

If encountering NPX cache errorsRun the following command to clear the cache and retry:

rm -rf ~/.npm/_npx

Method 2: Install globally from GitHub

npm install -g github:liaoshengrong/pinme-deploy-mcp

Then add in the cursor configuration file:

{
  "mcpServers": {
    "pinme-deploy": {
      "command": "pinme-deploy-mcp"
    }
  }
}

Method 3: Use installation script

curl -fsSL https://raw.githubusercontent.com/liaoshengrong/pinme-deploy-mcp/main/install.sh | bash

Or download and execute:

chmod +x install.sh
./install.sh

Method 4: Local development and installation

git clone https://github.com/liaoshengrong/pinme-deploy-mcp.git
cd pinme-deploy-mcp
npm install
npm run build

Then use an absolute path in the cursor configuration:

{
  "mcpServers": {
    "pinme-deploy": {
      "command": "node",
      "args": ["/absolute/path/to/pinme-deploy-mcp/dist/index.js"]
    }
  }
}

configuration

environment variable

Optional environment variables:

  • PINME_API_KEYPinme API Key (if deployed using API)

Pinme CLI

No global installation requiredThe tool will be automatically used npx Run Pinme CLI without prior installation.

If manual installation is required (optional):

npm install -g pinme

Instructions for use

Running as an MCP server

npm start

Use in cursor or other MCP clients

  1. Configure MCP server path
  2. Use the following tools:

deploy_to_pinme

Upload files or directories to Pinme.

parameter

  • path (Optional): The file or directory path to upload. If not specified, it will automatically detect common build output directories (build, dist, out,. next, etc.) in the current directory

Automatically detected directory:

  • build - React (Create React App)
  • dist - View, Speed, Webpack
  • out -Next.js (some configurations)
  • .next - Next.js
  • public -Some static sites
  • output -Some projects
  • .output - Nuxt.js
  • site -Some static site generators

Example:

Automatic detection (recommended, no need to specify path):

{}

Or specify the directory:

{
  "path": "./build"
}

Or upload a single file:

{
  "path": "./index.html"
}

Return information:

  • Preview address(https://pinme.eth.limo/#/preview/...)
  • IPFS CID
  • ENS address(https://xxxxx.pinit.eth.limo)

check_pinme_status

Check the status of deployed projects.

parameter

  • cid (Optional): IPFS CID (Content Identifier)
  • ensUrl (Optional): ENS URL (e.g.:https://xxxxx.pinit.eth.limo)

Example:

{
  "cid": "bafkreiekm6o7tb4p53jtw7nwm42qlklqhdn37lj5jqoj4bdvjtfsgnr734"
}

Or use ENS URL:

{
  "ensUrl": "https://f34fc1b3.pinit.eth.limo"
}

list_deployments

List all uploaded project history records.

Return information:

  • File Name/Project Name
  • local path
  • IPFS CID
  • ENS URL (accessible online address)
  • file size
  • number of files
  • Type (file/directory)
  • Upload Date

development

development mode

npm run dev

monitor mode

npm run watch

Precautions

  1. Pinme CLIPinme CLI must be installed(npm install -g pinme)Otherwise, the tool will not work
  2. Files/directoriesSupport uploading individual files (such as HTML) or entire directories (such as built static websites)
  3. ENS URLsAfter successful upload, an ENS URL will be generated (format:https://xxxxx.pinit.eth.limo)This is an accessible online address
  4. Preview URLAfter uploading, a preview address will be returned(https://pinme.eth.limo/#/preview/...), used for previewing on the Pinme platform

tech stack

  • TypeScript
  • Model Context Protocol SDK
  • Node.js

license

MIT

Usage example

Automatically detect and upload build directory (recommended)

# 在项目根目录下,无需指定路径,自动检测 build 或 dist 目录
# 在 Cursor 中调用 MCP 工具
deploy_to_pinme({})

Upload the specified build directory

# 在 Cursor 中调用 MCP 工具
deploy_to_pinme({ path: "./build" })
# 或
deploy_to_pinme({ path: "./dist" })

Upload a single HTML file

# 在 Cursor 中调用 MCP 工具
deploy_to_pinme({ path: "./index.html" })

View upload history

# 在 Cursor 中调用 MCP 工具
list_deployments()

React project deployment process

# 1. 构建项目
npm run build

# 2. 在 Cursor 中调用(自动检测 build 目录)
deploy_to_pinme({})

Related links