Tap — The Interface Protocol for AI Agents
Tap gives you deterministic browser automation. Instead of burning tokens on every click, forge a script once and run it forever — zero AI at runtime.
How It Works
Tap exposes MCP tools in 6 categories:
Run Pre-Built Skills (zero AI, instant results)
Use tap.list to see all 81 available skills, then tap.run to execute:
CODEBLOCK0
These run in under 1 second, cost $0, and return structured data every time.
81 skills across 41 sites: X/Twitter, Reddit, GitHub, YouTube, Bilibili, Zhihu, Xiaohongshu, Weibo, Medium, arXiv, Hacker News, Product Hunt, Bluesky, Steam, CoinGecko, and more.
Forge New Skills (AI creates, then never needed again)
When you need a site that doesn't have a pre-built skill:
- 1. Inspect —
forge.inspect({ url: "https://example.com" }) analyzes the page structure and available data sources - Verify —
forge.verify({ url: "...", expression: "..." }) tests the extraction logic live - Save —
forge.save({ site: "example", name: "data" }) persists the skill
After saving, tap.run({ site: "example", name: "data" }) works forever. No AI needed.
Direct Browser Control
Operate the browser via the page API for one-off interactions:
- -
page.nav({ url }) — navigate to a page - INLINECODE7 — click by selector or visible text
- INLINECODE8 — type into input fields
- INLINECODE9 — find elements by text
- INLINECODE10 — capture the current page
- INLINECODE11 ,
page.hover, page.pressKey, INLINECODE14 - INLINECODE15 — make API requests in the page context
Inspect & Debug
- -
inspect.dom — page DOM structure - INLINECODE17 — accessibility tree
- INLINECODE18 — page metadata and state
- INLINECODE19 — loaded resources
Tab Management
- -
tab.list — all open tabs - INLINECODE21 — open new tab
- INLINECODE22 — close tab
Setup
1. Install Tap
Download the latest binary from GitHub Releases and add to PATH.
Or build from source (requires Deno):
CODEBLOCK1
2. Install Chrome Extension
Download tap-extension.zip from the latest release, unzip, load as unpacked extension in chrome://extensions/.
3. Install Community Skills (optional)
CODEBLOCK2
4. Add MCP Server
Add to your OpenClaw MCP configuration:
CODEBLOCK3
Common Workflows
Research: aggregate trending across platforms
CODEBLOCK4
Monitor: track topics across sites
CODEBLOCK5
Publish: cross-post content
CODEBLOCK6
Forge: create a skill for any new site
CODEBLOCK7
Security & Trust
Provenance. Tap is open source (AGPL-3.0) at github.com/LeonTing1010/tap. All release binaries are built via GitHub Actions — verify by checking the CI workflow.
Chrome extension permissions. The extension requires debugger permission to send CDP commands to the active tab. It does NOT request <all_urls>, cookies, or webRequest in its manifest. The extension only activates when Tap is explicitly invoked.
Community skills. tap install clones scripts from tap-skills. All scripts are plain .tap.js files (readable JavaScript) — review before running. User-forged taps are stored locally in ~/.tap/taps/.
Scope of access. Tap operates on the active browser tab when invoked. It does not run in the background, does not access tabs you haven't navigated to, and does not persist any data beyond ~/.tap/.
Recommendation. Review the source code (~1,800 lines) and extension manifest before installing.
Tap — AI代理的接口协议
Tap为您提供确定性的浏览器自动化。无需在每次点击时消耗Token,一次编写脚本,永久运行——运行时零AI消耗。
工作原理
Tap提供6类MCP工具:
运行预制技能(零AI,即时结果)
使用tap.list查看全部81个可用技能,然后通过tap.run执行:
tap.run({ site: github, name: trending }) → 趋势仓库
tap.run({ site: hackernews, name: hot }) → HN热门故事
tap.run({ site: zhihu, name: hot }) → 知乎热榜
tap.run({ site: xiaohongshu, name: search, args: { keyword: AI } })
这些操作在1秒内完成,零成本,每次返回结构化数据。
覆盖41个网站的81个技能:X/Twitter、Reddit、GitHub、YouTube、Bilibili、知乎、小红书、微博、Medium、arXiv、Hacker News、Product Hunt、Bluesky、Steam、CoinGecko等。
锻造新技能(AI创建,后续无需再用)
当您需要访问尚未预制技能的网站时:
- 1. 检查 — forge.inspect({ url: https://example.com }) 分析页面结构和可用数据源
- 验证 — forge.verify({ url: ..., expression: ... }) 实时测试提取逻辑
- 保存 — forge.save({ site: example, name: data }) 持久化技能
保存后,tap.run({ site: example, name: data }) 永久可用,无需AI。
直接浏览器控制
通过页面API操作浏览器进行一次性交互:
- - page.nav({ url }) — 导航到页面
- page.click({ target }) — 通过选择器或可见文本点击
- page.type({ selector, text }) — 在输入框中输入
- page.find({ query }) — 通过文本查找元素
- page.screenshot() — 捕获当前页面
- page.scroll、page.hover、page.pressKey、page.select
- page.fetch({ url }) — 在页面上下文中发起API请求
检查与调试
- - inspect.dom — 页面DOM结构
- inspect.a11y — 无障碍树
- inspect.page — 页面元数据和状态
- inspect.resources — 已加载资源
标签页管理
- - tab.list — 所有打开的标签页
- tab.new({ url }) — 打开新标签页
- tab.close({ tabId }) — 关闭标签页
设置
1. 安装Tap
从GitHub Releases下载最新二进制文件并添加到PATH。
或从源码构建(需要Deno):
bash
git clone https://github.com/LeonTing1010/tap && cd tap
deno compile --allow-read --allow-write --allow-net --allow-env --allow-run --output tap src/cli.ts
2. 安装Chrome扩展
从最新发布下载tap-extension.zip,解压后在chrome://extensions/中加载为解压的扩展程序。
3. 安装社区技能(可选)
bash
tap install # 覆盖41个网站的81个技能
4. 添加MCP服务器
添加到您的OpenClaw MCP配置:
json
{
mcpServers: {
tap: {
command: tap,
args: [mcp]
}
}
}
常见工作流
研究:聚合跨平台趋势
- 1. tap.run github/trending
- tap.run hackernews/hot
- tap.run reddit/hot
→ 交叉引用结果,发现新兴话题
监控:跨网站追踪话题
- 1. tap.run x/search { keyword: AI agents }
- tap.run zhihu/search { keyword: AI agents }
- tap.run xiaohongshu/search { keyword: AI agents }
→ 比较各平台讨论情况
发布:跨平台发布内容
- 1. tap.run x/post { content: ... }
- tap.run xiaohongshu/publish { title: ..., content: ... }
- tap.run telegraph/publish { title: ..., content: ... }
锻造:为任意新网站创建技能
- 1. forge.inspect { url: https://newsite.com }
- forge.verify { url: ..., expression: ... }
- forge.save { site: newsite, name: data }
- tap.run newsite/data ← 永久可用,零AI
安全与信任
来源可溯。 Tap在github.com/LeonTing1010/tap开源(AGPL-3.0)。所有发布二进制文件均通过GitHub Actions构建——通过检查CI工作流进行验证。
Chrome扩展权限。 扩展需要debugger权限以向活动标签页发送CDP命令。它不会在清单中请求、cookies或webRequest权限。扩展仅在显式调用Tap时激活。
社区技能。 tap install从tap-skills克隆脚本。所有脚本均为纯.tap.js文件(可读的JavaScript)——运行前请审查。用户锻造的tap存储在本地~/.tap/taps/中。
访问范围。 Tap在被调用时操作活动浏览器标签页。它不会在后台运行,不会访问您未导航到的标签页,也不会在~/.tap/之外持久化任何数据。
建议。 安装前请审查源代码(约1,800行)和扩展清单。