sourcegraph
Use Sourcegraph's official MCP server from Gemini CLI (search, navigation, file read)
Open source Open in the app JSON README (API)
About
Use Sourcegraph's official MCP server from Gemini CLI (search, navigation, file read)
Details
- Kind
- Plugins
- Topic
- Developer tools
- Publisher
- sourcegraph-community
- Origin
- gemini
- Category
- ferramentas
- Version
- 0.1.0
- Stars
- 1
- Last push
- 2026-02-26T19:35:29Z
- Repository state
- ativo
- Added
- 2026-08-30 14:13:39
- Updated
- 2026-08-30 14:13:39
- Origin id
sourcegraph-community/sourcegraph-gemini
README
# sourcegraph Gemini CLI extension for Sourcegraph — search, navigate, and understand any codebase without leaving your terminal. ## What is Sourcegraph? [Sourcegraph](https://sourcegraph.com) is a code intelligence platform that lets you search and navigate across all your repositories at scale. It understands code structure (definitions, references, symbols) and provides powerful search across your entire codebase — including open source and private code. This extension connects Gemini CLI to your Sourcegraph instance via the [official MCP server](https://sourcegraph.com/docs/api/mcp), giving Gemini's AI direct access to your code. ## Installation > **Sourcegraph.com users:** No installation needed — Sourcegraph's MCP endpoint is already available at your instance. > > **Enterprise users:** Connect to your own instance at [sourcegraph.com/enterprise](https://sourcegraph.com/enterprise). To install locally, run: ```bash gemini extensions install https://github.com/erclm/sourcegraph-gemini ``` Or link a local clone for development: ```bash gemini extensions link . ``` Then restart Gemini CLI. ## Configuration On install, Gemini CLI will prompt you for: - `SOURCEGRAPH_ENDPOINT` — your Sourcegraph instance URL (e.g. `https://sourcegraph.example.com`) - `SOURCEGRAPH_ACCESS_TOKEN` — a personal access token from your Sourcegraph account > Sourcegraph MCP is supported on Enterprise plans. If your instance supports OAuth dynamic client registration, you may not need a token. ## Features - **MCP tools** (available to the AI automatically): - `nls_search`, `keyword_search` — natural language and keyword search across repos - `read_file`, `list_files`, `list_repos` — explore repositories and files - `go_to_definition`, `find_references` — code navigation and symbol lookup - **Slash commands** (use directly in your prompt): - `/sg:search <query>` — run a Sourcegraph search - `/sg:file <repo> [rev] <path>` — open a specific file - **Bundled agent skill:** `searching-sourcegraph` ## Example Prompts Once installed, you can ask Gemini things like: ### Understand a codebase fast > "How does authentication work in `github.com/my-org/api`? Find the login flow and trace it through to token issuance." ### Cross-repo impact analysis > "Find all callers of `UserService.Delete` across my org's repos and tell me which ones don't handle the error." ### Onboard to an unfamiliar service > "I'm new to the `payments-service` repo. Walk me through the main request lifecycle and point me to the key files." ### Find real-world usage examples > "Show me examples of how `@sourcegraph/codeintellify` is used in open source projects." ### Audit and security review > "Search for any usage of `eval(` or `exec(` in the `backend` repo and summarize the risk."