picgo-mcp
picgo-mcp
クイックスタート: 以下のプロンプトをコーディングエージェントに送信してください:
https://github.com/timerring/PicGo-MCP から PicGo MCP Server をインストールして設定してください。
PicGo Core をプロセス内に直接組み込む MCP stdio server です。Codex、Claude Desktop などの MCP クライアントが既存の PicGo 画像ホスティング設定を再利用できるようにし、PicGo デスクトップ版の実行は不要で、127.0.0.1:36677 も経由しません。
特徴
PicGo Core 3 を直接呼び出し、デスクトップ版への依存なし。
ローカルファイル、
file://URL、HTTP(S) 画像 URL に対応。単一画像と最大20枚の一括アップロードに対応。
PicGo Desktop、PicGo Core、CLI の設定を自動検出。
アップロード後のファイル名と返却形式をカスタマイズ可能。
並行呼び出しは自動的にキューイングされ、PicGo の可変なアップロード状態の相互汚染を防止。
状態ツールは token や secret などの設定値を返さず、ユーザーのホームディレクトリを
~として表示。
Related MCP server: flin-imgbb-mcp
環境要件
Node.js
>=20.19.0有効な PicGo 設定ファイル
インストール
ソースからインストール:
npm install
npm run build
npm install -g .コマンドが使用可能であることを確認:
picgo-mcp --helpCodex へのインストール
codex mcp add picgo -- picgo-mcp
codex mcp get picgoMCP server を追加したら、新しいタスクを作成するかクライアントを更新して、ツール一覧を再読み込みしてください。
その他の MCP クライアント
グローバルインストール後、以下の stdio 設定を使用できます:
{
"mcpServers": {
"picgo": {
"command": "picgo-mcp"
}
}
}設定ファイルを明示的に指定する場合:
{
"mcpServers": {
"picgo": {
"command": "picgo-mcp",
"args": ["--config", "/path/to/picgo/config.json"]
}
}
}環境変数 PICGO_CONFIG_PATH を設定することもできます。--config は環境変数や自動検出よりも優先されます。
PicGo 設定
デフォルトでは次の順序で検索します:
macOS:
~/Library/Application Support/picgo/data.jsonWindows:
%APPDATA%/picgo/data.jsonLinux:
$XDG_CONFIG_HOME/picgo/data.jsonまたは~/.config/picgo/data.json全プラットフォーム:
~/.picgo/config.json
GitHub 画像ホスティングの例
以下の例では、画像をリポジトリの images/ ディレクトリにアップロードし、jsDelivr を通じて CDN アドレスを返します:
{
"picBed": {
"uploader": "github",
"current": "github",
"github": {
"repo": "OWNER/REPOSITORY",
"branch": "main",
"path": "images/",
"customUrl": "https://cdn.jsdelivr.net/gh/OWNER/REPOSITORY@main",
"token": "YOUR_GITHUB_TOKEN"
}
},
"picgoPlugins": {},
"settings": {
"picgoMcp": {
"uploadNameTemplate": "${dateTime}-${fileName}${extName}",
"outputFormat": "${url}"
}
}
}GitHub token には対象リポジトリへの書き込み権限が必要です。実際の token を Git、Issue、ログ、チャット履歴にコミットしないでください。また、設定ファイルの権限を現在のユーザーのみ読み取り可能に制限してください:
chmod 600 ~/.picgo/config.jsonPicGo Core 3 が初めて旧バージョンの設定を読み取る際、uploader 設定や内部メタデータを追加する場合があります。これは正常な自動マイグレーション動作です。
ファイル名テンプレート
設定場所:
{
"settings": {
"picgoMcp": {
"uploadNameTemplate": "${dateTime}-${fileName}${extName}"
}
}
}サポートされる変数:
変数 | 例 | 説明 |
|
| ローカル日付 |
|
| 秒単位のローカル日時 |
|
| 拡張子を含まない元のファイル名 |
|
| 元の拡張子 |
|
| 一括アップロード時のゼロ始まりのインデックス。単一画像アップロード時は空 |
推奨設定:
${dateTime}-${fileName}${extName}${dateTime}${extName} のみを使用すると、同一秒内にアップロードされた画像で名前が衝突する可能性があります。テンプレートはホワイトリストに登録されたプレースホルダーの置換のみを実行し、JavaScript は実行しません。また、ファイル名を通じて ../ などの追加パスを書き込むことはできません。リモートディレクトリはアップローダーの path 設定を使用してください。
出力テンプレート
設定場所:
{
"settings": {
"picgoMcp": {
"outputFormat": "${url}"
}
}
}サポートされる変数:
${url}:アップロード後の画像 URL。${uploadedName}:拡張子を含まないアップロード後のファイル名。
一般的な形式:
${url}
ツールのレスポンスには常に画像情報、URL 配列、Markdown、テンプレートから生成された formattedOutput が含まれるため、呼び出し側は必要に応じてフィールドを選択できます。
MCP ツール
upload_image
ローカルまたはリモートの画像を1枚アップロードします:
{
"source": "/path/to/image.png"
}upload_images
1〜20枚の画像を一括アップロードします:
{
"sources": [
"/path/to/first.png",
"https://example.com/second.jpg"
]
}get_picgo_status
設定の存在有無、PicGo バージョン、現在のアップローダー、設定済みフィールド名、利用可能なアップローダーを返します。このツールは設定値や画像ホスティングの認証情報を返しません。
アップロード結果の例
{
"images": [
{
"url": "https://cdn.example.com/images/2026-08-23-17-34-47-example.png",
"fileName": "2026-08-23-17-34-47-example.png",
"width": 800,
"height": 600,
"size": 123456
}
],
"urls": [
"https://cdn.example.com/images/2026-08-23-17-34-47-example.png"
],
"markdown": "",
"formattedOutput": "https://cdn.example.com/images/2026-08-23-17-34-47-example.png"
}動作の仕組み
MCP クライアントは通常、picgo-mcp stdio プロセスを起動し、現在のクライアントセッション中にそれを再利用します。画像の読み取り、画像ソースと画像ホスティングサービスへのアクセスは、アップロードツールを呼び出した場合のみ行われます。クライアントが接続を閉じると、server プロセスは終了し、メモリを解放します。
PicGo はインスタンス上に可変の入力状態と出力状態を保持するため、このプロジェクトは並行するアップロードリクエストを直列に実行します。
セキュリティ
コマンド引数に token を渡さないでください。認証情報は PicGo 設定で管理されます。
MCP ツールは画像ホスティングの認証情報を返しません。状態ツールはフィールド名のみを返します。
ツールのレスポンス内のホームディレクトリパスは
~に置き換えられます。HTTP(S) 画像はまず PicGo がダウンロードし、その後に設定済みの画像ホスティングへアップロードされます。
PicGo は設定に応じてプラグインを読み込みます。信頼できるプラグインのみをインストールして有効化してください。
stdio server を信頼できないクライアントに公開しないでください。
PicGo 3.0.1 の依存ツリーには現在も、image-size と旧バージョンの inquirer/tmp に関する npm セキュリティアドバイザリが含まれています。前者は特別に細工された画像を処理するとプロセスのサービス拒否を引き起こす可能性があり、後者はこのプロジェクトが呼び出さない PicGo CLI の対話パスに位置します。これらの依存関係は PicGo 側でアップグレードされる必要があります。
開発と検証
npm install
npm test
npm run check
npm run build現在のテストは、設定の検出、MCP ツールの登録、状態のマスキング、アップロード入力の検証、命名テンプレート、出力テンプレート、公開ファイルのプライバシーチェックをカバーしています。
ライセンス
Available Tools
3 toolsget_picgo_statusInspect PicGo statusARead-onlyIdempotent
Show the selected config path, PicGo version, active uploader, configured field names, and available uploaders. Secret values are never returned.
Inputs: no named parameters.
upload_imageUpload one image with PicGoA
Upload one local image file or HTTP(S) image URL using the active PicGo uploader.
Inputs: source (required).
upload_imagesUpload multiple images with PicGoA
Upload up to 20 local image files or HTTP(S) image URLs in one PicGo batch.
Inputs: sources (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
upload_image and upload_images are clearly differentiated as singular vs. batch operations, and get_picgo_status serves a distinct diagnostic purpose. No tools overlap in a way that would cause selection confusion.
All tool names follow the same snake_case verb_noun pattern: upload_image, upload_images, get_picgo_status. The naming is predictable and consistent across the set.
Three tools is on the smaller side but well-suited for a focused image-upload server. Each tool provides a distinct needed capability: single upload, batch upload, and status/configuration inspection.
The server covers the core upload lifecycle well, including single and batch uploads plus status/uploader information. A minor gap is the lack of an explicit uploader-selection or configuration tool, but the active uploader is readable via status, so agents can work around it.
Related MCP Connectors
MCP server exposing the YourImageShare upload API (upload/list/delete) as tools for AI agents.
Compress, resize, crop, and convert images with the Smally API from any MCP client.
Generate and edit images and generate videos with Nanobananana's remote MCP server.
Generate detailed AI image prompts from image URLs or base64 data using a remote MCP server.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA lightweight MCP server for image processing and cloud uploads that automates resizing, converting, optimizing, and uploading images to services like AWS S3, Cloudflare R2, and Google Cloud Storage.16 npm18MIT
- AlicenseAqualityDmaintenanceMCP server for uploading images to ImgBB from Claude-compatible clients.3MIT
- AlicenseNot gradedqualityDmaintenanceEnables uploading images to a running PicGo application through its built-in server.3 npm5Apache 2.0
- AlicenseBqualityBmaintenanceA local (stdio) MCP server for PixelVault — agent-first image hosting, enabling upload of local files by path without base64.2710 npmMIT