Beta. MCP Connections are currently available to a limited set of customers during Beta. If you’d like to participate, reach out to your Mixpanel account team.
GitHub’s MCP server doesn’t support OAuth sign-in from Mixpanel, so you connect it with a GitHub personal access token (PAT). Mixpanel Agent can see whatever the token can see, and it only uses read tools.
Before you start, make sure an admin has enabled MCP Connections for your organization.
Create a Personal Access Token
GitHub offers two kinds of personal access tokens. Fine-grained tokens are recommended because you can limit them to specific repositories and read-only permissions. Use a classic token if your GitHub organization blocks fine-grained tokens.
- In GitHub, go to Settings → Developer settings → Personal access tokens → Fine-grained tokens and click Generate new token.
- Name the token (for example, “Mixpanel Agent”) and set an expiration.
- Under Resource owner, choose the account or organization that owns the repositories you want the Agent to read.
- Under Repository access, choose Only select repositories and pick the repositories, or choose All repositories.
- Under Repository permissions, set these to Read-only:
- Contents
- Issues
- Pull requests
- Metadata (set automatically)
- Click Generate token and copy it.
If the resource owner is an organization, an organization owner may need to approve the token before it can access the organization’s repositories.See GitHub’s guide to creating a fine-grained personal access token.
- In GitHub, go to Settings → Developer settings → Personal access tokens → Tokens (classic) and click Generate new token (classic).
- Name the token (for example, “Mixpanel Agent”) and set an expiration.
- Select these scopes:
- repo, for access to private repositories
- read:org, for organization and team information
- Click Generate token and copy it.
- If your organization uses SAML single sign-on, click Configure SSO next to the token and authorize it for that organization.
Classic tokens with the repo scope can write to repositories in GitHub. Mixpanel only exposes read tools to the Agent, but a fine-grained read-only token limits access at the source.See GitHub’s guide to creating a personal access token (classic).
Add the Connection in Mixpanel
- Go to Settings → Personal Settings → MCP Connections.
- Click Add Connection and choose GitHub.
- Paste your token into the Authentication Token field and click Connect.
Mixpanel checks the token with GitHub before saving it. If you see “Invalid token provided”, confirm that you copied the whole token, that it hasn’t expired, and that any required organization approval or SSO authorization is complete.
Troubleshooting
GitHub shows as Disconnected
The token has expired or been revoked. Create a new token, delete the GitHub connection in Mixpanel, and add it again with the new token.
The Agent can’t find a repository
The token doesn’t have access to that repository. For a fine-grained token, add the repository under Repository access. For a classic token, check that it has the repo scope and is authorized for SSO in the repository’s organization.