# GitHub Analytics MCP server

> Analyze GitHub repository statistics, search for repositories, examine language breakdowns, and compare different projects.

- Repository: https://github.com/TheNextGenNexus/ai-analytics-mcp-servers
- Page: https://hostedmcp.org/servers/thenextgennexus/github-analytics-mcp-server
- Transport: stdio
- Stars: 1
- Latest version: 1.0.1

## Install

### Claude Code

```sh
claude mcp add --env 'APIFY_TOKEN=<YOUR_APIFY_TOKEN>' github-analytics-mcp-server -- npx -y @thenextgennexus/github-analytics-mcp-server
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "github-analytics-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@thenextgennexus/github-analytics-mcp-server"
      ],
      "env": {
        "APIFY_TOKEN": "<YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "github-analytics-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@thenextgennexus/github-analytics-mcp-server"
      ],
      "env": {
        "APIFY_TOKEN": "<YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"github-analytics-mcp-server","type":"stdio","command":"npx","args":["-y","@thenextgennexus/github-analytics-mcp-server"],"env":{"APIFY_TOKEN":"<YOUR_APIFY_TOKEN>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "github-analytics-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@thenextgennexus/github-analytics-mcp-server"
      ],
      "env": {
        "APIFY_TOKEN": "<YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add github-analytics-mcp-server --env 'APIFY_TOKEN=<YOUR_APIFY_TOKEN>' -- npx -y @thenextgennexus/github-analytics-mcp-server
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.github-analytics-mcp-server]
command = "npx"
args = ["-y", "@thenextgennexus/github-analytics-mcp-server"]

[mcp_servers.github-analytics-mcp-server.env]
APIFY_TOKEN = "<YOUR_APIFY_TOKEN>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'APIFY_TOKEN=<YOUR_APIFY_TOKEN>' github-analytics-mcp-server npx -- -y @thenextgennexus/github-analytics-mcp-server
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "github-analytics-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@thenextgennexus/github-analytics-mcp-server"
      ],
      "env": {
        "APIFY_TOKEN": "<YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `APIFY_TOKEN` | yes | yes | Your Apify API token for accessing web scraping actors |

## Tools (4)

- `get_repo_stats`
- `search_repos`
- `get_repo_languages`
- `compare_repos`

## FAQ

### How do I run the server using npx?

You can run the server by executing the command `npx @nexgendata/github-analytics-mcp-server`.

### Is an API token required to use this server?

No, the API token is optional. If you do not provide one, the server uses a public endpoint which is subject to rate limits.
