1Panel MCP Server

by ruibaby
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Allows for automated website deployment to 1Panel servers, including creating websites if they don't exist, uploading static website files, and providing deployment statistics.

  • Provides video demonstration capabilities, with a specific demo video hosted on Bilibili showcasing the 1Panel deployment functionality.

1パネルMCPサーバー

1Panel への Web サイトの自動展開のためのモデル コンテキスト プロトコル (MCP)サーバー。

[!IMPORTANT] 現在、このプロジェクトは実験的なプロジェクトであり、直接使用できるわけではありません。

ビデオデモ

https://www.bilibili.com/video/BV1SjQRY3EmM/

特徴

  • 1Panelサーバーへのウェブサイトの展開を自動化
  • 存在しないウェブサイトを作成する
  • 静的ウェブサイトファイルを1Panelにアップロードします
  • MCP標準プロトコルと完全に互換性があります

インストール

# Clone the repository git clone https://github.com/yourusername/1panel-mcp-server.git cd 1panel-mcp-server # Install dependencies npm install # Or if you use pnpm pnpm install # Configure environment variables cp .env.example .env

1Panel サーバー情報を使用して.envファイルを編集します。

PORT=3000 ONEPANEL_BASE_URL=http://your-1panel-ip:port/api/v1 ONEPANEL_API_KEY=your_api_key ONEPANEL_LANGUAGE=zh # Language options: zh (Chinese) or en (English)

使用法

サーバーを起動する

# Start the server npm start # For development with auto-reload npm run dev

カーソルIDEでMCPを構成する

このサーバーを Cursor IDE で使用するには、次の MCP 構成を追加します。

  1. オープンカーソル
  2. .cursor/mcp.jsonを作成する
{ "mcpServers": { "Deploy to 1Panel": { "url": "http://localhost:3000/sse" } } }

MCPを使用してウェブサイトを展開する

Cursor では、AI チャットで次のコマンドを使用して Web サイトを展開できます。

Deploy to 1Panel with domain=yourdomain.com

または、次の形式を使用することもできます。

Deploy website to 1Panel server, domain: yourdomain.com

APIリファレンス

MCP ツール: deploy_website

ウェブサイトを 1Panel にデプロイします。

パラメータ:

  • domain (必須): ウェブサイトのドメイン
  • buildDir (オプション): ビルドディレクトリのパス

応答:

Successfully deployed to 1Panel! Domain: yourdomain.com URL: http://yourdomain.com Upload statistics: - Total files: 25 - Successfully uploaded: 25 - Failed to upload: 0

実装の詳細

展開プロセス

  1. ビルドディレクトリのチェック: 指定されたビルドディレクトリが存在するかどうかを確認します
  2. ウェブサイトの作成: 存在しない場合は、1Panel API を通じて新しい静的ウェブサイトを作成します。
  3. ファイルアップロード: ビルドディレクトリからウェブサイトにすべてのファイルをアップロードします
  4. 統計: アップロードプロセスに関する詳細な統計を返します

トラブルシューティング

デプロイメントの問題が発生した場合は、次の点を確認してください。

  1. APIキーが有効であり、十分な権限があることを確認してください
  2. ウェブサイトディレクトリが存在し、書き込み権限があることを確認します
  3. 詳細なエラー情報については、1Panel サーバーのログを確認してください。
  4. ファイルのアップロードが失敗する場合は、ファイルの権限または形式の問題が原因である可能性があります。
-
security - not tested
F
license - not found
-
quality - not tested

モデルコンテキストプロトコルを実装して 1Panel サーバーへの Web サイトの展開を自動化する実験的なサーバー。これにより、ユーザーは自然言語コマンドを使用して Web サイトを作成し、静的ファイルをアップロードできます。

  1. Video demo
    1. Features
      1. Installation
        1. Usage
          1. Start the server
          2. Configure MCP in Cursor IDE
          3. Use MCP to Deploy Websites
        2. API Reference
          1. MCP Tool: deploy_website
        3. Implementation Details
          1. Deployment Process
        4. Troubleshooting
          ID: oll043mmpu