Screenshot MCP Server
スクリーンショットサーバー(ファイルパス重視)
このプロジェクトは、スクリーンショットをキャプチャし、主にクライアント (ホスト) によって指定されたファイル パスにスクリーンショットを保存することにより、他のプロセスまたは AI アシスタントによる使用を容易にするように設計された MCP (モジュラー通信プロトコル) サーバーを提供します。
中核問題と解決策
AIアシスタントがMCP経由で送信したスクリーンショット画像データを直接解釈することは、テストにおいて信頼性が低いことが判明しました。このサーバーでは、ファイルパスに重点を置いた、より堅牢なワークフローを採用しています。
推奨ワークフロー (WSL ホスト -> Windows Server):
MCP ホスト (WSL で実行されている AI アシスタントなど) は、 WSL ワークスペース パスを引数として提供して、
save_screenshot_to_host_workspaceツールを呼び出します。このサーバー (Windows 上で実行) は画面をキャプチャします。
サーバーは、受信した WSL パスを Windows がアクセス可能な UNC パス (例:
\\wsl$\Distro\path) に変換します。サーバーは、UNC パスを介して、ホストの WSL ファイルシステム内の指定された場所にスクリーンショットを保存します。
サーバーは
"success"または"failed:..."を返します。MCP ホストは、ファイルがワークスペース (またはパス引数で指定されている場合はサブディレクトリ) に保存されていることを認識します。
MCP ホストは、 WSL パスを別の専用 MCP サーバー (WSL で実行) に渡してイメージ分析を行うことができます。
代替ワークフロー(一般):
MCP ホストは、オプションでファイル名を指定して
take_screenshot_and_return_pathを呼び出します。サーバーはスクリーンショットをローカルの
images/ディレクトリに保存します。サーバーは保存されたファイルへの絶対パス(例: Windows パス) を返します。
MCP ホストはパスを受信し、それを(潜在的な変換とともに)分析サーバーに渡します。
Related MCP server: WSLSnapit-MCP
利用可能なツール
このサーバーは、推奨される使用法順に以下のツールを提供します。
save_screenshot_to_host_workspace(host_workspace_path: str, name: str = "workspace_screenshot.jpg")**推奨される使用方法:**スクリーンショットをAIアシスタント(ホスト)の現在のWSLワークスペースに直接保存します。シームレスな統合を実現するには、この方法が推奨されます。
**アクション:**スクリーンショットを撮影し、指定されたWSLパスをUNCパスに変換して、ホストのワークスペースにファイルを保存します。WSLディストリビューション名を自動検出します。
引数:
host_workspace_path(str): ホストのワークスペースの絶対 WSL パス (例:/home/user/project)。name(str, オプション): ファイル名。デフォルトはworkspace_screenshot.jpgです。
戻り値:
str-"success"または"failed: [error message]"。
take_screenshot_and_return_path(name: str = "latest_screenshot.jpg")**ユースケース:**スクリーンショットをサーバー上の場所を基準とした固定の
images/ディレクトリに保存し、絶対パス(通常はWindowsパス)を返します。呼び出し元が外部処理のためにパスを必要とする場合に便利です。引数:
name(str, オプション): ファイル名。デフォルトはlatest_screenshot.jpgです。
戻り値:
str- 絶対パスまたは"failed: [error message]"。
take_screenshot_path(path: str = "./", name: str = "screenshot.jpg")使用例: WindowsパスまたはUNCパスで指定された任意の場所にスクリーンショットを保存します(例:ホストのワークスペース外に保存する場合)。呼び出し元によるパスの指定は慎重に行う必要があります。
引数:
path(str, オプション): ターゲットディレクトリ (Windows または UNC パス)。デフォルトはサーバーの作業ディレクトリです。name(str, オプション): ファイル名。デフォルトはscreenshot.jpgです。
戻り値:
str-"success"または"failed: [error message]"。
セットアップと使用方法
1. 前提条件
**Python 3.x:**サーバーが実行されるマシンに必要です。
依存関係:
uvを使用してインストール:uv sync必要なライブラリには
mcp[cli]>=1.4.1、pyautogui、Pillowなどがあります。
2. サーバーの実行
このサーバーは通常、その構成に基づいて MCP ホストによって起動されます。
3. 環境に関する考慮事項(特にWSL2)
重要なポイント: Windows 画面をキャプチャするには、このscreenshot.pyサーバーをWindows 上で直接実行する必要があります。
推奨される WSL2 ホスト -> Windows Server セットアップ:
プロジェクトの場所:この
screenshot-serverプロジェクト フォルダーをWindows ファイルシステム(例:C:\Users\YourUser\projects\screenshot-server) に配置します。Windows の依存関係: Python、
uv、およびプロジェクトの依存関係 (uv sync ...) をWindowsのプロジェクト フォルダーに直接インストールします。MCPホスト構成(WSL内): PowerShellを使用してWindows上でサーバーを起動するように、MCPホスト(WSLで実行)を構成します
mcp_settings.json(または同等のファイル)を更新します。{ "mcpServers": { "Screenshot-server": { "command": "powershell.exe", "args": [ "-Command", "Invoke-Command -ScriptBlock { cd '<YOUR_WINDOWS_PROJECT_PATH>'; & '<YOUR_WINDOWS_UV_PATH>' run screenshot.py }" ] } // ... other servers ... } }パスを実際の Windows パスに置き換えます。
4. ワークフローの例(WSL の AI アシスタント)
AI アシスタントは現在のワークスペース パス (例:
/home/user/current_project) を識別します。AI アシスタントは
use_mcp_toolを使用してScreenshot-serverのsave_screenshot_to_host_workspaceを呼び出し、host_workspace_path="/home/user/current_project"とオプションでname渡します。"success"を受け取ります。AI アシスタントは、スクリーンショットが
/home/user/current_project/workspace_screenshot.jpg(または指定された名前) にあることを認識しています。AI アシスタントは、
use_mcp_toolを使用して、画像分析サーバー/ツール (これも WSL で実行) を呼び出し、WSL パス/home/user/current_project/workspace_screenshot.jpgを渡します。画像解析サーバーはファイルを読み取り、タスクを実行します。
ファイル構造
screenshot.py: コア MCP サーバー スクリプト。README.md: このドキュメント ファイル。pyproject.toml:uvのプロジェクト定義と依存関係。uv.lock: 依存関係ロック ファイル。.gitignore: Git 無視設定。.python-version: (オプション) Python バージョン指定子。server.log: サーバーによって生成されたログ ファイル。images/:take_screenshot_and_return_pathのデフォルトディレクトリ。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Screenshot any URL/HTML as PNG/JPEG/WebP, or read it as clean Markdown/text for LLMs.
- GrabbitOAuthlive.grabbit
Screenshot any URL as a hosted image. No local browser; handles bot walls and full-page captures.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Capture batches of public web pages in a real browser and download the screenshots as a zip.
Related MCP Servers
- AlicenseBqualityFmaintenanceEnables AI assistants running in WSL to capture Windows screenshots of full desktops, specific monitors, or individual windows by title or process name. It features DPI awareness, automatic path conversion between WSL and Windows, and customizable storage options.13MIT
- AlicenseAqualityFmaintenanceEnables AI assistants to capture screenshots and read clipboard content from Windows applications while operating within a WSL environment. It supports monitor or window-specific targeting and features intelligent image optimization for efficient data transfer.24MIT
- AlicenseNot gradedqualityDmaintenanceCaptures full-monitor screenshots and returns them as base64 inline or saved file. Supports macOS, Linux, Windows, and WSL2.40MIT
- AlicenseNot gradedqualityDmaintenanceA modern Model Context Protocol (MCP) Server for Windows Screenshots built with .NET 10. It simulates Print Screen functionality and enables AI assistants to capture screenshots.1MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/KunihiroS/screenshot-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server