AgentRoot
Navigate

// install_gemini

Using AgentRoot with Gemini CLI

Search the AgentRoot registry and install MCP servers and skills into Gemini CLI. Gemini supports the cross-tool .agents/skills/ standard, making project-scoped skills portable across compatible tools.

// what_you_need

  • Gemini CLI installed (npm i -g @anthropic-ai/gemini-cli)
  • Node.js 18+
  • A project directory (for project-scoped installs)

1Search the registry

# Search for MCP servers $ npx agent-root search "git" --type mcp gitops.tools/git-mcp mcp Git MCP Server transport: stdio | tools: status, diff, log, commit, branch # Search for skills $ npx agent-root search "deployment" --type skill shipfast.dev/deploy-patterns skill Deployment Patterns skills: docker-deploy, k8s-rollout, ci-pipeline

2Install a record

Use the --tool gemini flag to install into Gemini CLI:

Installing an MCP server:

$ npx -p @agent-root/cli agent-root install gitops.tools/git-mcp --tool gemini # The CLI prints the JSON snippet to add to Gemini's MCP config: { "mcpServers": { "git-mcp": { "command": "npx", "args": ["@gitops/git-mcp"] } } }

Install never mutates Gemini's settings file automatically. Paste the snippet into the file Gemini reads at startup, then restart the CLI.

Installing skills:

$ npx -p @agent-root/cli agent-root install shipfast.dev/deploy-patterns --tool gemini # Writes skill files into Gemini's global skills dir: # ~/.gemini/skills/shipfast.dev/deploy-patterns/SKILL.md # (plus any referenced supporting files)

3Verify it works

Restart Gemini CLI and test that the MCP tools are available:

$ gemini # In the Gemini session, try using the installed tools # "Show me the git status using git-mcp"

For skills, Gemini loads them when your prompts match the trigger keywords defined in each skill's frontmatter.

4Project-scoped vs global installs

# Global install (default) — available everywhere $ npx -p @agent-root/cli agent-root install shipfast.dev/deploy-patterns --tool gemini # Installs to: ~/.gemini/skills/ # Project-scoped — available in this project only $ npx -p @agent-root/cli agent-root install shipfast.dev/deploy-patterns --tool gemini --project # Installs to: .agents/skills/
The .agents/skills/ directory is a cross-tool standard. Skills installed here by any compatible tool (Codex CLI, Gemini CLI) are available to all of them. This means you can install a skill once at the project level and have it work across multiple AI coding assistants.

The cross-tool compatibility matrix for project-scoped skills:

  • Claude Code reads from .claude/skills/
  • Cursor reads from .cursor/skills/
  • Codex CLI reads from .agents/skills/
  • Gemini CLI reads from .agents/skills/

Codex CLI and Gemini CLI share the .agents/skills/ directory, so a project-scoped skill installed for one works for the other automatically.

// troubleshooting

  • MCP server not loading: The CLI prints the JSON block but does not write it. Paste it into the file Gemini reads at startup, then restart the CLI.
  • Skills not triggering: Check that files exist in ~/.gemini/skills/<domain>/<record-id>/ (global) or .agents/skills/<domain>/<record-id>/ (project). Ensure your prompts contain keywords that match the skill triggers in the SKILL.md frontmatter.
  • Cross-tool skills missing: If a skill was installed with --tool codex --project, it lives at .agents/skills/ and is available to Gemini in the same project. Verify the directory exists.
  • Outdated records: Run agent-root update <domain>/<record-id> to re-fetch from the publisher.

// next_steps