> ## Documentation Index
> Fetch the complete documentation index at: https://docs.githits.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Automatic local MCP setup

> Use the GitHits hybrid CLI to automatically configure local MCP for supported AI coding tools.

Use automatic local MCP setup when your coding tool is supported by the GitHits hybrid CLI.

```bash theme={null}
npx githits@latest init
```

The CLI detects installed tools and writes the verified MCP configuration for each supported harness. Most tools use local stdio. Cursor uses the hosted remote MCP. Authentication is handled automatically for common local setup.

## Automatic install support

`npx githits@latest init` supports automatic install for Claude Code, Cursor, Windsurf, Claude Desktop, Codex CLI, Pi, VS Code / Copilot, Cline, Gemini CLI, Google Antigravity, OpenCode, Hermes Agent, Zed, Junie, Qwen Code, Kiro, Kilo Code, Factory Droid, and Amazon Q CLI.

Direct `githits init` installs a local stdio MCP server for every supported tool, with one exception: **Cursor is remote-only** even through direct init. Cursor entries use the hosted `https://mcp.githits.com` URL, and OAuth is completed inside Cursor. See [Manual remote MCP setup](/installation/manual-setup) for a full remote setup walkthrough.

## What gets configured

For local stdio tools, GitHits adds a local MCP server entry that starts the CLI on demand:

```json theme={null}
{
  "mcpServers": {
    "githits": {
      "command": "npx",
      "args": ["-y", "githits@latest", "mcp", "start"]
    }
  }
}
```

Your agent can then call GitHits tools when it needs indexed source, package documentation, dependency metadata, vulnerability data, changelogs, or implementation examples. If it does not choose the tools on its own, use the prompts in [Trigger GitHits manually](/guides/trigger-githits).

Plain MCP clients call [`quick_start`](/tools/quick-start) once per session to load shared routing and safety guidance. Guided setup installs the current `githits-mcp` skill with the stable guide already embedded, so agents that load the skill normally skip that call.

## Marketplace, plugin, and extension installs

If you install GitHits through a host's plugin, extension, or marketplace surface instead of running `githits init`, you get the hosted remote MCP with host-managed OAuth. This applies to:

* Claude Code plugin and the first-party Claude marketplace entry
* Cursor plugin
* Codex plugin
* Gemini CLI extension
* Google Antigravity plugin
* Generic OpenPlugin and VS Code / GitHub Copilot OpenPlugin installs

Every plugin and extension surface connects to `https://mcp.githits.com` through its host's native remote MCP field and delegates authentication to that host's OAuth flow. You do not need a separate GitHits login for these installs — sign in when the host prompts you.

These connections do not install GitHits skills. Guided `npx githits@latest init` installs the four skills described below.

Use a marketplace or plugin install when you want the host to manage MCP lifecycle and auth for you. Use `githits init` when you want a local stdio server for the tools that support it.

## Guided MCP setup (default)

Interactive `githits init` defaults to the recommended **Install GitHits MCP + supporting instructions** path. In addition to the MCP server entry above, guided setup installs a small amount of supporting context so agents know when to reach for GitHits:

* **GitHits skills** — the four packaged skills (`githits-onboarding`, `githits-mcp`, `githits-code`, and `githits-package`). The `githits-mcp` skill embeds the stable quick-start guide. The CLI-backed code and package skills provide a fallback when MCP tools are unavailable. They are copied only for the agents you select: tools that load shared Agent Skills use `~/.agents/skills/` at user scope or `.agents/skills/` at project scope, and tools with a native-only skill directory (for example `.claude/skills/`) use that directory. Rerunning guided setup repairs missing or stale skill files.
* **Managed instruction block** — a single short paragraph inserted between `<!-- githits -->` markers in the appropriate instruction file for your tool (for example `AGENTS.md`, `CLAUDE.md`, or `GEMINI.md`). Reruns replace only the content between the markers, so it stays idempotent and easy to remove.

### Install review

Before authentication or any config writes, interactive `githits init` prints a numbered review that lists the selected scope, tools, and guidance choice, then discloses what leaves your machine:

* GitHits queries and public package, repository, and documentation targets are sent to GitHits services.
* Installation itself does not upload the local workspace.
* A new coding-agent session is needed to load the changed MCP configuration or supporting instructions. The terminal and machine do not need to be restarted.

The step ends with a **Continue with GitHits setup?** confirmation. Declining or interrupting exits before authentication, config writes, guidance writes, or setup commands run. Interactive `--yes` prints the same review and treats it as acknowledgment without another prompt. Agent-assisted staged setup shows the review before asking which detected tools to configure.

### Opting out of guidance

Both additions are opt-out. Use `--no-guidance` to install the plain MCP server only, or pick **Install plain GitHits MCP** at the interactive prompt:

```bash theme={null}
npx githits@latest init --no-guidance
```

`--no-guidance` is preserved through the install and verification commands that guided setup generates for staged, non-interactive, and agent-assisted flows, so a plain-MCP run never re-offers or reinstalls guidance on rerun.

To keep the guidance files when removing GitHits:

```bash theme={null}
npx githits@latest uninstall --keep-guidance
```

If you prefer a skills-only setup with no MCP server, choose **Install Agent Skills instead** — see [Skills](/installation/skills).

## Want remote MCP instead?

If you want to connect GitHits as a hosted remote MCP server, use [Manual remote MCP setup](/installation/manual-setup). Remote MCP works with any MCP-capable client that supports remote servers, not just coding agents.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.