Token导航 LogoToken导航TokenDH.com
claw (Opsyhq) logo
开发工具stdio官方级别未说明来源级核验

claw (Opsyhq)

MCP Server

@opsyhq/claw

Claw是一个MCP服务器,扩展AI代理的工具到任何可以通过SSH访问的远程机器,提供bash、读写、编辑、grep和glob等功能。

工具数

8

提示词数

0

GitHub Stars

23

资源数

0
AI代理工具开发工具TypeScriptClaude命令行工具Claude DesktopClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

opsyhq

提供方

opsyhq

最后核验

2026/5/17 20:19

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx -y @opsyhq/claw serve

详细介绍

🦞 Claw

Your agent's claw on every machine.

Give any AI agent bash, read, write, edit, grep, and glob

on any machine you can SSH into.

Quickstart · How it works · Tools · Configuration · CLI

______________________________________________________________________

AI代理可以编写代码,但它们被困在一台机器上。他们无法检查prod上的日志,无法跨服务检查grep上的错误,也无法在staging上编辑配置。

爪子是一种 MCP服务器 它将代理的工具扩展到任何远程计算机。 8个工具。任何可以通过SSH连接到的主机。远程配置为零。

You: "Check why the API is returning 500s on prod, look at the logs, and fix the nginx config"

Agent: connects to prod-api via SSH
       greps /var/log/nginx/error.log for errors
       reads the nginx config
       edits the misconfigured upstream block
       runs nginx -t && systemctl reload nginx

Done. Across machines. Autonomously.
没有要打开的端口。没有守护进程。不需要root。 Claw使用您的SSH密钥,在第一次连接时部署一个微小的二进制文件,并在自己之后进行清理。

快速入门

1.安装

npx -y @opsyhq/claw serve
# or install globally
npm install -g @opsyhq/claw

2.联系您的代理

Claude Code

claude mcp add claw -- npx -y @opsyhq/claw serve

或者运行安装程序:

npx -y @opsyhq/claw install claude-code

Cursor

添加 .cursor/mcp.json:

{
  "mcpServers": {
    "claw": {
      "command": "npx",
      "args": ["-y", "@opsyhq/claw", "serve"]
    }
  }
}

Claude Desktop

添加 claude_desktop_config.json:

{
  "mcpServers": {
    "claw": {
      "command": "npx",
      "args": ["-y", "@opsyhq/claw", "serve"]
    }
  }
}

Any MCP client

npx -y @opsyhq/claw serve
# Speaks MCP over stdio

3.添加您的机器

代理可以通过以下方式自行添加机器 claw_machines 工具,或者您可以提前设置它们:

# Import from your SSH config
claw init --from-ssh

# Or add manually
claw add prod-api --ssh deploy@prod-api.example.com
claw add staging --ssh deploy@staging.example.com

4.去吧

和你的经纪人谈谈。现在,您配置的每台机器上都有爪子。

"Show me running containers on prod-api"
"Grep for 'connection refused' in the logs on staging"
"Find all .env files across prod-api and staging"
"Edit the upstream block in nginx.conf on prod-api"

运作原理

┌─────────────────────────────────────┐
│  AI Agent (Claude, Cursor, etc.)    │
│       ↓ MCP tool calls              │
├─────────────────────────────────────┤
│  Claw (runs locally)               │
│                                     │
│  ┌─────────────┐ ┌───────────────┐  │
│  │ Tool Router  │ │ Conn Pool     │  │
│  └──────┬──────┘ └──────┬────────┘  │
│         └───────┬───────┘           │
│          ┌──────┴───────┐           │
│          │ SSH  │ Local  │           │
│          └──┬───┘───┬───┘           │
└─────────────┼───────┼──────────────┘
              ▼       ▼
          ┌──────┐ ┌──────┐
          │ prod │ │ your │
          │ api  │ │ mac  │
          └──────┘ └──────┘

首次连接时,Claw会自动部署一个小型静态二进制文件(钳子)to ~/.claw/pincer 在远程主机上。Pincer通过stdin/stdout使用JSON-RPC,并处理所有工具执行——结构化文件编辑、安全命令处理、支持正则表达式的grep。

连接是持久的和池化的。不按命令重新连接。

工具

爪露出8个MCP工具。这些工具与代理从本地开发中已经知道的工具(Claude Code的读/写/编辑/Bash/Grep/Glob/LS)相匹配,刚刚扩展到远程机器。

工具说明
抓斗机列出、添加、删除和更新计算机
爪鱼运行shell命令
clav_read读取具有可选行范围的文件
爪石创建或覆盖文件
clav_编辑在文件中查找和替换
clav_grep使用正则表达式搜索文件内容
clav_glob按模式查找文件
爪\_ ls列出目录内容

每个工具都需要一个 host 参数——目标机器名。

claw_bash(host: "prod-api", command: "docker ps")
claw_grep(host: "prod-api", pattern: "error|timeout", path: "/var/log", include: "*.log")
claw_edit(host: "staging", path: "/app/config.yaml", old_string: "port: 80", new_string: "port: 8080")

配置

全局配置-- ~/.config/claw/machines.yaml

machines:
  prod-api:
    transport: ssh
    host: prod-api.example.com
    user: deploy

  staging:
    transport: ssh
    host: staging.example.com
    user: deploy

  local:
    transport: local

SSH传输使用您现有的 ~/.ssh/config 自动——密钥、端口、跳转主机都能正常工作。

项目配置-- claw.yaml

放下一个 claw.yaml 在项目根目录中:

machines:
  dev:
    transport: local

  staging:
    transport: ssh
    host: staging.myapp.com
    user: deploy

将此提交到您的repo。您的整个团队都使用相同的机器设置,每个人都使用自己的SSH密钥。

安全

  • 您现有的访问权限 --Claw使用您的SSH密钥。它只能到达你已经能到达的地方。
  • 无开放端口 --所有连接都是从您的计算机发出的SSH。
  • 没有毅力 --远程二进制文件仅在会话期间运行。
  • 审计日志 --每次工具调用都会记录到 ~/.config/claw/logs/.
  • 想要护栏吗? --有关远程操作的审批工作流和策略执行,请查看 选项.

CLI参考

claw serve                # Start MCP server (stdio)
claw init --from-ssh      # Import machines from ~/.ssh/config
claw add  --ssh user@host   # Add a remote machine
claw add  --local           # Add local machine
claw install claude-code  # Write MCP config for Claude Code
claw install cursor       # Write MCP config for Cursor

路线图

  • \[x\] SSH传输
  • \[x\] 当地交通
  • \[x\] 从GitHub发布版下载运行时二进制文件
  • \[x\] npm可信发布(OIDC)
  • \[\]Docker传输
  • \[\]Kubernetes传输
  • \[\]AWS SSM传输

贡献

PR欢迎。请参阅 开发指南 开始吧。

Development

npm install         # Install dependencies
npm run build       # Build TypeScript
npm run typecheck   # Type-check without emitting
npm run build-pincer # Cross-compile pincer (requires Go)
npm run dev         # Watch mode

项目结构:

claw/
├── bin/claw.ts              # CLI entrypoint
├── src/
│   ├── cli/                 # CLI commands (serve, init, add, install)
│   ├── config/              # YAML config loading + SSH config parser
│   ├── server/              # MCP server, tool schemas, router
│   ├── tools/               # Local tool implementations
│   ├── transports/          # Transport layer (local, SSH, pool, deployer)
│   └── logging/             # Audit log
├── pincer/                  # Go binary deployed to remote hosts
│   ├── main.go              # JSON-RPC stdin/stdout server
│   ├── rpc/                 # Request dispatcher
│   └── tools/               # Tool implementations in Go
└── scripts/build-pincer.sh  # Cross-compile for linux/amd64+arm64

______________________________________________________________________

Built by OpsyHQ · MIT License

Claw icon by Lorc / Game Icons (CC BY 3.0)

目录标签

目录标签

AI代理工具开发工具TypeScriptClaude命令行工具本地部署远程管理SSH工具自动化运维

支持客户端

Claude DesktopClaudeCursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

@opsyhq/claw

工具数量(toolCount,工具数)

8

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP