A local runtime layer for managing multiple AI coding clients on one machine.
agent-stack exists to keep multi-agent development environments consistent. Instead of rebuilding MCP config, secret-loading, and operating rules for every client, it provides one shared layer for tooling, documentation, and sync policy.
It currently supports:
- Codex
- Cursor
- Claude Code
- Antigravity
At a high level, the repo provides:
- a shared MCP layer
- a shared documentation layer
- a shared secret-loading strategy
- a rules-driven sync mechanism for supported clients
- Reusable capabilities belong in MCP servers, not in one-off client prompts.
- Durable guidance belongs in Markdown, not only in client-specific memory or rules.
- Secrets should load from macOS Keychain, not from plaintext runtime files.
- Sync should be rules-driven and idempotent, not “smart” in an unreliable way.
- Built-in client plugins and custom MCP servers should not overlap unless there is a clear reason.
High-level view:
flowchart TB
U["User"]
subgraph Clients["Client Layer"]
C1["Codex"]
C2["Cursor"]
C3["Claude Code"]
C4["Antigravity"]
end
subgraph AgentStack["Shared Agent Stack"]
A1["docs/*.md\nshared context"]
A2["sync-agent-stack\nmanaged sync policy"]
A3["MCP templates\nand wrappers"]
A4["agent-env-keychain\nsecret loader"]
end
K["macOS Keychain"]
S["System tools\nDocker / Node / CLIs"]
U --> Clients
Clients --> AgentStack
AgentStack --> K
Clients --> S
Managed configuration flow:
flowchart LR
Sync["sync-agent-stack"]
Sync --> Codex["Codex\ndeveloperDocs"]
Sync --> Cursor["Cursor\ndeveloperDocs + github"]
Sync --> Claude["Claude Code\ndeveloperDocs"]
Sync --> Anti["Antigravity\ndeveloperDocs + github-mcp-server"]
Keychain["macOS Keychain"] --> Wrapper["agent-env-keychain"]
Wrapper --> Cursor
Wrapper --> Anti
Current client policy:
| Client | Managed entries | Notes |
|---|---|---|
| Codex | developerDocs |
Built-in plugins cover other major domains |
| Cursor | developerDocs, github |
GitHub runs through the Keychain wrapper |
| Claude Code | developerDocs |
Minimal managed setup |
| Antigravity | developerDocs, github-mcp-server |
Existing non-managed MCP entries are preserved |
This repo uses three different runtime surfaces.
Markdown files in docs/ are the cross-client source of truth for:
- architecture
- rules
- commands
- workflow policy
The repo contains:
- MCP registry templates
- per-client templates
- a sync script that applies managed entries only where they belong
Real secrets are expected to live in macOS Keychain.
This repo uses:
bin/agent-env-keychain
to expose those secrets to MCP subprocesses at runtime.
env/common.env is no longer the primary secret store. It remains only as:
- a placeholder
- a key name reference
- a bootstrap convenience file
~/.agent-stack/
README.md
.gitignore
bin/
agent-env
agent-env-keychain
sync-agent-stack
docs/
AGENTS.md
CLIENT-SETUP.md
CODING-STANDARDS.md
COMMANDS.md
RULES.md
STACK.md
WORKFLOWS.md
env/
common.env
common.env.example
mcp/
registry/
base.mcp.json
templates/
codex/
cursor/
claude-code/
antigravity/
The sync tool is intentionally conservative. It only manages entries with an explicit policy.
| Client | Managed by sync-agent-stack |
Notes |
|---|---|---|
| Codex | developerDocs |
Avoids duplicating built-in GitHub and Figma plugin coverage |
| Cursor | developerDocs, github |
GitHub runs through the Keychain wrapper |
| Claude Code | developerDocs |
Current endpoint may still be subject to network access restrictions |
| Antigravity | developerDocs, github-mcp-server |
Existing non-managed MCP entries are preserved |
This repo assumes:
- the machine is trusted
- the user controls which clients are installed and run
- secrets should not be committed into git or duplicated across client configs
Current approach:
- real secrets are stored in macOS Keychain
- runtime secret loading goes through
bin/agent-env-keychain - client configs reference env names, not literal tokens
env/common.envis blank by default and ignored by git
What this solves:
- avoids storing active tokens in repo files
- avoids duplicating secrets across multiple client configs
- keeps a single local secret-loading path
What this does not solve:
- any agent with full local file and process access is still part of your trust boundary
- network-level access controls are still external to this repo
- macOS
- Docker
- GitHub CLI if you want GitHub repo automation
- whichever AI clients you actually use
- Clone the repo into
~/.agent-stack. - Store the required secrets in macOS Keychain.
- Run the sync script:
~/.agent-stack/bin/sync-agent-stack- Restart the affected clients.
~/.agent-stack/bin/sync-agent-stackUse this after:
- pulling updates to this repo
- installing a new supported client
- changing managed sync rules
~/.agent-stack/bin/agent-env <command> ...This is mostly for bootstrap or compatibility, not the preferred runtime path.
~/.agent-stack/bin/agent-env-keychain <command> ...This is the preferred runtime path for secret-bearing MCP subprocesses.
bin/sync-agent-stack does four things:
- Detects whether a supported client exists.
- Detects whether the relevant live config file exists or should exist.
- Applies only the MCP entries that are explicitly allowed for that client.
- Leaves unrelated config intact.
What it does not do:
- it does not try to infer whether every built-in plugin is equivalent to every MCP server
- it does not try to merge arbitrary third-party policy
- it does not delete unrelated user config
This is deliberate. The script is meant to be predictable, not clever.
docs/AGENTS.md: top-level operating guidance for human and AI readersdocs/STACK.md: layer model and scopedocs/WORKFLOWS.md: sync and extension workflowsdocs/RULES.md: policy and guardrailsdocs/CLIENT-SETUP.md: per-client notesdocs/COMMANDS.md: common command patternsdocs/CODING-STANDARDS.md: cross-client authoring norms
Because that solves convenience, not security. This repo prefers Keychain at runtime and keeps common.env as a placeholder only.
Because that becomes fragile very quickly. Built-in plugins change, naming changes, and capability overlap is often ambiguous. This repo uses explicit policy instead.
Because identical is not the goal. Some clients already provide strong built-in plugins. The goal is a stable local platform, not artificial uniformity.
No. It is a local operating layer for AI coding clients on one machine.
This repo is not starting from a blank slate. Adjacent work already exists in a few categories:
- multi-client MCP setup guides
- shared
mcp.jsonand dotfiles repositories - MCP installers and host-specific bootstrap tools
- OS keyring and Keychain-based secret handling for AI tooling
What this repo focuses on is the local runtime layer across multiple AI coding clients on one machine.
In practice, that means combining:
- rules-driven client sync
- shared Markdown operating context
- MCP templates and wrappers
- Keychain-backed secret loading
into one coherent, portable setup.
This repo is intentionally opinionated and still early-stage. It is meant to be iterated as MCP support and local agent workflows mature.