Setup
GitHits Remote MCP works with any tool that supports the latest version of the Model Context Protocol. Below are instructions for setting up GitHits MCP with your AI coding tool or IDE.
OAuth 2.1 with Dynamic Client Registration (Alpha)
The easiest and most secure way to connect to GitHits MCP is using OAuth 2.1 with Dynamic Client Registration (DCR). This method doesn't require managing API tokens - simply authenticate with your GitHits account via the approval flow that is built into your IDE or coding tool.
The OAuth 2.1 with DCR method is currently in alpha and supported by a growing number of tools. If you encounter issues, please refer to the API Token Authentication section below as a reliable alternative.
What You Need
You need only your AI IDE or CLI, and the GitHits MCP server URL and a config file or CLI command to add the server to your tool. The remote MCP server URL is:
https://mcp.githits.com/
Please note that not all IDEs and coding tools support OAuth 2.1 with DCR yet. Check your tool's documentation for MCP support and configuration details. Below, we provide setup instructions for some popular tools that support OAuth 2.1 with DCR.
VS Code / Copilot
Add the following to .vscode/mcp.json in your project:
VS Code will automatically handle the OAuth authentication flow via your browser.
Claude Code
Add via the CLI:
Claude Code will automatically handle the OAuth authentication flow.
Codex
Run the following command to enable the GitHits MCP client with OAuth support:
Revoking OAuth Access
To revoke access a tool has to GitHits, you can do so from your GitHits account settings:
- Go to app.githits.com and log in.
- Click on your profile icon in the top-right corner and select "Settings".
- Navigate to the "Authorized Applications" section.
- Find the application you want to revoke access for and click "Revoke Access".
API Token Authentication
For tools that don't yet support OAuth 2.1, you can use API token authentication.
What You Need
Before you begin, you'll need:
- GitHits Account: Sign up at app.githits.com
- API Token: Generate one from Profile Icon → Settings → MCP Tokens
- IDE or Coding Tool: Copy the provided configuration into your tool along with your API token - see examples below.
Your API token is free and gives you access to search across millions of code examples. Keep it secure!
Example Setups
This is not an exhaustive list, but here are some popular tools with setup instructions.
Please refer to your IDE / coding tool documentation for MCP support and configuration details. The setup generally involves adding a configuration file or specifying the MCP server URL and your API token.
VS Code / Copilot
VS Code now supports OAuth 2.1 with DCR. We recommend using the setup above instead, which doesn't require managing API tokens.
Copy the mcp.json file to .vscode/mcp.json in your project. VS Code will automatically pick it up and ask for your token during first connection.
Cline
Cline has built-in support for MCP, but you'll need to add the GitHits MCP configuration manually and modify it a bit.
Cursor
Add the GitHits MCP configuration to your Cursor .cursor/mcp.json:
Windsurf
Add the GitHits MCP configuration to your Windsurf mcp_config.json:
Claude Code
Add via the CLI:
Codex
Add the following configuration to your ~/.codex/config.toml file:
Get your token from GitHits and set it as an environment variable before running Codex:
Deleting tokens / Revoking Access
To delete or revoke an API token, go to your GitHits account settings:
- Go to app.githits.com and log in.
- Click on your profile icon in the top-right corner and select "Settings".
- Navigate to the "MCP Tokens" section.
- Find the token you want to delete and click "deactivate" or "delete" icon.
Troubleshooting: Using mcp-remote (e.g. for Google Antigravity, Zed etc.)
If your IDE doesn't support remote MCP servers natively, has issues with streamable HTTP transport, or you're experiencing connection problems, you can use the mcp-remote package as a workaround. This package acts as a local proxy that bridges your IDE to remote MCP servers.
When to Use This
- Your IDE only supports local/stdio MCP servers
- You're experiencing issues with native HTTP MCP support
- OAuth flow isn't working correctly in your tool
- You need a more reliable connection method
Setup
Add a stdio-based MCP server configuration to your IDE's MCP settings. The exact file location and format depends on your tool.
For tools using mcpServers (Cursor, Cline, Claude Desktop, etc.):
For VS Code / Copilot (uses servers):
This will:
- Use
npxto run themcp-remotepackage (installing it automatically if needed) - Create a local stdio-based MCP server that proxies requests to GitHits
- Handle the OAuth authentication flow through your browser
The mcp-remote approach works with virtually any IDE that supports stdio-based MCP servers, making it a reliable fallback option.