{
  "markdown": "# tramp\n\nTRAMP-like transparent remote execution for AI coding agents. MCP server that routes file and shell operations to remote targets via SSH or Docker.\n\nThe agent stays local. Tools execute remotely.\n\n## Install\n\n### One-liner (Go required)\n\n```bash\ngo install github.com/marcfargas/tramp/cmd/tramp@latest\nclaude mcp add tramp -- tramp serve\n```\n\n### From GitHub Releases\n\nDownload the binary for your platform from [Releases](https://github.com/marcfargas/tramp/releases):\n\n```bash\n# Linux (amd64)\ncurl -L https://github.com/marcfargas/tramp/releases/latest/download/tramp_0.1.0_linux_amd64.tar.gz | tar xz\nsudo mv tramp /usr/local/bin/\n\n# macOS (Apple Silicon)\ncurl -L https://github.com/marcfargas/tramp/releases/latest/download/tramp_0.1.0_darwin_arm64.tar.gz | tar xz\nsudo mv tramp /usr/local/bin/\n\n# Windows — download the zip from Releases, extract, add to PATH\n```\n\nThen add to Claude Code:\n\n```bash\nclaude mcp add tramp -- tramp serve\n```\n\n## Quick Start\n\nIn a Claude Code session:\n\n```\n> target_add(\"myserver\", {\"type\":\"ssh\",\"host\":\"user@myserver.example.com\",\"shell\":\"bash\",\"cwd\":\"/home/user/project\"})\n> target_switch(\"myserver\")\n\n# All tramp tools now execute on myserver\n> bash(\"ls -la\")\n> read(\"/etc/hostname\")\n```\n\n## Tools\n\nAll remote tools accept an optional `target` parameter to specify which target to use per-call, enabling multi-target workflows without switching.\n\n### Target Management\n\n| Tool | Description |\n|------|-------------|\n| `target_add` | Add a remote target (SSH or Docker). Set `persist: true` to save to `.claude/tramp.json` |\n| `target_switch` | Connect and switch active target. Use `\"local\"` to disconnect |\n| `target_remove` | Remove a target |\n| `target_list` | List all targets with status |\n| `target_status` | Show active target details |\n\n### Remote Operations\n\nMirror Claude Code's built-in tool signatures:\n\n| Tool | Description |\n|------|-------------|\n| `bash` | Execute shell command |\n| `read` | Read file contents (with offset/limit) |\n| `write` | Write/overwrite file |\n| `edit` | Find-and-replace edit |\n| `glob` | File pattern matching |\n| `grep` | Content search |\n| `ls` | List directory |\n\n### Port Forwarding (SSH only)\n\n| Tool | Description |\n|------|-------------|\n| `forward_port` | Create SSH tunnel (local port → remote address) |\n| `forward_list` | List active port forwards |\n| `forward_stop` | Stop a port forward |\n\n## Configuration\n\n### Dynamic Targets (Primary)\n\nAdd targets on the fly via `target_add`. Stored in memory for the session. Use `persist: true` to save to the project config file.\n\n### File-based\n\nCreate `.claude/tramp.json` in your project or `~/.claude/tramp.json` globally:\n\n```json\n{\n  \"default\": \"dev\",\n  \"targets\": {\n    \"dev\": {\n      \"type\": \"ssh\",\n      \"host\": \"user@dev.example.com\",\n      \"cwd\": \"/home/user/project\",\n      \"shell\": \"bash\"\n    },\n    \"docker-dev\": {\n      \"type\": \"docker\",\n      \"container\": \"my-dev-container\",\n      \"cwd\": \"/workspace\"\n    }\n  }\n}\n```\n\nProject config overrides global by target name. The `default` target auto-connects on startup.\n\n## Transport Types\n\n### SSH\n\n```json\n{\n  \"type\": \"ssh\",\n  \"host\": \"user@hostname\",\n  \"port\": 22,\n  \"identityFile\": \"~/.ssh/id_ed25519\",\n  \"cwd\": \"/remote/working/directory\",\n  \"shell\": \"bash\",\n  \"timeout\": 60000,\n  \"insecureIgnoreHostKey\": false\n}\n```\n\n- Native multiplexed channels (`golang.org/x/crypto/ssh`) — no sentinel protocol\n- SFTP for file I/O — binary-safe, no base64 encoding\n- Auth: SSH agent (Unix + Windows OpenSSH) → identity file → default keys\n- Host key verification via `~/.ssh/known_hosts` (set `insecureIgnoreHostKey: true` to skip)\n- Persistent connection, reused across tool calls\n- Port forwarding support\n\n### Docker\n\n```json\n{\n  \"type\": \"docker\",\n  \"container\": \"my-container\",\n  \"cwd\": \"/workspace\",\n  \"shell\": \"bash\"\n}\n```\n\n- Docker Exec API for commands\n- Copy API (tar-based) for file I/O\n- Shell auto-detection if not configured\n\n## Network Boundary\n\nWhen a target is active, tramp exposes a `tramp://context` MCP resource that injects network boundary awareness into the agent's context:\n\n- Built-in tools (Read, Write, Bash, etc.) operate locally\n- Tramp tools (read, write, bash, etc.) operate on the remote target\n- Local and remote paths are different filesystems\n\n## Shells\n\nBoth **bash** (POSIX) and **PowerShell** (pwsh) are supported on remote targets. Shell drivers handle escaping and command generation per-shell.\n\n## License\n\nLGPL-3.0\n",
  "bytes": 4453,
  "sha": "cae511ec1d4d827d39dff92b63e51cf516d853614764b4963a9f9633c6b2b489",
  "repo_slug": "marcfargas/tramp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_marcfargas_tramp_tramp_d60abb7b/readme"
}