MCP Hub
Back to servers

agestra

Multi-host MCP orchestration for Claude Code, Codex CLI, Gemini CLI, and local models

npm1.3k/wk
Updated
May 1, 2026

Quick Install

npx -y agestra

Agestra

npm version license

Agent + Orchestra — Multi-host MCP orchestration for Claude Code, Codex CLI, Gemini CLI, and local models.

English | 한국어 | 日本語 | 中文

Agestra connects the Claude host/CLI, Ollama (local), Gemini CLI, and Codex CLI as pluggable providers, enabling multi-agent orchestration with independent aggregation, consensus debates, autonomous CLI workers, parallel task dispatch, cross-validation, and capability-based provider routing with optional trace evidence — all through 45 MCP tools.

Quick Start

Pick the host you work in first. Use the --assets path when you want the host-native commands/agents installed too; use MCP-only registration when you only need the server connection.

HostFrom this repositoryFrom global npmWhat --assets adds
Claude Code/plugin marketplace add mua-vtuber/Agestra then /plugin install agestra@agestrasame plugin flowPlugin bundle, commands, agents, hooks, and MCP server together
Codex CLInpm run bundle then npm run install:codex:assetsnpm install -g agestra then agestra-install codex --assetsGenerated custom agents under .codex/agents/
Gemini CLInpm run bundle then npm run install:gemini:assetsnpm install -g agestra then agestra-install gemini --assets --scope userProject assets for project scope, or the native agestra Gemini extension for user scope

MCP-only registration is also available:

HostRepository packageGlobal package from a checkout
Codex CLInpm run install:codexnpm run install:codex:global
Gemini CLInpm run install:gemininpm run install:gemini:global

Claude keeps the native plugin UX. Codex combines AGENTS.md, generated custom agents, and the registered agestra MCP server. Gemini combines GEMINI.md, .gemini/commands/agestra/, generated skills, and either project-scope managed files or a user-scope native extension.

Note: npm run install:gemini:assets uses user scope by default. For project-scope managed Gemini files from a checkout, run node scripts/install-host-mcp.mjs gemini --assets --scope project.

Available Gemini commands after asset setup:

  • /agestra:setup
  • /agestra:review
  • /agestra:design
  • /agestra:idea
  • /agestra:implement
  • /agestra:qa
  • /agestra:security

Prerequisites

At least one AI provider must be installed:

ProviderInstallType
Claude Codenpm install -g @anthropic-ai/claude-codeCloud
Ollamacurl -fsSL https://ollama.com/install.sh | shLocal LLM
Gemini CLInpm install -g @google/gemini-cliCloud
Codex CLInpm install -g @openai/codexCloud

Each CLI manages its own authentication. Sign in through each CLI's own login flow before using Agestra — Agestra spawns these CLIs as child processes and does not handle their credentials.

Optional but recommended:

  • tmux — enables visible CLI worker panes during autonomous execution
  • ripgrep (rg) on Windows — if Codex resolves rg to its bundled Store-app path and fails with an "Access is denied" error, install ripgrep separately so a normal rg.exe is found first in PATH:
cargo install ripgrep

Alternative:

winget install BurntSushi.ripgrep.MSVC

Philosophy

Multi-AI is for verification, not token savings. The review, design exploration, and idea generation workflows are structured as validation processes — getting independent opinions from multiple AI providers to catch blind spots, not to parallelize for speed.

How It Works

flowchart TD
    Start([User invokes /agestra command]) --> Preflight[Setup status / environment / provider check]
    Preflight --> Domain{Workflow type}

    Domain -->|Idea / design / review / security| TextLead[Leader assembles specialist and external AIs]
    Domain -->|QA| QaLead[Leader forms QA Brigade]
    Domain -->|Implementation| ImplLead[Leader decomposes implementation work]

    ImplLead --> ImplRoute{Task shape}
    ImplRoute -->|Clear parallel implementation| CliWorkers[Codex / Gemini CLI workers<br/>isolated worktrees]
    ImplRoute -->|Capability-matched scoped work| Ollama[Local/tool models<br/>read / write if policy allows]
    ImplRoute -->|Risky or core change| HostImpl[Host implementer<br/>close leader supervision]
    CliWorkers --> ReviewDiff[Leader monitors status / quota / diff]
    Ollama --> ReviewDiff
    HostImpl --> ReviewDiff
    ReviewDiff --> Merge{Acceptable?}
    Merge -->|No| Reassign[Correction prompt or reassignment]
    Reassign --> ImplRoute
    Merge -->|Yes| QaEvidence

    QaLead --> QaEvidence[Host QA collects executable evidence<br/>build / tests / E2E / screenshots]
    TextLead --> Providers{External AIs available?}
    QaEvidence --> Providers

    Providers -->|No| LocalOut[Host specialist writes<br/>domain report or document]
    Providers -->|Yes| Individual[Each AI writes independent source material]
    LocalOut --> Final([Report back to user])

    Individual --> Ledger[ITEM-* JSON consensus ledger]
    Ledger --> Round[Sequential rounds<br/>agree / disagree / revise / opinion]
    Round --> Gate{Ledger state}
    Gate -->|Needs more discussion| Round
    Gate -->|Leader judgment needed| LeaderDecision[Leader chooses continue / approve / reject]
    Gate -->|Resolved| LeaderDecision
    LeaderDecision -->|Continue| Round
    LeaderDecision -->|Approve| Approved[Approved synthesis document]
    LeaderDecision -->|Reject| Rejected[Rejected / unresolved synthesis document]
    Approved --> Final
    Rejected --> Final

When no external provider is configured, Agestra skips consensus rounds and the host specialist writes the domain artifact: review or QA report, design plan, idea record, and so on. When a structured debate runs, leader finalization always leaves a synthesis document: approval produces an approved synthesis, while rejection produces a rejected/unresolved synthesis that lists accepted, excluded, and still-open items.

Host Workflows

HostNatural entrypoint
Claude Code/agestra setup, /agestra review, /agestra qa, /agestra security, /agestra design, /agestra idea, /agestra implement
Codex CLIPlain-language requests guided by AGENTS.md
Gemini CLI/agestra:setup, /agestra:review, /agestra:qa, /agestra:security, /agestra:design, /agestra:idea, /agestra:implement

All three hosts drive the same MCP server and shared workflow specs from commands/*.md.

Commands

CommandDescription
/agestra setupInitial AI provider selection and setup
/agestra review [target]Review code quality, security, and integration completeness
/agestra qa [target]Verify implementation results and produce PASS/FAIL evidence
/agestra security [target]Run a dedicated security review
/agestra idea [topic]Discover improvements by comparing with similar projects
/agestra design [subject]Explore architecture and design trade-offs before implementation
/agestra implement [task]Execute implementation through Leader-host-only or suggested AI distribution mode

When external providers are available, review, QA, security, design, and idea workflows route through the team lead for multi-AI cross-validation. For QA, the team lead forms a QA Brigade from the configured provider set by default, then hands it to the moderator engine's existing ITEM-* / JSON stance ledger: host QA collects executable evidence, providers take distinct verification lenses, candidate findings are challenged before inclusion, and the synthesis preserves consensus plus dissent. E2E/browser/runtime execution remains host-owned, and external providers review the resulting evidence. When no providers are detected, the current leader host works with its local specialist agent automatically. Implementation requests first classify the task and can ask whether to propose an AI task distribution.

Agents

AgentModelRole
agestra-team-leadSonnetFull orchestrator — environment check, capability-based provider routing, work mode selection, CLI worker supervision, QA loop
agestra-implementerSonnetScoped implementation executor — code edits, test updates, local verification
agestra-e2e-writerSonnetPersistent E2E test writer — creates approved browser-flow tests without changing product behavior
agestra-reviewerOpusStrict quality verifier — security, orphans, spec drift, test gaps
agestra-designerOpusArchitecture explorer — Socratic questioning, trade-off analysis
agestra-ideatorSonnetImprovement discoverer — web research, competitive analysis
agestra-moderatorSonnetMulti-mode facilitator — debate with consensus detection, independent aggregation, document review, conflict resolution
agestra-qaOpusQA verifier — design compliance, PASS/FAIL judgment
agestra-securityOpusSecurity reviewer — threat model, auth/data-flow risk, dependency and secret hygiene

Skills

SkillDescription
provider-guideProvider routing, mode reference, orchestration pipeline
worker-manageList, check, collect, and stop CLI workers
cancelGraceful stop for workers, debates, chains, tasks
build-fixAuto-diagnose and fix build/typecheck/lint errors
traceView agent execution timeline and flow diagrams
setupInitial provider selection and providers.config.json write
designArchitecture exploration workflow with multi-AI mode selection
ideaImprovement discovery workflow with multi-AI mode selection
reviewCode quality / security / hardcoding review workflow with multi-AI mode selection
qaDesign-contract verification and PASS/FAIL evidence workflow
securityDedicated security review workflow
e2ePersistent browser E2E test-authoring workflow
leaderMulti-AI/provider orchestration entry — catches explicit provider, debate, consensus, or cross-validation signals, classifies the domain, and hands off to agestra-team-lead

Architecture

Turborepo monorepo with 8 packages:

PackageDescription
@agestra/coreAIProvider interface, provider descriptors with capability/difficulty metadata, config loader, CLI runner, atomic writes, job queue, secret scanner, worktree manager, task manifest, CLI worker manager
@agestra/provider-claudeAnthropic Claude CLI adapter
@agestra/provider-ollamaOllama HTTP adapter with model detection
@agestra/provider-geminiGoogle Gemini CLI adapter
@agestra/provider-codexOpenAI Codex CLI adapter
@agestra/agentsDebate engine with consensus detection, turn quality evaluator, task dispatcher, cross-validator, task chain, auto-QA, file change tracker, session manager
@agestra/workspaceWorkspace document manager for reviews, analysis notes, and aggregated reports
@agestra/mcp-serverMCP protocol layer, 45 tools, environment-aware tool filtering, dispatch

Design Principles

  • Provider abstraction — All backends implement AIProvider (chat, healthCheck, getCapabilities). Adding a new provider is isolated to a provider package plus factory registration.
  • Zero-config — Providers are auto-detected at startup. No manual configuration required.
  • Host-native — Claude uses the plugin bundle, Codex uses AGENTS.md plus custom agents, and Gemini uses GEMINI.md, commands, skills, or the native extension. All hosts share the same MCP server and workflow core.
  • Modular dispatch — Each tool category is an independent module with getTools() + handleTool(). The server collects and dispatches dynamically.
  • Atomic writes — All file operations use write-to-temp-then-rename to prevent corruption.
  • Dead-end tracking — Failed approaches are recorded and injected into future prompts.
  • Preflight security — CLI worker spawning includes secret scanning and array-based process args to prevent injection.

Work Modes

In multi-provider modes (consensus debate, cross-validation, review rounds), one provider's output may become part of the prompt the next provider receives.

Text work (review, QA, security, design, idea): providers available → consensus debate mode; no providers → Leader-host only. For QA, the team lead runs a QA Brigade by default while E2E/runtime checks stay host-owned.

Implementation work (team-lead orchestration):

  • Leader-host onlyagestra-implementer applies scoped code changes; the team lead still routes QA through the QA Brigade by default, with host-only review/QA available on request.
  • Suggested AI distribution — the team lead proposes a routing table, asks for approval, then distributes work according to the capabilities of detected models, including frontier and local models. Codex/Gemini CLI workers handle suitable autonomous code edits, and local/tool models may receive read-only or read/write AgentLoop tools according to their executionPolicy.

Tools (45)

AI Chat (3)

ToolDescription
ai_chatChat with a specific provider (use "auto" for trace-assisted routing when observations exist); optionally persist replies with save_as_document
ai_analyze_filesRead files from disk and send contents with a question to a provider
ai_compareSend the same prompt to multiple providers, compare responses

Agent Orchestration (15)

ToolDescription
agent_debate_startStart a multi-provider debate (non-blocking, optional quality loop + validator)
agent_debate_statusCheck legacy debate status or structured session progress, phase, participant activity, and document paths
agent_debate_createCreate a turn-based debate session (returns debate ID)
agent_debate_turnExecute one provider's turn; supports provider: "claude" for Claude's independent participation
agent_debate_concludeEnd a debate and generate final transcript
agent_debate_structuredStart an approval-gated structured debate in the background — individual reviews, optional alias clarification, JSON consensus rounds, status polling, and no synthesis until the leader approves or rejects
agent_debate_approveLeader-approve a ready-for-approval structured debate; writes the approved synthesis document and closes the session
agent_debate_continueStart additional background rounds on a ready-for-approval or escalated structured-debate session (3/5/10), then poll status
agent_debate_rejectReject a structured-debate session; writes a rejected synthesis document and optionally an issue document
agent_debate_submit_turnSubmit a native host-specialist turn when structured debate status reports phase: awaiting-host-turn; the workflow resumes after all pending host turns arrive
agent_debate_reviewSend a document to multiple providers for independent review
agent_cross_validateCross-validate outputs (agent-tier validators only)
agent_changes_reviewReview file changes from an isolated task
agent_changes_acceptAccept and merge changes from an isolated task
agent_changes_rejectReject changes and clean up the isolated worktree

CLI Workers (4)

ToolDescription
cli_worker_spawnSpawn a CLI AI (Codex/Gemini) in autonomous mode with git worktree isolation and preflight security
cli_worker_statusCheck worker FSM state, heartbeat, and output tail
cli_worker_collectCollect completed worker results (git diff, output, exit code)
cli_worker_stopStop a running worker (SIGTERM → SIGKILL) and clean up worktree

Environment (1)

ToolDescription
environment_checkDetect CLI tools, local model tiers, tmux, git worktree support, available modes

Workspace (7)

ToolDescription
workspace_create_reviewCreate a code review document with files and rules
workspace_request_reviewRequest a provider to review a document
workspace_review_statusCheck review completion status
workspace_add_commentAdd a comment to a review
workspace_create_documentCreate a general-purpose workspace document with title, markdown content, and optional metadata
workspace_readRead document contents
workspace_listList all workspace documents

Provider Management (2)

ToolDescription
provider_listList providers with status and capabilities
provider_healthHealth check one or all providers

Setup (2)

ToolDescription
setup_statusDetect available providers and show the current setup/config state
setup_applyWrite selected providers, locale, and selection policy to providers.config.json

Host Assets (3)

ToolDescription
host_assets_statusCheck generated host-native assets such as Codex custom agents and Gemini assets
host_assets_installExplicitly install or refresh managed host-native assets
host_assets_uninstallRemove managed host-native assets tracked by Agestra

Ollama (2)

ToolDescription
ollama_modelsList installed models with sizes and tier classification
ollama_pullDownload a model

Jobs (2)

ToolDescription
cli_job_submitSubmit a long-running CLI task to background
cli_job_statusCheck job status and output

QA (1)

ToolDescription
qa_runRun vetted workspace build/test QA profiles and return a PASS/FAIL summary

Trace / Observability (3)

ToolDescription
trace_queryQuery trace records with filtering (provider, task, time range)
trace_summaryGet optional prior quality observations and performance metrics per provider
trace_visualizeGenerate a Mermaid diagram of a traced operation's flow

Configuration

providers.config.json

Created by /agestra setup. The default location is the host-shared ~/.agestra/providers.config.json. Resolution order is AGESTRA_CONFIG_PATH env var → existing ~/.agestra/providers.config.json → existing legacy $CLAUDE_PLUGIN_ROOT/providers.config.json~/.agestra/providers.config.json for new writes. It is not meant to sit in the project repo and is gitignored accordingly.

FieldDescription
selectionPolicy"default-only" (only supported value today)
localeUI locale for moderator narration (ko/en/ja/zh)
providers[].idUnique identifier
providers[].typeollama, gemini-cli, codex-cli, or claude-cli
providers[].enabledWhether to register this provider at startup — hard opt-out when false
providers[].executionPolicyread-only, workspace-write, or full-auto; Ollama uses this to choose read-only vs read/write AgentLoop tools
providers[].configType-specific settings (host, timeout, etc.)

Runtime Data

Stored under .agestra/ (gitignored):

PathPurpose
.agestra/sessions/Debate and task session state
.agestra/workspace/Workspace documents (reviews, notes, reports)
.agestra/.jobs/Background job queue
.agestra/.workers/CLI worker state, manifests, and output logs
.agestra/worktrees/Git worktrees for isolated CLI worker execution
.agestra/traces/Provider trace JSONL (auto-pruned after 30 days)

Development

npm install        # Install dependencies
npm run build      # Build all packages (Turborepo)
npm test           # Run all tests (Vitest)
npm run bundle     # Build single-file plugin bundle (esbuild)
npm run dev        # Watch mode
npm run lint       # Lint (ESLint)
npm run clean      # Remove dist/

Project Structure

agestra/
├── AGENTS.md               # Codex host instructions
├── GEMINI.md               # Gemini host instructions
├── .claude-plugin/
│   ├── plugin.json          # Claude Code plugin manifest
│   └── marketplace.json     # Plugin marketplace metadata
├── .gemini/
│   └── commands/
│       └── agestra/
│           ├── setup.toml   # /agestra:setup in Gemini CLI
│           ├── review.toml  # /agestra:review in Gemini CLI
│           ├── design.toml  # /agestra:design in Gemini CLI
│           ├── idea.toml    # /agestra:idea in Gemini CLI
│           ├── implement.toml # /agestra:implement in Gemini CLI
│           ├── qa.toml      # /agestra:qa in Gemini CLI
│           └── security.toml # /agestra:security in Gemini CLI
├── commands/
│   ├── setup.md             # /agestra setup — provider setup
│   ├── review.md            # /agestra review — quality verification
│   ├── qa.md                # /agestra qa — PASS/FAIL verification
│   ├── security.md          # /agestra security — security review
│   ├── idea.md              # /agestra idea — improvement discovery
│   ├── design.md            # /agestra design — architecture exploration
│   └── implement.md         # /agestra implement — execution workflow
├── agents/
│   ├── agestra-reviewer.md  # Strict quality verifier (Opus)
│   ├── agestra-designer.md  # Architecture explorer (Opus)
│   ├── agestra-ideator.md   # Improvement discoverer (Sonnet)
│   ├── agestra-implementer.md # Scoped implementation executor (Sonnet)
│   ├── agestra-e2e-writer.md # Persistent E2E test writer (Sonnet)
│   ├── agestra-moderator.md # Multi-mode facilitator (Sonnet)
│   ├── agestra-qa.md        # QA verifier (Opus, no code writes)
│   ├── agestra-security.md  # Security reviewer (Opus)
│   └── agestra-team-lead.md # Full orchestrator (Sonnet, no code writes)
├── skills/
│   ├── provider-guide.md    # Provider routing and mode reference
│   ├── worker-manage.md     # CLI worker management
│   ├── cancel.md            # Graceful operation cancellation
│   ├── build-fix.md         # Build error auto-repair
│   ├── trace.md             # Execution timeline viewer
│   ├── setup.md             # Initial provider selection
│   ├── design.md            # Architecture exploration workflow
│   ├── idea.md              # Improvement discovery workflow
│   ├── review.md            # Code quality review workflow
│   ├── qa.md                # Design-contract QA workflow
│   ├── security.md          # Dedicated security review workflow
│   ├── e2e.md               # Persistent E2E test-writing workflow
│   └── leader.md            # Multi-AI orchestration entry router
├── hooks/
│   └── user-prompt-submit.md  # Tool recommendation hook
├── dist/
│   └── bundle.js            # Single-file MCP server bundle
├── scripts/
│   ├── bundle.mjs           # esbuild bundle script
│   ├── install-host-mcp.mjs # Register Claude/Codex/Gemini MCP + host assets
│   └── uninstall-host-mcp.mjs # Remove host registrations and managed assets
├── packages/
│   ├── core/                # AIProvider interface, registry, security, workers
│   ├── provider-claude/     # Anthropic Claude CLI adapter
│   ├── provider-ollama/     # Ollama HTTP adapter
│   ├── provider-gemini/     # Gemini CLI adapter
│   ├── provider-codex/      # Codex CLI adapter
│   ├── agents/              # Debate engine, dispatcher, cross-validator
│   ├── workspace/           # Workspace document manager
│   └── mcp-server/          # MCP server, 45 tools, environment-aware filtering, dispatch
├── package.json             # Workspace root
└── turbo.json               # Turborepo pipeline

Adding a Provider

  1. Create packages/provider-<name>/ implementing AIProvider.
  2. Add a factory in packages/mcp-server/src/index.ts.
  3. npm run build && npm test

Uninstall

Claude Code:

/plugin uninstall agestra@agestra

Codex CLI:

npm run uninstall:codex
npm run uninstall:codex:assets

Gemini CLI:

npm run uninstall:gemini
npm run uninstall:gemini:assets

The *:assets uninstall commands remove both the host registration and unchanged generated host assets. Codex assets are custom-agent files. Gemini project-scope assets are managed files; Gemini user-scope assets are removed through gemini extensions uninstall agestra. If a generated asset was edited by the user, Agestra leaves it in place and reports it. For a global npm install, use agestra-uninstall codex --assets or agestra-uninstall gemini --assets --scope user.

If you also want to delete generated project data, remove the .agestra/ directory manually.


License

GPL-3.0

Reviews

No reviews yet

Sign in to write a review