GitHits MCP Server
OfficialAllows accessing GitHub repository content, including code files, search, grep, and reading specific files without cloning.
Allows searching, reading, and inspecting npm packages, including metadata, source code, documentation, dependencies, vulnerabilities, changelogs, and upgrade reviews.
Allows searching, reading, and inspecting NuGet packages, including metadata, source code, documentation, dependencies, and vulnerabilities.
Allows searching, reading, and inspecting Packagist packages, including metadata, source code, documentation, dependencies, and vulnerabilities.
Allows searching, reading, and inspecting PyPI packages, including metadata, source code, documentation, dependencies, and vulnerabilities.
Allows searching, reading, and inspecting RubyGems packages, including metadata, source code, documentation, dependencies, and vulnerabilities.
Allows searching, reading, and inspecting Swift packages, including metadata, source code, documentation, dependencies, and vulnerabilities.
Allows searching, reading, and inspecting Zig packages, including metadata, source code, documentation, dependencies, and vulnerabilities. Note: vulnerability data is unavailable.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GitHits MCP Serverfind examples of HTTP retries with exponential backoff in Python"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GitHits connects AI coding agents to public open-source evidence across the full software development lifecycle: discovery, planning, research, implementation, debugging, and maintenance.
The CLI runs a local MCP server that your coding tool starts on demand. Agents can then search indexed package and repository source, read exact files and documentation pages, inspect package health, compare dependency upgrades, and find source-cited examples from real open-source projects when model knowledge and local repository context are not enough.
Quick Start
npx githits@latest initinit signs you in, detects supported coding tools, and configures the local
GitHits MCP server for the tools you select.
Automatic setup currently supports Claude Code, Cursor, Windsurf, VS Code / Copilot, Cline, Claude Desktop, Codex CLI, Pi, Gemini CLI, Google Antigravity, OpenCode, Hermes Agent, Zed, Junie, Qwen Code, Kiro, Kilo Code, Factory Droid, and Amazon Q CLI.
After setup, open your coding agent and work normally. Many agents call GitHits when they need source-backed context. If your agent starts guessing, prompt it directly:
Use GitHits Code Navigation to inspect npm:express. Find how middleware
errors are handled, read the relevant source, and explain the fix before
editing code.Related MCP server: docs-mcp
What GitHits Adds
GitHits is designed for the point where an agent needs evidence from the broader open-source ecosystem, not just model memory or local repo context:
Capability | MCP tools | CLI commands |
Code examples |
|
|
Code navigation |
|
|
Documentation access |
|
|
Package inspection |
|
|
Feedback |
|
|
Use GitHits when your agent needs to:
discover, plan, or research how OSS projects solve a vague issue or unfamiliar error
find broad prior art or rare needle-in-the-haystack examples across repositories
inspect source, tests, symbols, or docs for a known package or repository
verify how a dependency actually behaves before changing code
debug stack traces that point into third-party code
review package health, licenses, vulnerabilities, dependencies, and changelogs
compare dependency upgrades using factual evidence
Examples
Find prior art across open source:
npx githits@latest example "HTTP retries with exponential backoff in Python"Search indexed code, docs, and symbols for a dependency:
npx githits@latest search "router middleware" --in npm:express
npx githits@latest search '"body parser" OR multer' --in npm:express --source docs
npx githits@latest search "debounce" --in npm:lodash --source symbolRead and grep dependency source without cloning:
npx githits@latest code files npm:express lib
npx githits@latest code read npm:express lib/router/index.js --lines 120-200
npx githits@latest code grep npm:express "router.use" lib --regexInspect package health and upgrade evidence:
npx githits@latest pkg info npm:express
npx githits@latest pkg vulns npm:lodash@4.17.20 --severity high
npx githits@latest pkg deps npm:express@4.18.2 --depth 2
npx githits@latest pkg changelog npm:express --from 4.18.2 --to 5.2.1
npx githits@latest pkg upgrade-review npm:zod@4.3.6 --to 4.4.3Browse and read package documentation:
npx githits@latest docs list npm:express
npx githits@latest docs read <page-id> --lines 20-80Supported Sources
GitHits works with package and repository targets such as:
package specs:
npm:react,npm:react@18.2.0,pypi:requests,crates:serdeGitHub repos:
https://github.com/expressjs/express,github:expressjs/express#main
Package inspection supports npm, PyPI, Hex, Crates, NuGet, Maven, Packagist, RubyGems, Go, Swift, vcpkg, and Zig. Advisory data is unavailable for vcpkg and Zig; dependency graph support varies by registry.
License Filtering
Code example search supports license filtering:
strictis the default and filters repositories with copyleft or undeclared licensescustomuses your account blocklist configured at githits.comyolodisables license filtering
npx githits@latest example "async file reading" --lang python --license strictAuthentication
Normal local setup is handled by:
npx githits@latest initFor manual login:
npx githits@latest loginBrowser OAuth is recommended for local development. Credentials are stored in the system keychain by default and refreshed automatically. Useful flags:
init --no-browserorlogin --no-browserprints the login URL instead of launching a browserinit --port <port>orlogin --port <port>fixes the loopback callback portlogin --forcere-authenticates even if you are already logged in
The OAuth callback always listens on the machine where GitHits is running. When GitHits runs over SSH and the browser runs locally, forward the selected port from the browser machine:
ssh -N -L 8765:127.0.0.1:8765 user@remote-hostWith that tunnel open, run GitHits on the remote machine using the same port:
npx githits@latest init --no-browser --port 8765Open the URL printed by GitHits in the local browser. Replace
user@remote-host with the SSH destination you normally use. The same flags
work with githits login after setup.
Browser OAuth is interactive. For CI and other unattended environments, supply
GITHITS_API_TOKEN through the environment's secret manager.
Inspect auth and runtime state with:
npx githits@latest auth status
npx githits@latest doctorSee the authentication docs for keychain behavior, file storage mode, CI setup, and troubleshooting.
Manual MCP Setup
If your coding tool is not auto-configured by init, add GitHits to its MCP
configuration manually:
{
"mcpServers": {
"githits": {
"command": "npx",
"args": ["-y", "githits@latest", "mcp", "start"]
}
}
}Your tool runs this command over stdio. No background daemon or global install is required.
To remove configuration written by init:
npx githits@latest init uninstallThis removes GitHits MCP configuration and preserves stored credentials. Run
npx githits@latest logout separately to remove credentials.
Project Setup
For project-local MCP config, run:
npx githits@latest init --projectProject setup is available only for tools with verified project-local MCP support. Project config contains no secrets, but it may be committed like other tooling configuration, so review generated files before adding them to source control.
Agent-safe non-interactive setup uses staged discovery and explicit install:
npx githits@latest init --detect-agents --json
npx githits@latest init --install-agents cursor,codexPlugin and Extension Packaging
The npm package also includes the existing plugin and extension assets used by compatible hosts:
.plugin/plugin.json.claude-plugin/plugin.json.claude-plugin/marketplace.json.mcp.jsongemini-extension.jsonGEMINI.mdplugins/claude/skills/commands/
For Claude Code marketplace installs:
claude plugin marketplace add githits-com/githits-cli
claude plugin install githits@githits-pluginsFor Gemini CLI extension installs:
gemini extensions install https://github.com/githits-com/githits-cliCommand Reference
githits init Connect GitHits to your coding agents
githits init uninstall Remove GitHits MCP configuration
githits login Sign in to your GitHits account
githits logout Remove stored credentials
githits mcp Show setup instructions or start the local MCP server
githits mcp start Always start the local MCP server over stdio
githits example Find real-world implementations from open source
githits languages List or filter supported programming languages
githits feedback Submit feedback about GitHits results
githits doctor Diagnose configuration and auth state
githits search Explore repository code, dependencies, docs, and symbols
githits search-status Check the status of a previous indexed search
githits code List, read, and grep indexed dependency source
githits pkg Inspect package metadata, vulnerabilities, deps, and changelogs
githits docs Browse and read package documentation
githits auth Manage authentication
githits auth status Show authentication statusFull CLI reference: https://docs.githits.com/cli/commands
Environment Variables
Most users do not need environment variables. These are the common overrides for CI, auth storage, and local diagnostics:
Variable | Purpose | Default |
| API token for authentication | unset |
| Override OAuth storage mode: |
|
| Disable npm latest-version update notices | unset |
| Emit local timing diagnostics to stderr | unset |
Full reference: https://docs.githits.com/cli/environment-variables
Source Layout
This repository contains the GitHits CLI and reusable MCP package:
src/- CLI commands, local auth, setup flows, and local MCP stdio startuppackages/mcp/- public@githits/mcppackage for transport-neutral MCP server APIs, tool registration, instructions, and smoke-test helperspackages/core-internal/- shared workspace implementation used by the CLI and MCP packagedocs/- implementation notes and contributor guidelinesscripts/- package validation, smoke tests, and development utilities
Development
Requirements:
Node.js
^20.18.1 || >=22.13.0Bun
Common commands:
bun install
bun run dev --help
bun test
bun run typecheck
bun run buildWhen changing MCP tools, CLI commands, shared formatters, auth/error envelopes, or MCP/CLI parity behavior, also run the relevant smoke suites:
bun run smoke:mcp
bun run smoke:cliCI also checks the built product without credentials or live backend calls. Run
the same checks locally after bun run build:
bun run smoke:cli:built
bun run smoke:mcp:builtThe harness remains on Bun, while product subprocesses execute dist/cli.js
with node from PATH. CI provisions that runtime from .node-version.
When changing MCP instructions, tool descriptions, or agent-facing behavior,
use the targeted agent evals described in eval/agentic/README.md:
bun run agent:e2eLicense
Apache-2.0
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityBmaintenanceA local MCP server that provides AI coding assistants with semantic search capabilities over codebases. It indexes code using local embeddings and exposes tools for efficient code retrieval, saving tokens and improving response quality.Last updated314MIT
- Alicense-qualityAmaintenanceProvides a local MCP server for searching and retrieving documentation from 22+ open-source projects, enabling AI coding assistants to access up-to-date docs without network dependency.Last updated302MIT
- AlicenseAqualityBmaintenanceEnables searching and retrieving documentation from crawled documentation sites as an MCP server, allowing coding agents to query real docs instead of relying on training data.Last updated4MIT
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Local-first RAG engine with MCP server for AI agent integration.
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/githits-com/githits-cli'
If you have feedback or need assistance with the MCP directory API, please join our Discord server