AgentHarbor Documentation

Introduction

AgentHarbor is a native tray app for macOS and Windows that manages your AI coding agents. It sits in your menu bar showing real-time rate limits, session usage, and monthly spend for every AI provider you use — and when you want to deploy an MCP server, rule, skill, hook, or sub-agent across Claude Code, Cursor, Windsurf, and more, a guided wizard handles the diffs, backups, and atomic writes.

Built with Tauri v2 (Rust backend + React/TypeScript frontend), it offers native performance, secure secrets storage via the OS keychain, and automatic configuration backups. It is local-only: no telemetry, and the only outbound calls are to each provider's official API using your own tokens.

LayerTechnology
FrameworkTauri v2
BackendRust
FrontendReact + TypeScript + Vite
StylingTailwind CSS v3 (dark theme)
StateZustand
TargetsmacOS 13+ (Apple Silicon) · Windows 10+ (x64)

Getting Started

Installation

Download the latest release from GitHub for your platform:

PlatformArtifactRequirements
macOSAgentHarbor_<version>_aarch64.dmgmacOS 13+ · Apple Silicon
Windows (installer)AgentHarbor_<version>_x64-setup.exeWindows 10/11 · x64
Windows (MSI)AgentHarbor_<version>_x64_en-US.msiWindows 10/11 · x64

On macOS, open the DMG and drag AgentHarbor.app into Applications. The app is signed with an Apple Developer ID and notarized. If macOS ever flags it as "damaged" (a rare quarantine-attribute issue), run xattr -cr /Applications/AgentHarbor.app.

Warning
The Windows installer is currently unsigned, so SmartScreen will show "Windows protected your PC" on first run — click More info → Run anyway. Linux support is coming soon.

AgentHarbor keeps itself up to date: the built-in updater checks GitHub Releases every 4 hours and shows an in-app banner with one-click install (snoozable for 24h).

First Steps

After installing, here's how to get started:

  1. Open AgentHarbor — The app starts on the Registry page showing all available capabilities, and its icon appears in your menu bar / system tray.
  2. Connect providers — Analytics for Claude Code, Cursor, Codex, and Gemini CLI are auto-detected in most cases; the tray popover shows a Connect button for anything that needs auth.
  3. Select a project — Use the project selector to choose a project directory. AgentHarbor detects which adapters the project already uses.
  4. Browse capabilities — Filter by type (MCP, Rule, Skill, Hook, Plugin) and select what you want to deploy.
  5. Deploy — Click Deploy, choose your target adapter(s), preview the diff, and confirm.

Core Concepts

Capabilities

A capability is a deployable configuration unit. AgentHarbor supports six types:

MCP Server

Model Context Protocol servers

Rule

System prompts & context rules

Skill

Reusable agent skills (SKILL.md)

Hook

Event-triggered automations

Plugin

Installation scripts

Custom

Your own local definitions

Each capability has a composite ID, version, visibility (public/private/discovered), tags, and adapter compatibility metadata.

Agents

Agents are AI subagents deployed as .md files in agents/*.md. Each agent has:

PropertyDescription
NameHuman-readable name (auto-generates composite ID)
Modelhaiku, sonnet, or opus
Color8 color options for visual identification
Memoryproject, user, or none scope
Tool Accessall, read-only, edit, execution, mcp, other
System PromptDetailed instructions for the agent
Required CapabilitiesAuto-included when deploying the agent

Example agent file format:

agents/code-reviewer.md
markdown
---
name: Code Reviewer
description: Reviews code changes for quality, security, and best practices.
model: opus
color: purple
memory: project
tools:
  - read
  - edit
tags:
  - review
  - quality
required_capabilities:
  - community/typescript-strict
---

You are a meticulous code reviewer. When invoked, you should:

1. Read the changed files carefully
2. Check for security vulnerabilities
3. Verify error handling
4. Ensure consistent coding style
5. Provide constructive feedback with specific line references

Presets

Presets are named groups of capabilities for one-click deployment. AgentHarbor includes bundled presets like "Full-Stack Web" and "Data Science" (read-only), and you can create custom presets from any selection of capabilities — use "Save as preset" from the multi-select bar or any capability detail.

Composite IDs

Every capability and agent uses a composite ID in author/name format, e.g., community/github-mcp. Names must be kebab-case.

community/github-mcp       ✓ valid
my-org/custom-linter       ✓ valid
github_mcp                 ✗ missing author
community/GitHub MCP       ✗ not kebab-case

Adapters

Adapters are the translation layer between AgentHarbor's universal format and tool-specific configuration files. Each adapter knows which capability types it supports and where to write config files. Besides deploying, most adapters also get a section in the sidebar for managing that tool's own configuration — see Per-Tool Management.

Claude Code

The Claude Code adapter supports all capability types: MCP, rules, skills, hooks, plugins, and agents.

ConfigGlobal PathProject Path
MCP / Settings~/.claude/settings.json<project>/.claude/settings.json
Rules~/.claude/CLAUDE.md<project>/CLAUDE.md
Skills~/.claude/skills/<project>/.claude/skills/
Agents<project>/agents/*.md

Cursor

Cursor supports MCP servers, rules, and shared agents. Skill and hook capabilities are not deployed to Cursor (Cursor's own hooks are managed from its sidebar section instead).

ConfigGlobal PathProject Path
MCP~/.cursor/mcp.json<project>/.cursor/mcp.json
Rules~/.cursor (global rules)<project>/.cursorrules
Agents<project>/agents/*.md (shared)

Windsurf

Windsurf supports MCP servers and rules only. Agents are not supported.

ConfigGlobal PathProject Path
MCP~/.codeium/windsurf/mcp_config.json<project>/.windsurf/mcp_config.json
Rules~/.codeium/windsurf (global rules)<project>/.windsurfrules
Warning
When deploying agents to multiple adapters, AgentHarbor will show a warning that Windsurf does not support agent deployment. Agent files will only be written for compatible adapters.

Gemini CLI

The Gemini CLI adapter deploys skills, hooks, and agents, and its sidebar section manages Gemini's global config, memory, skills, agents, extensions, and analytics (per-model quota and tier info).

Codex

The Codex (OpenAI) adapter deploys MCP servers and skills, and its sidebar section manages the global config, skills, and analytics (rate limits, credits, token usage).

More Adapters

AdapterStatusNotes
Claude DesktopEnabled by defaultGlobal config management; shares rate limits with Claude Code
GitHub CopilotHidden by defaultEnable in Settings → Adapters; analytics via device flow
AntigravityHidden by defaultEnable in Settings → Adapters
VS CodeHidden by defaultEnable in Settings → Adapters
KiroComing soonAnalytics (credits usage) already supported
Note
You can choose which adapters appear in the sidebar from Settings → Adapters.

Capability Types

MCP Servers

MCP (Model Context Protocol) servers provide tool capabilities to AI agents. They run as background processes and expose tools via a standard protocol.

Example MCP capability
json
{
  "id": "community/github-mcp",
  "type": "mcp",
  "name": "GitHub MCP",
  "version": "1.0.0",
  "content": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-github"],
    "env": {
      "GITHUB_TOKEN": {
        "description": "GitHub personal access token",
        "required": true,
        "secret": true
      }
    }
  }
}

Environment variables marked as secret: true are stored in the OS keychain (macOS Keychain / Windows Credential Manager) and injected at deploy time. Manage them from Settings → Secrets.

The registry can also discover an MCP server's tools live — AgentHarbor connects to the server (stdio or HTTP) and lists what it exposes before you deploy.

Rules

Rules are system prompts or context rules that guide AI behavior. They are deployed as text content to adapter-specific files (e.g., CLAUDE.md or .cursorrules).

Example rule
json
{
  "id": "community/typescript-strict",
  "type": "rule",
  "name": "TypeScript Strict",
  "content": {
    "body": "## TypeScript Rules\n- No use of 'any' type\n- Explicit return types on functions\n- Use strict null checks\n- Prefer interfaces over type aliases"
  }
}

Skills

Skills are reusable agent instructions built around a SKILL.md file, optionally with helper files and scripts. They can span multiple files, specify model overrides, and control tool access.

Note
Skills deploy to .claude/skills/ for Claude Code (project or global scope), and to Gemini CLI and Codex via their adapters. You can also import a skill straight from any GitHub URL, or browse Anthropic's official skills and the OpenClaw skills registry.

Hooks

Hooks are event-triggered automations. They match specific events (e.g., pre-commit, post-save) and execute shell commands.

{
  "id": "community/pre-commit-lint",
  "type": "hook",
  "content": {
    "event": "pre-commit",
    "matcher": "**/*.{ts,tsx,js,jsx}",
    "command": "npx eslint --fix"
  }
}

Plugins

Plugins provide installation scripts and configuration management. They can set up development environments, install dependencies, and configure tools.

Custom

Use + New in the header to author your own MCP, rule, skill, hook, plugin, or agent. Custom items live in your local registry only (never synced to the community) and are editable and deletable from their detail view. Your custom capabilities can be exported and imported as JSON from Settings → Data Management.

Deploy

Deploy Wizard

The deploy wizard is a 4-step modal that guides you through the deployment process:

  1. Project — Pick a folder; AgentHarbor detects which adapters are usable (.claude/, .cursor/, .windsurfrules, .codex/, etc.). Or choose global scope to target ~/ configs.
  2. Adapter Selection — Multi-select target tools, with capability compatibility shown per adapter
  3. Preview — A live diff per adapter (split, unified, or raw mode) with a per-file strategy dropdown
  4. Success — Files written, "Open in Finder / Cursor / VS Code" buttons, and Undo Deploy

Deploy Strategies

Each file can use a different deploy strategy from the preview step:

StrategyBehavior
MergeMerge new config with existing (JSON files)
ReplaceCompletely replace the file
AppendAppend content to the existing file

A default strategy for JSON files (Merge / Overwrite / Skip) can be set in Settings → Deploy, along with whether backups are created before overwriting.

Backup & Restore

Every deploy automatically creates a backup in ~/Library/Application Support/com.agentharbor.app/backups/ (or the equivalent app-data directory on Windows). Each backup includes a manifest with timestamps and file hashes. Use the "Undo Deploy" button on the success screen or list, restore, and delete older backups from the project view. A launch-time cleanup keeps the per-project backup count bounded.

Drift Detection

AgentHarbor tracks file hashes after each deploy — and writes a <!-- AgentHarbor: Deployed Capabilities --> manifest block into CLAUDE.md and AGENTS.md. When it detects that a config file has been modified outside the app (e.g., by the IDE, a teammate, or manually), a drift indicator badge appears. You can:

  • Accept — Accept the external changes as the new baseline
  • Restore — Revert to the last deployed state
  • View diff — Compare the current state with the deployed state

Analytics & Limits

AgentHarbor's analytics subsystem tracks usage, rate limits, and spend across your AI providers and surfaces the most relevant metric in your menu bar. Everything runs locally against each provider's official API using your own credentials.

Providers

ProviderWhat you get
Claude CodeRate limits, token usage, session stats
CursorPlan usage, AI code attribution, model breakdown
Codex (OpenAI)Rate limits, credits, token usage
Gemini CLIPer-model quota, tier info
Claude DesktopShares rate limits with Claude Code
GitHub CopilotPremium & chat quotas, plan info
KiroCredits usage, bonus credits
Vertex AIQuota usage, Vertex-specific token costs
JetBrains AICredits, refill schedule, detected IDE
OpenRouterCredits balance, usage, rate limits
AugmentCredits remaining, plan, billing cycle
AmpFree tier quota, replenishment rate
Droid (Factory)Standard/premium token usage, billing
KimiWeekly quota, 5h rate limit
Kimi K2Credits consumed/remaining
z.aiToken quota, time limit, per-model breakdown
WindsurfConfig status

Most providers auto-detect existing CLI/IDE auth; others connect via API key, token, or OAuth device flow from the provider status grid.

Menu-Bar Tray

The tray icon shows the most relevant live metric for your active provider, refreshing about every 120 seconds — session percentage for Claude Code, total spend for Cursor, quota for Gemini, and so on. The tray popover has per-provider cards with quota bars, reset times, and a reconnect button that opens browser OAuth directly. The icon switches to a red variant whenever the active provider is in any non-healthy state.

ProviderMenu-bar metric
Claude Code Pro/Max% of active Session (5h), fallback to Weekly
Claude Code Enterprise$ total spend this cycle
Cursor$ total spend (included + bonus + on-demand)
Codex% of Primary (5h) window
Gemini CLI% of highest-priority tier with quota remaining

Limit States

Every provider is tracked on a limit-state ladder:

Unauthenticated → ApiDisabled → BillablePaused → SubscriptionIssue
→ RateLimited → Reached → Approaching → Healthy

State transitions fire native notifications (configurable in Settings → Analytics), so you know you're approaching a limit before you hit it.

Cost Engine

The cost engine computes per-model API-equivalent costs — Claude (Opus / Sonnet / Haiku) and Codex models — token-deduplicated across session windows, so subscription usage can be compared to what the same tokens would cost via API.

AI Features

AI Debate

AI Debate runs a multi-turn, multi-model refinement of an implementation plan with your project context. Point it at a plan (it reads ~/.claude/plans/ and ~/.cursor/plans/), pick the models, and watch them critique and improve it round by round. The debate keeps running while you navigate the app, with a live turn indicator in the sidebar.

AI Recommendations

Claude analyzes your installed AI tools, projects, and registry to suggest high-leverage actions — capabilities worth deploying, configs worth cleaning up. Open it from the tray menu ("AI Recommendations"). Results are cached for 30 minutes.

Token Optimizer

Model routing recommendations computed from your local Claude usage logs: which sessions could have run on a cheaper model, and what that would save. Heuristic-only — no API calls are made and nothing is spent on this analysis.

Switch Model

The "Switch Model" entry under Claude Code retargets Claude Code at a local Ollama model and back — useful for offline work or saving quota on routine tasks.

Per-Tool Management

Each adapter gets a collapsible section in the sidebar with management pages for that tool's own configuration — no more hunting through dotfiles:

ToolManagement pages
Claude CodeInstructions, Memory, Permissions & Control, Analytics, Prompt History, Transcripts, Plans & Todos, Switch Model
CursorGlobal Config, Rules, Permissions, Hooks, Plans, Analytics, Transcripts
WindsurfGlobal Config, Rules
Gemini CLIAnalytics, Global Config, Memory, Hooks, Skills, Agents, Extensions
Claude DesktopGlobal Config
CodexGlobal Config, Skills, Analytics

Highlights:

  • Instructions & Memory — edit CLAUDE.md and memory files with live token estimates, so you know what each file costs per prompt.
  • Permissions & Control — a full UI over Claude Code's permission settings.
  • Prompt History — browse past sessions, copy a resume command, or start a session again.
  • Transcripts — read Claude and Cursor transcripts with one-click secret scrubbing.
  • Plans & Todos — everything your agents planned, in one list.

Registry & Sync

Registry Sources

The registry merges several sources by capability ID:

  • Bundled registry — definitions that ship with the app
  • Community registry — synced from the community GitHub repo
  • Your custom items — local-only capabilities and agents you author
  • Official MCP Registry — live search of registry.modelcontextprotocol.io
  • Anthropic Skills & OpenClaw — official Anthropic skills and the community OpenClaw skills registry, plus import of any skill by GitHub URL

Community Sync

Settings → Registry Sync controls the community source: repository URL, branch, poll interval, auto-update, an optional GitHub token for rate limits, and a Sync Now button (⌘R). The status line shows how many capabilities and agents came from the community.

Notes, Projects & Data

All Projects lists every project AgentHarbor has touched, with its deployed capabilities, drift badges, and an agent memory manager — view or clear per-project and global agent memory files.

Private Notes is a local notes tree (files and folders, ⌘⇧N / ⌘⇧F) for prompts, snippets, and anything else you want next to your agent configs. Notes never leave your machine.

Data Management (Settings → Data Management) exports your private data — custom capabilities, agents, and presets — to a JSON file, and imports it on another machine. Community data is excluded.

API Reference

AgentHarbor uses Tauri commands as the bridge between the Rust backend and React frontend. The command modules in src-tauri/src/commands/ cover:

ModulePurpose
registry, sync, github_fetch, mcp_registry, mcp_discoveryCapability/agent registry, community sync, official MCP registry search, live MCP tool discovery
deploy, drift, backup, presetsDeploy pipeline, drift detection, backup store, preset CRUD
projects, project, global_configProject inventory, adapter detection, global config management
secrets, config, importexportOS-keychain secrets, settings, private data import/export
usage, session_stats, ai_tracking, model_routingProvider analytics, session stats, AI code attribution, token optimizer
claude_history, claude_metadata, transcripts, plans, prompt_history, memory, permissionsPer-tool management pages (instructions, memory, permissions, prompts, transcripts, plans)
debate, debate_history, debate_tools, recommendationsAI Debate and AI Recommendations
notes, agents, custom, extensions, cursor_rules, cursor_hooks, windsurf_rules, gemini, codexPrivate notes, agent CRUD, custom capabilities, per-adapter features

See the source on GitHub for the full command signatures.

Contributing

AgentHarbor is open source under the MIT license. We welcome contributions of all kinds:

  • New Capabilities — Add MCP servers, rules, skills, hooks, or presets to the community registry
  • New Agents — Create useful subagent definitions for common tasks
  • New Adapters & Providers — Add support for additional tools (Kiro, JetBrains, etc.) or provider analytics
  • Bug Fixes & Features — Check our GitHub Issues for open items
Tip
Check CONTRIBUTING.md on GitHub for detailed guidelines on how to submit contributions including capability and agent definitions.

Keyboard Shortcuts

ShortcutAction
⌘ KFocus search
⌘ DOpen deploy wizard
⌘ NNew capability / agent menu
⌘ ⇧ NNew note (Private Notes)
⌘ ⇧ FNew folder (Private Notes)
⌘ ,Open settings
⌘ RSync registry
⌘ /Show shortcuts help
EscapeClose modals / panels