# Claude Code

> Add Grovs to Claude Code so you can manage links and pull analytics from your terminal.

Source: https://docs.grovs.io/docs/ai/mcp/claude-code

Add the Grovs MCP server to [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and you can manage deep links, check analytics, and tweak project settings without leaving your terminal.

## Prerequisites

- Claude Code installed (`npm install -g @anthropic-ai/claude-code`)
- A Grovs account with at least one project

## Install the Grovs plugin

The Grovs plugin installs the MCP server together with skills that teach Claude Code how to use Grovs:

```
/plugin marketplace add grovs-io/mcp
/plugin install grovs@grovs
```

Run these inside Claude Code. On first use, a browser opens for OAuth. To add only the MCP server, follow the steps below instead.

## Setup

### 1. Add the MCP server

Run the following command in your terminal:

```bash
claude mcp add grovs --transport http https://mcp.grovs.io/mcp
```

### 2. Authorize access

The next time you start a Claude Code session, it will detect the new MCP server and initiate authorization:

1. A browser window opens automatically
2. Log in to your Grovs account if prompted
3. Review the permissions and click **Authorize**
4. Return to your terminal. Claude Code is now connected.

### 3. Start using Grovs

In any Claude Code session, you can now ask:

- _"List my Grovs projects"_
- _"Create a link for the onboarding flow with path /onboarding"_
- _"Show analytics for the past 7 days"_

> **Note:** Self-hosting Grovs? Use your own MCP server's URL; see [Self-hosted MCP](https://docs.grovs.io/docs/ai/mcp/self-hosted).

## Project-Scoped Configuration

To add Grovs only to a specific project, use the `--scope project` flag:

```bash
claude mcp add grovs --transport http --scope project https://mcp.grovs.io/mcp
```

This saves the server in a `.mcp.json` file at the project root, which you can commit so your team gets the same server.

## Managing the Connection

You can verify connected MCP servers with:

```bash
claude mcp list
```

To remove the Grovs server:

```bash
claude mcp remove grovs
```

You can also revoke access from the Grovs dashboard — see [Revoking access](https://docs.grovs.io/docs/ai/mcp/introduction#revoking-access).

## Troubleshooting

### MCP server not appearing

- Run `claude mcp list` to verify the server was added
- Make sure the URL is exactly `https://mcp.grovs.io/mcp`
- Ensure you are using `--transport http` (not `sse`) — the `/mcp` endpoint uses StreamableHTTP

### Authorization fails

- Check that your browser can reach `https://mcp.grovs.io`
- If using a corporate proxy, ensure `mcp.grovs.io` is allowlisted

### Re-authorize after revocation

If you revoked the connection from the dashboard, start a new Claude Code session and it will prompt you to re-authorize.
