pinchtab-mcp
它能做什么
这个技能让 AI 通过 PinchTab MCP 服务器操作浏览器。适合希望 AI 打开页面、填写表单并收集页面内容的人。
适用场景
- ✓当你希望 AI 通过 MCP 工具打开某个网站并进行操作时。
- ✓当你需要在远程浏览器中填写多步骤表单时。
- ✓当你希望以可重复的流程提取页面文字或数据时。
技能链接
https://github.com/pinchtab/pinchtab/blob/main/plugins/grok/skills/pinchtab-mcp/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请打开供应商门户,用我的信息填写订单表单,然后读回确认文字。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会打开页面,获取一份带编号元素引用的简洁快照,然后使用这些引用进行点击或输入,并检查结果。由于页面加载后引用会失效,它每次加载页面后都会重新获取快照。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Browser Automation via PinchTab MCP
Use MCP tools to control a browser through the PinchTab HTTP API. The MCP server defaults to http://127.0.0.1:9867; for remote or containerized PinchTab instances, override with the PINCHTAB_SERVER env var (e.g. PINCHTAB_SERVER=http://pinchtab:9867).
Core Workflow
- Navigate:
pinchtab_navigate(url="https://example.com")— auto-creates a session and tab. - Observe:
pinchtab_snapshot(interactive=true, compact=true)— returns numbered refs likee5,e12. - Interact:
pinchtab_click(selector="e5")— use refs from the snapshot. - Verify:
pinchtab_get_text()or re-snapshot to confirm the action succeeded.
Critical rule: An element ref (e5, e12) denotes a DOM node, so the same node keeps its ref across interactive vs full, a selector scope and a depth limit — a filtered view is therefore sparse (e0, e1, e6), never assume refs are contiguous. What a ref does NOT survive is navigation to a new document: refs expire on page load, so always re-call pinchtab_snapshot afterwards. A ref that can no longer resolve to its node is refused with vocab_superseded (or ref not found), never acted on positionally — the tools carry each snapshot's vocabulary token forward so a filter-only re-read keeps a ref valid while a new document supersedes it.
Tool Selection Guide
Choose the cheapest tool that satisfies your goal:
| Goal | Tool | Token Cost |
|---|---|---|
| Check a specific value | pinchtab_eval(expression="document.title") |
Lowest |
| Find a specific element | pinchtab_find(query="login button") |
Low |
| Read page text only | pinchtab_get_text() |
Low |
| Read a whole site to markdown | pinchtab_scrape(url=..., preview=true) then expand |
Varies |
| Find interactive elements | pinchtab_snapshot(interactive=true, compact=true) |
Medium |
| Full page structure | pinchtab_snapshot() |
Medium-High |
| Visual verification | pinchtab_screenshot() |
Highest |
Default observation: pinchtab_snapshot(interactive=true, compact=true) — returns only interactive elements in compact format. Use this as your starting point.
Navigation
pinchtab_navigate(url="https://example.com")
- Always include
http://orhttps://scheme. - Returns the tab ID and a basic confirmation.
- Follow with
pinchtab_snapshot()to get element refs. - For read-heavy tasks, consider blocking images (set via config on the server).
After navigation: Always call pinchtab_snapshot() before interacting. The page may have redirects, modals, or cookie banners.
Site scrape
To read a whole site (not one page) into markdown, use pinchtab_scrape — it crawls over HTTP first and browser-renders only the pages that need it (thin, blocked, or JS-only).
pinchtab_scrape(url="https://example.com", preview=true)
- Large sites: call with
preview=truefirst for a token-cheap outline (per-page titles, sizes, snippets, and which pages need the browser — no full bodies). Full reports can be large; don't scrape everything blind. - Drill down: expand the pages you picked from the preview with
only(comma-separated URLs):pinchtab_scrape(url="https://example.com", only="https://example.com/a, https://example.com/b"). noBrowser=truefor an HTTP-only crawl;enrichAll=trueto browser-render every page. Multi-page crawls run for minutes.
Observation
Snapshot (primary)
pinchtab_snapshot(interactive=true, compact=true)
Returns an accessibility tree, one element per line as ref:role "name":
e0:link "About"
e2:button "Sign in"
e5:textbox "Search"
Key rules:
- Each line's leading
eNis the ref to pass to action tools. - Refs are the fastest way to target elements.
- Use
diff=trueafter an interaction to see only changed elements (saves tokens). - Use
selectorto scope the snapshot to a specific section.
Text extraction
pinchtab_get_text()
Use when you only need to read content (articles, dashboards, results). Cheaper than snapshot when you won't interact with elements.
Find elements
pinchtab_find(query="submit button")
Semantic search for elements without a full snapshot. Returns matching refs. Great for known targets.
Screenshots
pinchtab_screenshot()
Returns an MCP image (image/jpeg by default) — clients render it inline. The text block is always the JSON envelope `{"format": "jpeg"|"png", "anno
常见问题
为什么 AI 在每次页面加载后都要重新获取快照?
页面加载新内容时元素引用会失效,因此必须重新读取。
它可以使用远程浏览器吗?
可以。可以设置服务器地址,使工具连接到远程或容器化的 PinchTab 实例。
它如何检查某个操作是否成功?
每次操作之后,它都会读取页面文字或重新获取快照,以确认结果。
详情
作者的原始描述
Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.
repo: pinchtab/pinchtab
热度
- GitHub 星标
- 11k
- 排名
- #11874
- 许可证
- MIT
- 更新时间
- 2026/10/27
评论
- …