sourcegraph-react-prop-mcp
0
The Sourcegraph MCP Server is a Model Context Protocol server that integrates with Sourcegraph to enhance LLMs' code search and analysis capabilities. It provides several tools for testing connections, searching code, and retrieving file contents from Sourcegraph.
Sourcegraph MCP Server
An MCP (Model Context Protocol) server that integrates with Sourcegraph to provide code search and analysis capabilities to LLMs.
Sourcegraph Access Token
- Generate an API access token via your Sourcegraph settings and set it as
SRC_ACCESS_TOKEN
environment variable.
Environment Variables
SRC_ACCESS_TOKEN
: Sourcegraph access token.SRC_ENDPOINT
(optional): Sourcegraph instance URL (default is https://sourcegraph.com).
Installation
1. Build the server from Typescript
- Run
yarn run build
.
2. Configure MCP Server
- Configure with tools like Cursor or Claude Desktop.
Install script
- An optional
install_cursor.sh
script is available for easy setup with environment variables.
3. Verify Installation
- Validate the setup using
testSourcegraphConnection
tool.
Available Tools
- Test Sourcegraph connection with
testSourcegraphConnection
. - Search code with
search
tool. - Retrieve file content via
getFileContent
. - Search for React prop usage with
searchReactPropUsage
.