Spec Driven Development
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Fixes DPI coordinate scaling for Windows desktop automation MCP servers.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
WINDOWS_MCP_PATHต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"precision-desktop": {
"command": "uvx",
"args": [
"precision-desktop"
],
"env": {
"WINDOWS_MCP_PATH": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add precision-desktop --env WINDOWS_MCP_PATH='ใส่ค่าของคุณ' -- uvx precision-desktopเติมค่าที่เว้นว่างไว้ก่อนรัน
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"precision-desktop": {
"command": "uvx",
"args": [
"precision-desktop"
],
"env": {
"WINDOWS_MCP_PATH": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"precision-desktop": {
"type": "stdio",
"command": "uvx",
"args": [
"precision-desktop"
],
"env": {
"WINDOWS_MCP_PATH": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
WINDOWS_MCP_PATH envค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub ikoskela ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.1.1) เข้า registry 9 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย
ในหมวดเดียวกันมี Spec Driven Development, Remote Desktop Commander, Zendesk
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Zendesk MCP Pack — tickets, users, organizations via OAuth.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
mcp-name: io.github.ikoskela/precision-desktop
A companion MCP server that fixes DPI coordinate scaling for Windows desktop automation.
Windows DPI scaling silently breaks every MCP tool that clicks, types, or hovers on the desktop. precision-desktop detects and corrects the coordinate mismatch so your AI agent's clicks actually land where they should.
Windows has two coordinate systems and doesn't tell you which one you're using.
When Windows DPI scaling is set above 100% (which it is on most modern laptops and monitors), different Windows APIs return coordinates in different systems:
| Coordinate System | Used By | Example: Point at 50% across a 4K display |
|---|---|---|
| Physical (pixels) | Mouse events, SetCursorPos, UI Automation* | 1920, 1080 |
| Logical (DPI-scaled) | GetWindowRect, Cursor.Position, .NET, screenshots | 1097, 617 (at 175% scaling) |
\* *UI Automation returns physical on DPI-aware processes, logical on others — yet another inconsistency.*
The ratio between them is your DPI scale factor (e.g., 1.25x, 1.5x, 1.75x, 2.0x).
The problem isn't just "some APIs return logical." It's that different APIs return different coordinate systems with no indication of which one you're getting. There's no flag, no header, no type annotation — just numbers that look identical but mean completely different things.
1. API mismatch — Click tools accept physical coordinates, but common Windows APIs return logical:
What the AI wants to click: [Button at physical (1920, 1080)]
What GetWindowRect says: [Button at logical (1097, 617)] Where the click lands: (1097, 617) in physical space ^^^^^^^^^ WRONG - completely different spot
2. Screenshot mismatch — Screen captures are taken at logical resolution, but click tools expect physical coordinates. On a 3840x2400 display at 175% scaling, screenshots are 2194x1371 pixels. When a vision model (GPT-4o, Claude, CogAgent) looks at a screenshot and estimates "the button is at pixel (500, 300)," that's a logical coordinate. Clicking there in physical space misses by hundreds of pixels:
Vision model sees: [Button at (500, 300) in screenshot]
Screenshot space: Logical (2194x1371) Click-Tool expects: Physical (3840x2400) Correct click: (875, 525) ← needs 1.75x conversion
3. Mixed sources within the same tool — Even a single tool can return both systems. For example, windows-mcp's State-Tool reports element coordinates in physical space (correct for clicking), but its screenshots are captured at logical resolution. An agent combining both — reading element positions from the accessibility tree *and* estimating positions from screenshots — will silently mix coordinate systems.
If you've ever watched an AI agent click confidently at exactly the wrong spot, DPI scaling is probably why.
precision-desktop is a companion MCP server that sits alongside your desktop automation MCP (like windows-mcp) and provides:
| Tool | Description |
|---|---|
calibrate | Compute DPI scale factors from 2+ reference points with known physical and logical coordinates |
calibrate_verify | Mark calibration as verified after confirming a test click landed correctly |
get_calibration | Read current calibration state (scale factors, verification status, age) |
convert_coordinates | Convert a coordinate pair between physical and logical systems |
find_ui_element | Find a single UI element by name using Windows UI Automation. Returns physical coordinates |
find_all_ui_elements | Find all UI elements matching a name. Returns list with physical coordinates |
list_ui_elements | List all named interactive elements (buttons, text fields, etc.) in a window |
find_window | Find a window handle (hwnd) by title substring |
health_check | Run environment checks: calibration freshness, UI Automation, companion MCP status |
patch_status | Check which DPI-aware patches are applied to the companion MCP |
Clone this repo and install dependencies:
git clone https://github.com/ikoskela/precision-desktop.git
cd precision-desktop pip install -e .
Add to your Claude Code MCP configuration (.mcp.json or settings):
{
"mcpServers": { "precision-desktop": { "command": "python", "args": ["C:/path/to/precision-desktop/server.py"] } } }
Or if using Claude Desktop, add to claude_desktop_config.json:
{
"mcpServers": { "precision-desktop": { "command": "python", "args": ["C:\\path\\to\\precision-desktop\\server.py"] } } }
The AI agent calibrates itself on first use. The flow:
calibrate_verifyCalibration persists in state/calibration.json and only needs to be redone if DPI settings change or the display configuration changes.
Two coordinate readings for the same point:
[System.Windows.Forms.Cursor]::Position in PowerShell, or GetWindowRect API calls{
"points": [ { "physical_x": 38, "physical_y": 2365, "logical_x": 21, "logical_y": 1351, "label": "start_button" }, { "physical_x": 3691, "physical_y": 2332, "logical_x": 2109, "logical_y": 1332, "label": "datetime" } ] }
This computes a scale factor (here, ~1.75x) and persists it for future coordinate conversions.
After calibration, the agent should:
convert_coordinates to convert a known logical position to physicalcalibrate_verify with success: trueBeyond coordinate conversion, precision-desktop can locate elements directly by name using Windows UI Automation — no coordinates needed.
Agent: find_ui_element(element_name="Save", window_title="Notepad")
→ { "name": "Save", "center_x": 450, "center_y": 32, "control_type": "button", ... } (coordinates are physical, ready for Click-Tool)
This works for:
You can scope searches to a specific window to avoid finding elements in the wrong application:
find_ui_element(element_name="Submit", window_title="My App")
find_ui_element(element_name="Close", window_handle=12345)
Don't know the element name? Use list_ui_elements to see what's available:
list_ui_elements(window_title="Settings")
→ [{ "name": "General", "control_type": "tab item", ... }, { "name": "Apply", "control_type": "button", ... }, ...]
precision-desktop is designed to work alongside windows-mcp (or any MCP that provides desktop click/type/scroll tools).
Rather than forking windows-mcp, precision-desktop describes patch intents — what should change in the companion MCP and why. The AI agent reads these intents and applies version-appropriate patches itself.
Current patch intents:
coordinate_system parameter to Click-Tool and Move-Tool that auto-converts logical coordinates to physicalelement_name parameter to Click-Tool that finds and clicks an element by name (no coordinates needed)Use patch_status to check which patches are applied.
If windows-mcp is installed in a non-standard location, set the WINDOWS_MCP_PATH environment variable:
WINDOWS_MCP_PATH=C:\path\to\windows-mcp
By default, it looks in the standard Claude Extensions directory (%APPDATA%\Claude\Claude Extensions\ant.dir.cursortouch.windows-mcp).
precision-desktop/
├── server.py # MCP server entry point — tool definitions and routing ├── calibration.py # DPI calibration: compute, persist, convert coordinates ├── find_element.py # Windows UI Automation: find elements, list elements, find windows ├── health_check.py # Environment checks: calibration, UI Automation, companion MCP ├── patches/ │ └── windows_mcp.py # LLM-adaptive patch intents for windows-mcp ├── state/ │ └── calibration.json # Persisted calibration data (user-specific, gitignored) └── pyproject.toml
calibration.py computes the median scale factor for X and Y axes independentlystate/calibration.jsonconvert_coordinates calls use the persisted factorsfind_element.py runs PowerShell scripts that load UIAutomationClient and UIAutomationTypes assembliesตัดมาแค่ช่วงต้น อ่านต่อใน repo