Gemini CLI extension for Sourcegraph (via Sourcegraph's official MCP server).
This extension is designed to connect to a Sourcegraph instance that exposes the MCP endpoint /.api/mcp.
Docs: https://sourcegraph.com/docs/api/mcp
- MCP tools:
nls_search,keyword_search: search.read_file,list_files,list_repos: explore repositories and files.go_to_definition,find_references: code navigation.
- Slash commands:
/sg:search <query>/sg:file <repo> [rev] <path>
- Bundled agent skill:
searching-sourcegraph
gemini extensions link .Then restart Gemini CLI.
This extension defines settings that Gemini CLI will prompt you for on install:
SOURCEGRAPH_ENDPOINT(e.g.https://sourcegraph.example.com)SOURCEGRAPH_ACCESS_TOKEN
Notes:
- Sourcegraph MCP is supported on Enterprise plans.
- If your instance supports OAuth dynamic client registration, you may not need a token.