Guide
Client Setup & Hooks
Connect Strata to Antigravity, Claude Code, Codex, OpenCode, or any MCP client, and configure post-write index sync hooks.
You can set up Strata automatically with strata init --harness <name> or add it manually to your MCP client's JSON/TOML configuration.
Automatic Setup by Client
strata init --harness antigravity # Google Antigravity (.agents/)
strata init --harness claude # Claude Code (.claude/ + .mcp.json)
strata init --harness codex # OpenAI Codex CLI (.codex/)
strata init --harness opencode # OpenCode (opencode.json + .opencode/plugin/)
strata init --harness agents # Universal agent harness (.agents/)
What Each Harness Generates
- Antigravity &
.agents: Creates.agents/hooks.json,.agents/hooks/strata-post-write.sh,.agents/rules/strata-frontend.md,.agents/skills/use-strata/SKILL.md, and.agents/mcp.json. Because Antigravity loads MCP servers globally,strata initalso prints the exact snippet to add to~/.gemini/antigravity/mcp_config.json. - Claude Code: Updates
.claude/settings.jsonwith aPostToolUsehook, writes.claude/hooks/strata-post-write.sh, and adds Strata to.mcp.json. - OpenAI Codex CLI: Updates
.codex/hooks.json, writes.codex/hooks/strata-post-write.sh, and configures[mcp_servers.strata]in.codex/config.toml. - OpenCode: Updates
opencode.json(mcp.strata) and installs.opencode/plugin/strata-autosync.ts.
Existing user hooks and malformed config files are left untouched during initialization.
Manual MCP Configuration
Add Strata to any standard MCP client config:
{
"mcpServers": {
"strata": {
"command": "strata",
"args": ["serve"]
}
}
}
How Post-Write Hooks Work
When an AI agent edits a frontend file, strata-post-write.sh checks whether the file extension is indexed and triggers a background strata sync using a lockfile (.strata/sync.lock) so rapid bursts of edits coalesce cleanly.
- Hook failures are non-blocking — they never stop the agent from finishing an edit.
- Hook activity is written to
.strata/hook.log(neverstdout, so it will not corrupt client JSON output). - Even without hooks, Strata automatically checks for file changes before running indexed queries.