xclaudeai
v0.1.7
Published
xCLAUDE — A receipt for your AI. Local audit log for every Claude tool call.
Maintainers
Readme
xCLAUD
AI agent governance for Claude Desktop.
xCLAUD is an MCP (Model Context Protocol) server that sits between Claude and your tools, monitoring every action for harmful events — prompt injection attacks, PII leakage, credential exposure, and unauthorised data exports — and logging them to a local audit trail.
Built for people who use Claude with powerful tools and want visibility and control over what it does.
What it does
- Monitors tool calls — every file read, write, network request, and external API call is intercepted and logged
- Detects PII and credentials — scans content for emails, phone numbers, IBANs, API keys, JWTs, and more before they leave your machine
- Flags prompt injection — detects when fetched content tries to hijack Claude's behaviour
- Policy engine — configurable rules that allow, warn, or block sensitive actions
- Audit trail — tamper-evident JSONL log at
~/.xclaud/audit.jsonl - Live dashboard — local web UI showing events in real time
Install
npx xclaudeai setupThat's it. The setup wizard will:
- Ask for your API key (press Enter to use local mode for free)
- Detect your Claude Desktop config
- Back it up and rewrite it to route tool calls through xCLAUD
Verify it's running
xclaudeai statusLive dashboard
xclaudeai dashboardOpen http://localhost:4444 — auto-refreshes every 3 seconds.
What gets monitored
| Event | Severity | Example |
|---|---|---|
| Prompt injection | 🔴 High | Fetched page contains IGNORE PREVIOUS INSTRUCTIONS |
| Credential detected | 🔴 High | JWT token or API key found in content |
| PII detected | 🟡 Medium | Email, phone, IBAN, passport number found |
| Data export warning | 🟡 Medium | Content being sent to external URL |
| Email send warning | 🟡 Medium | Claude about to send an email |
| Tool call allowed | 🟢 Low | Normal file read or write |
Governance tools available to Claude
xCLAUD exposes four tools Claude can call directly:
sg_check_policy— pre-clearance before sensitive actionssg_detect_pii— scan content for PII before transitsg_get_budget_status— check token/cost budget remainingsg_log_event— log a governance event to the audit trail
Claude is instructed to use these automatically via the MCP instructions field.
Configuration
xCLAUD reads from environment variables set in claude_desktop_config.json:
| Variable | Default | Description |
|---|---|---|
| SG_API_KEY | sg_dev_local | Your xCLAUD API key |
| SG_MODE | stdio | Transport mode |
| SG_LOG_PATH | ~/.xclaud/audit.jsonl | Audit log location |
| SG_POLICY_PATH | ~/.xclaud/policy.json | Custom policy file |
| SG_PROXIED_SERVERS | (empty) | Comma-separated list of MCP servers to proxy |
Restore original config
If you want to remove xCLAUD:
xclaudeai restoreThis restores your original claude_desktop_config.json from the backup created during setup.
Local development
git clone https://github.com/ignaciolucea-beep/xclaud
cd xclaud
npm install
npm run build
npx xclaudeai setupLicense
MIT © Sigma Cognition
xCLAUD is an early-stage project. Feedback welcome — open an issue or email [email protected]
