Skip to main content
Glama

钢制 MCP 服务器

铁匠徽章

https://github.com/user-attachments/assets/25848033-40ea-4fa4-96f9-83b6153a0212

一个模型上下文协议 (MCP) 服务器,使像 Claude 这样的法学硕士 (LLM) 能够通过基于 Puppeteer 的工具和 Steel 浏览网页。它基于 Web Voyager 框架,提供所有标准网页操作的工具,例如点击、滚动、输入等,以及截屏。

请克劳德帮助您完成以下任务:

  • “搜索菜谱并保存配料表”

  • “追踪包裹递送状态”

  • “查找并比较特定产品的价格”

  • “填写在线求职申请”

🚀 快速入门

以下是在 Claude Desktop 中运行 Steel Voyager 的精简指南。您只需调整环境选项即可在 Steel Cloud 和本地/自托管实例之间切换。

先决条件

  1. 已安装最新版本的 Git 和 Node.js

  2. 已安装Claude Desktop

  3. (可选)如果您计划自行托管,请在本地运行Steel Docker 镜像

  4. (可选)如果您运行 Steel Cloud,请携带您的 API 密钥。点击此处获取。


A)快速启动(钢铁云)

  1. 克隆并构建项目:

    git clone https://github.com/steel-dev/steel-mcp-server.git
    cd steel-mcp-server
    npm install
    npm run build
  2. 通过添加服务器条目来配置 Claude Desktop( ~/Library/Application Support/Claude/claude_desktop_config.json ):

    {
      "mcpServers": {
        "steel-puppeteer": {
          "command": "node",
          "args": ["path/to/steel-voyager/dist/index.js"],
          "env": {
            "STEEL_LOCAL": "false",
            "STEEL_API_KEY": "YOUR_STEEL_API_KEY_HERE",
            "GLOBAL_WAIT_SECONDS": "1"
          }
        }
      }
    }
    • 用您的有效 Steel API 密钥替换“YOUR_STEEL_API_KEY_HERE”。

    • 确保云模式下的“STEEL_LOCAL”设置为“false”。

  3. 启动 Claude Desktop。它将自动以云模式启动此 MCP 服务器。

  4. (可选)您可以在仪表板中查看或管理活动的 Steel 浏览器会话。


B) 快速启动(本地/自托管 Steel)

  1. 确保您的本地或自托管 Steel 服务正在运行(例如,使用开源 Steel Docker 镜像)。

  2. 克隆并构建项目(如果尚未完成,则与上面相同):

    git clone https://github.com/steel-dev/steel-mcp-server.git
    cd steel-mcp-server
    npm install
    npm run build
  3. 为本地模式配置 Claude Desktop ( ~/Library/Application Support/Claude/claude_desktop_config.json ):

    {
      "mcpServers": {
        "steel-puppeteer": {
          "command": "node",
          "args": ["path/to/steel-voyager/dist/index.js"],
          "env": {
            "STEEL_LOCAL": "true",
            "STEEL_BASE_URL": "http://localhost:3000",
            "GLOBAL_WAIT_SECONDS": "1"
          }
        }
      }
    }
    • “STEEL_LOCAL”必须为“真”。

    • 如果在云服务器上自行托管,请配置“STEEL_BASE_URL”以指向您的本地/自托管 Steel URL。

  4. 启动 Claude Desktop,它将连接到您本地运行的 Steel 并以本地模式启动 Steel Voyager。

  5. (可选)要在本地查看会话,您可以访问自托管仪表板( localhost:5173 )或特定于您的 Steel 运行时环境的日志。


就是这样!一旦 Claude Desktop 启动,它将在后台协调 MCP 服务器,并让您通过 Steel Voyager 与 Web 自动化功能进行交互。

有关设置的更多信息或遇到问题,请查看 MCP 设置文档: https://modelcontextprotocol.io/quickstart/user

Related MCP server: Puppeteer MCP Server

成分

工具

  • 导航

    • 导航到浏览器中的任意 URL

    • 输入:

  • 搜索

  • 点击

    • 使用编号标签单击页面上的元素

    • 输入:

      • label (数字,必需):要点击的元素的标签编号。

  • 类型

    • 使用编号标签在输入字段中输入文本

    • 输入:

      • label (数字,必需):输入字段的标签编号。

      • text (字符串,必需):在字段中输入的文本。

      • replaceText (布尔值,可选):如果为真,则替换字段中任何现有文本。

  • 向下滚动

    • 向下滚动页面

    • 输入:

      • pixels (整数,可选):向下滚动的像素数。如果未指定,则滚动一整页。

  • 向上滚动

    • 向上滚动页面

    • 输入:

      • pixels (整数,可选):向上滚动的像素数。如果未指定,则滚动一整页。

  • 返回

    • 导航至浏览器历史记录中的上一页

    • 无需输入

  • 等待

    • 等待最多 10 秒,这对于加载缓慢或需要更多时间显示动态内容的页面很有用。

    • 输入:

      • seconds (数字,必需):等待的秒数(0 到 10)。

  • 保存未标记的屏幕截图

    • 捕获不带边界框或高亮的当前页面并将其存储为资源。

    • 输入:

      • resourceName (字符串,可选):用于存储屏幕截图的名称(例如“before_login”)。如果省略,则会自动生成一个通用名称。

资源

  • 屏幕截图:每个保存的屏幕截图都可以通过 MCP 资源 URI 访问,格式如下:• screenshot://RESOURCE_NAME

    每当您指定“save_unmarked_screenshot”工具或操作结束时(大多数工具均如此)出现带注释的屏幕截图时,服务器都会存储这些屏幕截图。您可以通过标准的 MCP 资源检索请求来检索这些图片。

(注意:虽然仍会收集控制台日志用于分析和调试,但在此实现中,它们不会作为可检索资源公开。它们会出现在服务器的日志中,但不通过 MCP 资源 URI 提供。)

主要特点

  • 使用 Puppeteer 实现浏览器自动化

  • Steel 集成用于浏览器会话管理

  • 通过编号标签进行视觉元素识别

  • 截图功能

  • 基本网络交互(导航、点击、表单填写)

  • 通过滚动实现延迟加载支持

  • 本地和远程 Steel 实例支持

理解边界框

与页面交互时,Steel Puppeteer 会添加视觉覆盖来帮助识别交互元素:

  • 每个交互元素(按钮、链接、输入)都有一个唯一的编号标签

  • 彩色框勾勒出元素的边界

  • 标签出现在元素上方或内部,以便于参考

  • 在指定单击或键入操作的元素时使用这些数字

配置

Steel Voyager 可以以两种模式运行:“本地”或“云端”。此行为由环境变量控制。以下是简要概述:

环境变量

默认

描述

钢_本地

“错误的”

确定 Steel Voyager 是在本地(真)还是云(假)模式下运行。

钢API密钥

(没有任何)

仅当 STEEL_LOCAL = "false" 时才需要。用于通过 Steel 端点验证请求。

钢基座 URL

“ https://api.steel.dev ”

Steel API 的基本 URL。如果您自行托管 Steel 服务器(无论是在本地还是在您自己的云环境中),请覆盖此 URL。如果 STEEL_LOCAL = "true" 且 STEEL_BASE_URL 未设置,则默认为“ http://localhost:3000 ”。

全局等待秒数

(没有任何)

可选。每次工具操作后等待的秒数(例如,允许加载缓慢的页面)。

本地模式

  1. 设置 STEEL_LOCAL="true"。

  2. (可选)如果您将 Steel 服务器托管在自定义域中,请将 STEEL_BASE_URL 设置为指向该服务器。否则,Steel Voyager 将默认指向http://localhost:3000 。

  3. 此模式下不需要 API 密钥。

  4. Puppeteer 将通过 ws://0.0.0.0:3000 进行连接

例子:

导出 STEEL_LOCAL="true"

导出 STEEL_BASE_URL=" http://localhost:3000 " # 仅当覆盖时

云模式

  1. 设置 STEEL_LOCAL="false"。

  2. 设置 STEEL_API_KEY,以便 Steel Voyager 可以通过 Steel 云服务(或您自托管的 Steel,如果您更改了 STEEL_BASE_URL)进行身份验证。

  3. STEEL_BASE_URL 默认为https://api.steel.dev ;如果您在另一个端点上运行自托管 Steel 实例,请覆盖此设置。

  4. Puppeteer 将通过 wss://connect.steel.dev?sessionId=…&apiKey=… 进行连接

例子:

导出 STEEL_LOCAL="false"

导出 STEEL_API_KEY="YOUR_STEEL_API_KEY_HERE"

Claude桌面配置

要将 Steel Voyager 与 Claude Desktop 一起使用,请在配置文件中添加类似这样的内容(通常位于 ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "steel-puppeteer": {
      "command": "node",
      "args": ["path/to/steel-puppeteer/dist/index.js"],
      "env": {
        "STEEL_LOCAL": "false",
        "STEEL_API_KEY": "your_api_key_here"
      }
    }
  }
}

调整环境变量以匹配您想要的模式:

• 如果在本地运行/自托管,请保留"STEEL_LOCAL": "true"和可选的"STEEL_BASE_URL": "http://localhost:3000" 。
• 如果在云模式下运行,请删除"STEEL_LOCAL": "true" ,添加"STEEL_LOCAL": "false" ,并提供"STEEL_API_KEY": "<YourKey>"这将允许 Claude Desktop 以正确的模式启动 Steel Voyager。

安装与运行

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 Steel MCP Server:

npx -y @smithery/cli install @steel-dev/steel-mcp-server --client claude

本地开发

  1. 克隆存储库

  2. 安装依赖项:

    npm install
  3. 构建项目:

    npm run build
  4. 启动服务器:

    npm start

使用示例📹

我们要求 Claude 向我们展示它的新能力,它决定与 Sora 一起研究最新的发展,然后创建一个交互式可视化来演示模型背后的数据及其工作原理🤯

https://github.com/user-attachments/assets/8d4293ea-03fc-459f-ba6b-291f5b017ad7

*抱歉,视频质量不佳,github 强制我们将视频大小控制在 10mb 以下 :/

故障排除

常见问题及解决方案:

  1. 使用云服务时,请验证您的 Steel API 密钥,并确保本地 Steel 实例正在运行。请检查您与该服务的网络连接是否正常。

  2. 如果您在页面呈现或标记并发送给 claude 时遇到问题,请尝试通过GLOBAL_WAIT_SECONDS环境变量在您的配置中添加延迟。

  3. 确保页面已完全加载,并检查视口大小设置。确保您的系统有足够的可用内存来截取屏幕截图。

  4. 会话清理现在不是最好的,因此您可能需要在会话启动以执行任务时手动释放会话。

  5. 以正确的方式提示克劳德可以大大提高性能并避免可能产生的愚蠢错误。

  6. 利用会话查看器来分析您的模型可能在哪里被阻止。

  7. 在大约 15-20 个浏览器操作之后,Claude 的速度开始变慢,因为它的上下文窗口已经被图片填满。这应该不算太糟糕,但我们注意到这里出现了一些延迟,尤其是在 Claude 桌面客户端出现延迟的情况下。

贡献

本项目处于实验阶段,正在积极开发中。欢迎贡献!

  1. 分叉存储库

  2. 创建功能分支

  3. 提交拉取请求

请包括:

  • 清晰描述变化

  • 动机

  • 文档更新

免责声明

⚠️ 本项目基于 Web Voyager 代码库,处于实验阶段。在生产环境中使用需自行承担风险。

Available Tools

16 tools
steel_actInteract with the pageA
Destructive

Click, type, fill a form, select an option, hover, scroll, press a key, go back, or dismiss a cookie or consent overlay. Target elements by the @eN reference from steel_snapshot or steel_find, or by a CSS selector. Always reports what actually changed, and says so plainly when nothing did.

Inputs: action (required), session_id (required), value, fields, +3 more.

steel_batchRun several browser steps at onceA
Destructive

Run known reversible steps whose later targets need no fresh read. Stops on failure or login/challenge; hand off the same session and resume only unrun steps. Stop before payment/final confirmation.

Inputs: steps (required), session_id (required), max_tokens, include_snapshot.

steel_findFind an element on the pageA
Read-only

Find labelled elements by text, safe regex or role and return their @eN refs.

Inputs: session_id (required), role, text, regex, +4 more.

steel_navigateOpen a URL in a browser sessionA
Destructive

Navigate a live session and wait for it to settle. Reports the final URL and changes; set include_snapshot to also read the page.

Inputs: url (required), session_id (required), max_tokens, include_snapshot.

steel_pdfRender a web page as PDFA
Read-onlyIdempotent

Render a page to PDF and return a link to the file. Starts no browser session. Use steel_scrape if you want to read the text — the PDF link is for handing a document to a person.

Inputs: url (required), delay_ms, use_proxy.

steel_scrapeRead a web pageA
Read-onlyIdempotent

Read a web page as markdown or HTML through a real browser, so JavaScript-rendered pages and sites that block plain HTTP fetches still work. Starts no browser session, so there is nothing to release afterwards. Always returns the page links and metadata alongside the content. Use this first for anything you only need to read; reach for steel_session_create only when you need to click, type or move through several pages.

Inputs: url (required), cursor, format, delay_ms, +2 more.

steel_screenshotScreenshot a web pageA
Read-onlyIdempotent

Capture a page image. URL captures are user-facing PNG artifacts; session captures are model-visible JPEG evidence. Pixels are not action targets, so use steel_snapshot to click or type.

Inputs: url, inline, full_page, use_proxy, +1 more.

steel_session_createStart sessionC
Destructive

Billed; profiles/credentials via session_options; release.

Inputs: guest, device, viewport, block_ads, +6 more.

steel_session_diagnosticsExplain what a browser session didA
Read-onlyIdempotent

Read live/released activity or list live handles; never starts a browser.

Inputs: since, cursor, list_live, max_tokens, +2 more.

steel_session_handoffHand the browser to a personA
Destructive

Pause for a person to take exclusive control of this same live browser, then resume only after hand-back. Use for sensitive input, local files, review, or any manual step.

Inputs: reason (required), session_id (required).

steel_session_live_viewLive view connectionC
Destructive

App-only viewer and control lease; no page content.

Inputs: action, session_id, control_token.

steel_session_optionsPlan sessionC
Read-only

Find profiles/credentials; plan setup.

Inputs: url (required), goal (required), needs, cursor, +2 more.

steel_session_releaseRelease a browser sessionA
DestructiveIdempotent

Shut down the current browser and stop the meter. Safe to call twice. Its current URL and session-only page state are gone afterwards. A profile is saved only when persistence was requested. Read what you need first; this reports the final URL and title.

Inputs: session_id (required).

steel_session_replayOpen a finished sessionA
Read-onlyIdempotent

Call only when the user explicitly asks to watch or replay a finished session. Returns its Steel dashboard link without starting a browser; use steel_session_diagnostics to inspect or explain activity.

Inputs: steel_session_id.

steel_snapshotRead the page structureA
Read-only

Return the page as a compact accessibility tree with a @eN reference on every element you can click or type into. This is the read to use before acting. Elements with no reference cannot be targeted. If you already know what you are looking for, steel_find is much cheaper.

Inputs: session_id (required), cursor, max_tokens, interactive_only.

steel_wait_forWait for something on the pageA
Read-only

Wait for named text, a CSS selector or URL substring; pass at least one.

Inputs: session_id (required), url, text, selector, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 16 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, with stateless reading (scrape, screenshot, pdf) separated from session interaction (navigate, act, snapshot). A few pairs like steel_screenshot/steel_snapshot and steel_session_live_view/steel_session_replay have similar names, but detailed descriptions resolve the boundaries.

    Naming Consistency4/5

    All tools share the steel_ prefix and snake_case, but the pattern mixes bare verbs (scrape, navigate, act) with session_ prefixed noun_verb forms (session_create, session_release, session_handoff). This is consistent enough to be predictable, with minor deviations like steel_pdf and steel_wait_for.

    Tool Count4/5

    16 tools is slightly above the typical 3-15 range, but the breadth covers stateless captures, session lifecycle, element targeting, and diagnostics. Each tool addresses a distinct need, so the count feels justified rather than bloated.

    Completeness4/5

    The surface covers the core browser automation lifecycle: create/release sessions, navigate, read, interact, wait, and diagnose. Obvious gaps include a full-HTML/markdown read within a live session and session-scoped PDF rendering, but these can be worked around with snapshot or separate stateless calls.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers