GitHits — Claude Code MCP server: search open-source code
Hooks your agent up to public open-source: code, docs, examples, vulnerabilities and changelogs. Useful when the model is guessing and local repo context runs out.
claude mcp add --transport http githits https://mcp.githits.comWhat GitHits does
GitHits runs a local MCP server that your coding tool starts on demand. The agent gets indexed package and repository source, reads exact files and documentation pages, checks package health, compares dependency upgrades and pulls source-cited examples from real projects.
Quick start is npx githits@latest init. It signs you in, detects supported tools and configures GitHits for the ones you pick. Cursor's direct setup uses the hosted remote MCP; everything else goes through local stdio. After that, work normally — many agents call GitHits on their own when they need source-backed context. If yours starts guessing, prompt it directly.
There is a CLI too: githits example, githits search, githits read, githits grep, githits pkg .... githits code diff compares whole repositories unless you narrow it with an explicit path glob. A raw diff does not prove upgrade safety, so check the changelog and tests before you bump a dependency.
What it helps with
- find how an unfamiliar library is used in real code
- read dependency source without cloning the repo
- check vulnerabilities and changelog before an upgrade
- debug a stack trace that points into third-party code
- compare two package versions by actual changes
Example prompts for the agent
- Find prior art across open source for HTTP retries with exponential backoff in Python.
- Check npm:[email protected] for high-severity vulnerabilities.
How to install GitHits
1Platform CLI: remote server
claude mcp add --transport http githits https://mcp.githits.com2Platform CLI
claude mcp add githits -- npx -y githits1Platform CLI: remote server
codex mcp add githits --url https://mcp.githits.com2Platform CLI
codex mcp add githits -- npx -y githitsConfig file
{
"mcpServers": {
"githits": {
"url": "https://mcp.githits.com"
}
}
}{
"mcpServers": {
"githits": {
"command": "npx",
"args": [
"-y",
"githits"
]
}
}
}Config file
{
"servers": {
"githits": {
"type": "http",
"url": "https://mcp.githits.com"
}
}
}{
"servers": {
"githits": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"githits"
]
}
}
}1Platform CLI: remote server
gemini mcp add -t http githits https://mcp.githits.com2Platform CLI
gemini mcp add githits npx -y githitsStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about GitHits
How do I install GitHits in Claude Code?
Two ways. Remote: claude mcp add --transport http githits https://mcp.githits.com. Local: claude mcp add githits -- npx -y githits.
What does GitHits do?
It gives your agent access to public open-source: search across code, docs and symbols, file reads, package inspection, changelogs, vulnerabilities and version comparison.
Does GitHits work outside Claude?
Yes. Automatic setup covers Codex, Cursor, Copilot, Windsurf, Cline, Zed and others. Cursor's direct setup uses the hosted remote MCP.