{"id":46078434,"url":"https://github.com/opsyhq/claw","last_synced_at":"2026-03-07T21:01:04.982Z","repository":{"id":341363824,"uuid":"1169853834","full_name":"opsyhq/claw","owner":"opsyhq","description":"Your agent's claw on every machine 🦞","archived":false,"fork":false,"pushed_at":"2026-03-01T13:54:02.000Z","size":1188,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-03T20:13:34.186Z","etag":null,"topics":["ai-agent","claude-code","cursor","devops","infrastructure","mcp","remote","ssh"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@opsyhq/claw","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opsyhq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-01T10:22:23.000Z","updated_at":"2026-03-03T14:50:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/opsyhq/claw","commit_stats":null,"previous_names":["opsyhq/claw"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/opsyhq/claw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsyhq%2Fclaw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsyhq%2Fclaw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsyhq%2Fclaw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsyhq%2Fclaw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opsyhq","download_url":"https://codeload.github.com/opsyhq/claw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsyhq%2Fclaw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30088338,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T15:40:14.053Z","status":"ssl_error","status_checked_at":"2026-03-04T15:40:13.655Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","claude-code","cursor","devops","infrastructure","mcp","remote","ssh"],"created_at":"2026-03-01T15:06:50.242Z","updated_at":"2026-03-04T18:01:55.300Z","avatar_url":"https://github.com/opsyhq.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003e🦞 Claw\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\u003cstrong\u003eYour agent's claw on every machine.\u003c/strong\u003e\u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n    Give any AI agent bash, read, write, edit, grep, and glob\u003cbr/\u003e\n    on any machine you can SSH into.\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@opsyhq/claw\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@opsyhq/claw\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/opsyhq/claw/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/opsyhq/claw\" alt=\"license\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/opsyhq/claw/actions/workflows/release.yml\"\u003e\u003cimg src=\"https://github.com/opsyhq/claw/actions/workflows/release.yml/badge.svg\" alt=\"build\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#quickstart\"\u003eQuickstart\u003c/a\u003e ·\n  \u003ca href=\"#how-it-works\"\u003eHow it works\u003c/a\u003e ·\n  \u003ca href=\"#tools\"\u003eTools\u003c/a\u003e ·\n  \u003ca href=\"#configuration\"\u003eConfiguration\u003c/a\u003e ·\n  \u003ca href=\"#cli-reference\"\u003eCLI\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nAI agents can write code, but they're stuck on one machine. They can't check logs on prod, grep for errors across services, or edit a config on staging.\n\n**Claw is an [MCP server](https://modelcontextprotocol.io) that extends your agent's tools to any remote machine.** 8 tools. Any host you can SSH into. Zero config on the remote.\n\n```\nYou: \"Check why the API is returning 500s on prod, look at the logs, and fix the nginx config\"\n\nAgent: connects to prod-api via SSH\n       greps /var/log/nginx/error.log for errors\n       reads the nginx config\n       edits the misconfigured upstream block\n       runs nginx -t \u0026\u0026 systemctl reload nginx\n\nDone. Across machines. Autonomously.\n```\n\n\u003e **No ports to open. No daemons. No root required.**\n\u003e Claw uses your SSH keys, deploys a tiny binary on first connect, and cleans up after itself.\n\n## Quickstart\n\n### 1. Install\n\n```bash\nnpx -y @opsyhq/claw serve\n# or install globally\nnpm install -g @opsyhq/claw\n```\n\n### 2. Connect to your agent\n\n\u003cdetails open\u003e\n\u003csummary\u003e\u003cstrong\u003eClaude Code\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nclaude mcp add claw -- npx -y @opsyhq/claw serve\n```\n\nOr run the installer:\n```bash\nnpx -y @opsyhq/claw install claude-code\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCursor\u003c/strong\u003e\u003c/summary\u003e\n\nAdd to `.cursor/mcp.json`:\n```json\n{\n  \"mcpServers\": {\n    \"claw\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@opsyhq/claw\", \"serve\"]\n    }\n  }\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eClaude Desktop\u003c/strong\u003e\u003c/summary\u003e\n\nAdd to `claude_desktop_config.json`:\n```json\n{\n  \"mcpServers\": {\n    \"claw\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@opsyhq/claw\", \"serve\"]\n    }\n  }\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eAny MCP client\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nnpx -y @opsyhq/claw serve\n# Speaks MCP over stdio\n```\n\u003c/details\u003e\n\n### 3. Add your machines\n\nThe agent can add machines itself via the `claw_machines` tool, or you can set them up ahead of time:\n\n```bash\n# Import from your SSH config\nclaw init --from-ssh\n\n# Or add manually\nclaw add prod-api --ssh deploy@prod-api.example.com\nclaw add staging --ssh deploy@staging.example.com\n```\n\n### 4. Go\n\nTalk to your agent. It now has claws on every machine you configured.\n\n```\n\"Show me running containers on prod-api\"\n\"Grep for 'connection refused' in the logs on staging\"\n\"Find all .env files across prod-api and staging\"\n\"Edit the upstream block in nginx.conf on prod-api\"\n```\n\n## How it works\n\n```\n┌─────────────────────────────────────┐\n│  AI Agent (Claude, Cursor, etc.)    │\n│       ↓ MCP tool calls              │\n├─────────────────────────────────────┤\n│  Claw (runs locally)               │\n│                                     │\n│  ┌─────────────┐ ┌───────────────┐  │\n│  │ Tool Router  │ │ Conn Pool     │  │\n│  └──────┬──────┘ └──────┬────────┘  │\n│         └───────┬───────┘           │\n│          ┌──────┴───────┐           │\n│          │ SSH  │ Local  │           │\n│          └──┬───┘───┬───┘           │\n└─────────────┼───────┼──────────────┘\n              ▼       ▼\n          ┌──────┐ ┌──────┐\n          │ prod │ │ your │\n          │ api  │ │ mac  │\n          └──────┘ └──────┘\n```\n\nOn first connect, Claw auto-deploys a small static binary ([pincer](pincer/)) to `~/.claw/pincer` on the remote host. Pincer speaks JSON-RPC over stdin/stdout and handles all tool execution — structured file editing, safe command handling, grep with regex support.\n\nConnections are persistent and pooled. No reconnecting per command.\n\n## Tools\n\nClaw exposes 8 MCP tools. These match the tools agents already know from local development (Claude Code's Read/Write/Edit/Bash/Grep/Glob/LS) — just extended to remote machines.\n\n| Tool | Description |\n|------|-------------|\n| **claw_machines** | List, add, remove, and update machines |\n| **claw_bash** | Run a shell command |\n| **claw_read** | Read a file with optional line range |\n| **claw_write** | Create or overwrite a file |\n| **claw_edit** | Find-and-replace in a file |\n| **claw_grep** | Search file contents with regex |\n| **claw_glob** | Find files by pattern |\n| **claw_ls** | List directory contents |\n\nEvery tool takes a `host` parameter — the machine name to target.\n\n```\nclaw_bash(host: \"prod-api\", command: \"docker ps\")\nclaw_grep(host: \"prod-api\", pattern: \"error|timeout\", path: \"/var/log\", include: \"*.log\")\nclaw_edit(host: \"staging\", path: \"/app/config.yaml\", old_string: \"port: 80\", new_string: \"port: 8080\")\n```\n\n## Configuration\n\n### Global config — `~/.config/claw/machines.yaml`\n\n```yaml\nmachines:\n  prod-api:\n    transport: ssh\n    host: prod-api.example.com\n    user: deploy\n\n  staging:\n    transport: ssh\n    host: staging.example.com\n    user: deploy\n\n  local:\n    transport: local\n```\n\nSSH transport uses your existing `~/.ssh/config` automatically — keys, ports, jump hosts all just work.\n\n### Project config — `claw.yaml`\n\nDrop a `claw.yaml` in your project root:\n\n```yaml\nmachines:\n  dev:\n    transport: local\n\n  staging:\n    transport: ssh\n    host: staging.myapp.com\n    user: deploy\n```\n\nCommit this to your repo. Your whole team gets the same machine setup, each using their own SSH keys.\n\n## Security\n\n- **Your existing access** — Claw uses your SSH keys. It can only reach what you already can.\n- **No open ports** — All connections are outbound SSH from your machine.\n- **No persistence** — The remote binary only runs during your session.\n- **Audit log** — Every tool call is logged to `~/.config/claw/logs/`.\n- **Want guardrails?** — For approval workflows and policy enforcement on remote operations, check out [Opsy](https://opsy.sh).\n\n## CLI Reference\n\n```bash\nclaw serve                # Start MCP server (stdio)\nclaw init --from-ssh      # Import machines from ~/.ssh/config\nclaw add \u003cname\u003e --ssh user@host   # Add a remote machine\nclaw add \u003cname\u003e --local           # Add local machine\nclaw install claude-code  # Write MCP config for Claude Code\nclaw install cursor       # Write MCP config for Cursor\n```\n\n## Roadmap\n\n- [x] SSH transport\n- [x] Local transport\n- [x] Runtime binary download from GitHub Releases\n- [x] npm trusted publishing (OIDC)\n- [ ] Docker transport\n- [ ] Kubernetes transport\n- [ ] AWS SSM transport\n\n## Contributing\n\nPRs welcome. See the [development guide](#development) to get started.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eDevelopment\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nnpm install         # Install dependencies\nnpm run build       # Build TypeScript\nnpm run typecheck   # Type-check without emitting\nnpm run build-pincer # Cross-compile pincer (requires Go)\nnpm run dev         # Watch mode\n```\n\n**Project structure:**\n```\nclaw/\n├── bin/claw.ts              # CLI entrypoint\n├── src/\n│   ├── cli/                 # CLI commands (serve, init, add, install)\n│   ├── config/              # YAML config loading + SSH config parser\n│   ├── server/              # MCP server, tool schemas, router\n│   ├── tools/               # Local tool implementations\n│   ├── transports/          # Transport layer (local, SSH, pool, deployer)\n│   └── logging/             # Audit log\n├── pincer/                  # Go binary deployed to remote hosts\n│   ├── main.go              # JSON-RPC stdin/stdout server\n│   ├── rpc/                 # Request dispatcher\n│   └── tools/               # Tool implementations in Go\n└── scripts/build-pincer.sh  # Cross-compile for linux/amd64+arm64\n```\n\u003c/details\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  Built by \u003ca href=\"https://github.com/opsyhq\"\u003e\u003cstrong\u003eOpsyHQ\u003c/strong\u003e\u003c/a\u003e · MIT License\u003cbr/\u003e\n  Claw icon by \u003ca href=\"https://game-icons.net\"\u003eLorc / Game Icons\u003c/a\u003e (CC BY 3.0)\n\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopsyhq%2Fclaw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopsyhq%2Fclaw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopsyhq%2Fclaw/lists"}