跳到正文
DEV Community· Tweak·· 21 天前AI 評分37

我受夠「修改地獄」:透過 MCP 將客戶直接接入 Cursor IDE

I got tired of "Revision Hell," so I hooked my clients directly into my Cursor IDE via MCP

AI 導讀

作者開發瀏覽器擴充功能 tweak.page,讓客戶在 staging 網頁點選元素提交視覺意見,再透過自建 MCP 伺服器將 CSS 選擇器、DOM 片段及意見即時傳入本機 Cursor,供 Claude 讀取並協助修正 CSS。工具加入 Retainer Counter,可限制每月視覺需求數量,並讓客戶查看剩餘 tokens;作者稱溝通流程由 20 分鐘縮短至 5 秒。

正文

Tweak

Every developer running a freelance gig or working at a boutique web agency knows the exact dread of the "Client Handoff Phase."

You finish a gorgeous web layout. You send the staging URL. Then, the nightmare begins:

  • A Slack message: "Can we fix the spacing on the home button?" (Which home button? There are three).
  • An email containing a blurry, cropped screenshot with no context.
  • A text message asking for a change that is completely out of index scope.

Last month, after spending an entire Saturday morning manually digging through DOM elements trying to figure out what a client meant by "the text looks weird near the top," I decided I had enough.

As a developer using Cursor and Claude for 90% of my UI coding, I realized the data pipeline was completely broken. Why was I playing translator between a non-technical client and an AI code editor?

The Experiment: Visual Feedback ➔ MCP Context ➔ AI Auto-Fix

I built a browser extension called tweak.page. The architecture is simple:

  1. I drop a small script tag into my staging HTML head.
  2. The client opens the link. They install absolutely nothing. They just point-and-click directly on the live page layout to leave a visual comment.
  3. The extension grabs the exact CSS selector, the DOM element snippet, and their note.

Here is where it gets fun. I built a custom Model Context Protocol (MCP) server for it. When the client hits submit, that exact HTML element and visual complaint streams live into my local Cursor environment.

Instead of searching my codebase, I open the chat sidebar, Claude reads the live visual issue code directly via the MCP server payload, and I hit "Apply" to let the AI auto-fix the CSS alignment. A 20-minute translation game turned into a 5-second workflow.

The Twist: Stopping the Spam

When I first tested it, I hit a massive roadblock. Because making feedback was too easy, the client started clicking everything, requesting 40 tiny font tweaks in an hour. It threatened to destroy my project margins.

To fix my own mistake, I coded a Retainer Counter into the script dashboard. Now, freelancers can hard-cap the number of visual requests allowed per month. The client sees exactly how many tokens they have left, completely stopping scope creep without awkward arguments.

I've put the platform live. If you’re actively building web apps and using AI dev tools, I’d love to hear how you handle client feedback pipelines without losing your mind.

Here is the quick demo:
https://youtu.be/Hbmh1E6cn7g?si=nQQ04DFM6VLL8IzD

來源:DEV Community · dev.to