# Claude Agent Rs

> Rust-native Claude Code alternative — 5.4MB binary, $0 on Max, 8 tools, MCP client, semantic compaction, 19-event hooks. Built before the leak.

- **Type:** MCP server
- **Install:** `agentstack add mcp-expertvagabond-claude-agent-rs`
- **Verified:** Pending review
- **Seller:** [ExpertVagabond](https://agentstack.voostack.com/s/expertvagabond)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ExpertVagabond](https://github.com/ExpertVagabond)
- **Source:** https://github.com/ExpertVagabond/claude-agent-rs
- **Website:** https://claude-agent-rs.pages.dev

## Install

```sh
agentstack add mcp-expertvagabond-claude-agent-rs
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# claude-agent-rs

[](https://crates.io/crates/claude-agent-rs)
[](https://docs.rs/claude-agent-rs)
[](LICENSE)

A lightweight Rust binary that runs Claude as a full coding agent. Uses your Max subscription for $0 API costs, or pay-per-token via the API.

## Install

```bash
cargo install claude-agent-rs
```

Or build from source:

```bash
git clone https://github.com/ExpertVagabond/claude-agent-rs.git
cd claude-agent-rs
cargo build --release
./target/release/claude-agent
```

### Requirements

- Rust 2021 edition (for building)
- One of:
  - `claude` CLI installed + Claude Max subscription (CLI backend, $0)
  - `ANTHROPIC_API_KEY` + `AGENT_BACKEND=api` (API backend, pay-per-token)

## Usage

### Interactive REPL

```
$ claude-agent
  claude-agent v0.8.0 (Rust)
  claude-opus-4-6 · backend: cli (Claude Max)
  8 tools · no MCP servers

❯ write a fizzbuzz in Rust, compile it, run it
  ▸ write: /tmp/fizzbuzz.rs
  ✓ File written
  ▸ bash: rustc /tmp/fizzbuzz.rs -o /tmp/fizzbuzz && /tmp/fizzbuzz
  ✓ 1, 2, Fizz, 4, Buzz...
```

### One-shot mode

```bash
claude-agent -p "list all TODO comments in this project"
```

### CLI options

```
claude-agent                     Start interactive REPL
claude-agent -p "prompt"         One-shot mode (run and exit)
claude-agent [directory]         Start REPL in directory
claude-agent --resume        Resume a previous session
claude-agent --auto-route        Auto-select Opus vs Haiku by complexity
claude-agent --system-prompt "…" Override the system prompt
claude-agent --help              Show help
claude-agent --version           Show version
```

## Built-in Tools

| Tool | Description |
|------|-------------|
| **bash** | Execute shell commands with timeout |
| **read** | Read files with line numbers |
| **write** | Create or overwrite files |
| **edit** | Exact string replacement |
| **glob** | Pattern-based file search |
| **grep** | Regex content search (uses ripgrep) |
| **web_fetch** | HTTP GET requests |
| **agent** | Spawn sub-agents with optional git worktree isolation |

## Two Inference Backends

**CLI mode (default)** — Pipes prompts to `claude -p --output-format stream-json`. Uses your Claude Max subscription's OAuth token. Zero per-token billing.

**API mode** — Direct POST to `api.anthropic.com/v1/messages` with SSE streaming. Set `AGENT_BACKEND=api` and `ANTHROPIC_API_KEY`.

## Features

- **8 built-in tools** — bash, read, write, edit, glob, grep, web_fetch, agent
- **SSE streaming** — real-time token output for both backends
- **MCP client** — full JSON-RPC 2.0 stdio transport, auto-discovers tools from `~/.mcp.json`
- **Session persistence** — SQLite-backed save/restore with `--resume`
- **Sub-agents** — spawn parallel `claude -p` processes with optional git worktree isolation
- **Multi-model routing** — auto-select Opus (complex) vs Haiku (simple) with `--auto-route`
- **Skills** — user-defined `/commands` loaded from `~/.claude-agent/skills/*.md`
- **Plugins** — custom tools via `~/.claude-agent/plugins/` (manifest.json + executable)
- **CLAUDE.md injection** — reads project + home CLAUDE.md into system prompt
- **Context management** — auto-compaction when approaching token limits
- **Permissions** — blocks dangerous commands (rm -rf /, fork bombs, etc.)
- **Library API** — use as a crate: `Agent::new(config).await?.chat("...").await?`

## Configuration

### MCP Servers

Place your MCP config at `~/.mcp.json`:

```json
{
  "mcpServers": {
    "my-server": {
      "command": "node",
      "args": ["path/to/server.js"]
    }
  }
}
```

### Custom Skills

Create `.md` files in `~/.claude-agent/skills/`:

```markdown
# Review code for security issues
Review the current codebase for security vulnerabilities. Focus on: {args}
```

Then use `/review OWASP top 10` in the REPL.

### Custom System Prompt

Place a `system.md` at `~/.claude-agent/system.md` to override the default agent identity.

## Stats

- **Binary:** ~5MB (release, LTO, stripped, SQLite + rustls bundled)
- **Dependencies:** 14 crates
- **Startup:** <100ms
- **Zero warnings** — clean clippy + rustc

## License

MIT

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ExpertVagabond](https://github.com/ExpertVagabond)
- **Source:** [ExpertVagabond/claude-agent-rs](https://github.com/ExpertVagabond/claude-agent-rs)
- **License:** MIT
- **Homepage:** https://claude-agent-rs.pages.dev

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: flagged — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-expertvagabond-claude-agent-rs
- Seller: https://agentstack.voostack.com/s/expertvagabond
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
