Use with AI Agents
Give any AI agent full control over remote servers via MCP
Any MCP-compatible AI agent can forge, use, and burn remote servers without touching your machine. One MCP connection gives it everything: lifecycle management, file access, and command execution.
Setup
- Install gibil and run the setup wizard:
npm install -g gibil
gibil init- Add to your agent's MCP config. For Claude Code (
.claude/settings.json):
{
"mcpServers": {
"gibil": {
"command": "gibil",
"args": ["mcp"]
}
}
}Gibil uses standard MCP, so the same config works with any compatible agent — Cursor, Windsurf, and others. Your agent now has 9 tools for working with remote servers.
What your agent can do
Lifecycle tools
| Tool | What it does |
|---|---|
create_server | Forge a new server with optional repo, TTL, and env vars |
destroy_server | Burn a server by name |
list_servers | List all active servers with IPs and remaining TTL |
extend_server | Extend a server's auto-destroy timer |
Server tools
| Tool | What it does |
|---|---|
vm_bash | Run any shell command |
vm_read | Read a file with optional line offset and limit |
vm_write | Create or overwrite a file |
vm_ls | List directory contents with optional glob filter |
vm_grep | Search file contents with regex |
Example workflow
You ask your agent to "run the tests on a remote server." Here's what it does:
create_server({ name: "tests", repo: "https://github.com/you/project", ttl: "30m" })vm_bash({ command: "cd /root/project && pnpm install && pnpm test" })- Reads test output, reports results
destroy_server({ name: "tests" })
For bug fixing, the agent runs an edit-test loop entirely on the remote server:
vm_read({ path: "/root/project/src/auth.ts" })— read the codevm_write({ path: "/root/project/src/auth.ts", content: "..." })— fix the bugvm_bash({ command: "cd /root/project && pnpm test" })— check if it works- Repeat until tests pass, then push
Install the Agent Skill (optional)
The gibil skill teaches your agent best practices for when and how to use remote servers. It works with any agent that supports the Agent Skills standard.
npx skills add https://github.com/AlexikM/gibil-skills --skill gibilCompatible with Claude Code, Cursor, Copilot, Gemini CLI, and 40+ other agents.
Best practices
- One server per task to keep environments clean
- Set short TTLs (
ttl: "15m"orttl: "30m") — the server auto-destroys when time runs out - Destroy when done, even if the task fails. TTL is the safety net, not the plan.
- Pass secrets via
envincreate_server, not inline in commands
CLI mode (alternative)
If your agent doesn't support MCP, it can use the CLI with --json for structured output:
gibil create --name task --repo https://github.com/you/project --json --ttl 30m
gibil run task "cd /root/project && pnpm test" --json
gibil destroy task --jsonNext steps
- AI Agent Sandbox — patterns for autonomous agents
- Remote PR Workflow — push branches and open PRs from servers
- CLI Reference — full command documentation