Metadata-Version: 2.4
Name: fiveclaw-agent
Version: 1.0.5
Summary: Local MCP agent for FiveClaw — FiveM AI development tools
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: fastmcp>=3.0
Provides-Extra: ssh
Requires-Dist: paramiko>=3.0; extra == "ssh"

# fiveclaw-agent

Local MCP agent for [FiveClaw](https://fiveclaw.xyz) — AI-powered FiveM development tools.

## What it does

`fiveclaw-agent` runs on your machine alongside your FiveM server. It handles local operations (file search, logs, MySQL, txAdmin, SSH deploy) and relays AI analysis requests to the FiveClaw platform using your API key.

**Local tools** (run on your machine):
- Resource map generation and querying
- File search across Lua/JS resources
- Lua syntax checking
- Log reading
- MySQL query execution
- txAdmin server control (start/stop/restart resources, send console commands)
- SSH deployment to remote servers
- Persistent context memory

**Cloud tools** (powered by FiveClaw, gated by your plan):

*fivem-mcp (all plans):*
- FiveM native docs — 6,400+ native functions
- ESX, QBCore, ox_lib & ox_core framework docs
- Best practices, anti-pattern guides, error solutions
- Live CFX documentation fetch

*ai-fivem-dev-mcp (Pro + Enterprise):*
- Resource validation and health checks
- Anti-pattern and duplicate code detection
- Security scanner — injection, auth & logic vulnerabilities
- Export contract validation and NUI completeness checks
- Event tracer — trace any event from trigger to handler
- Find exports, event handlers, and triggers across your codebase
- Full test engine — unit, event, database, and coverage tests
- Auto-generate test stubs from existing code
- Pattern library — scaffold new resources from reusable templates
- Load order validator and dependency graph (Enterprise)
- Team patterns — shared scaffolds across your whole team (Enterprise)

## Requirements

- Python 3.10+
- A [FiveClaw](https://fiveclaw.xyz) account with an active subscription
- A FiveClaw API key (generate one at [fiveclaw.xyz/dashboard/keys](https://fiveclaw.xyz/dashboard/keys))

## Installation

```bash
pip install fiveclaw-agent

# With SSH deployment support
pip install fiveclaw-agent[ssh]
```

## Setup

1. **Create a `.env` file** in your FiveM project root:

```env
FIVECLAW_API_KEY=fc_live_your_key_here

# Optional — auto-detected if not set
# FIVEM_PROJECT_ROOT=/path/to/your/server

# Optional SSH deployment
# FIVEM_SSH_HOST=1.2.3.4
# FIVEM_SSH_USER=root
# FIVEM_SSH_KEY_PATH=~/.ssh/id_rsa
# FIVEM_REMOTE_RESOURCES=/server-data/resources
```

2. **Add to your Claude config** (`claude_desktop_config.json` or `.mcp.json`):

```json
{
  "mcpServers": {
    "fiveclaw": {
      "url": "http://localhost:5200/mcp"
    }
  }
}
```

3. **Start the agent** in your project directory:

```bash
fiveclaw
```

The agent runs on `http://localhost:5200/mcp` and stays running while you work. Restart it anytime without restarting Claude.

4. **Verify** by asking Claude: *"Run mcp_health to check my FiveClaw connection."*

## Configuration

SSH, txAdmin, and MySQL settings are configured locally inside your MCP client config (e.g. `claude_desktop_config.json`). The setup guide at [fiveclaw.xyz/dashboard/download](https://fiveclaw.xyz/dashboard/download) walks you through each field — only fill in what you use, everything is optional.

## Links

- [FiveClaw Dashboard](https://fiveclaw.xyz/dashboard)
- [Setup Guide](https://fiveclaw.xyz/dashboard/download)
- [Pricing](https://fiveclaw.xyz/pricing)
