Contributing
September 5, 2025 ยท View on GitHub
Your contributions to this project are most welcome! Please see the "good first issue" label for easy tasks and join the #mcp community Slack channel for help.
Setup
CLI environment
-
Install
uvusing their installation instructions. -
Ensure that you have Python 3.13+ installed.
-
Clone this repository.
-
Install Semgrep (additional methods):
pip install semgrep
Docker
- Install
dockerusing their installation instructions. - Clone this repository.
- Run
semgrep loginto get a Semgrep API token if you have not already. Check in~/.semgrep/settings.yml. - Build the server:
make docker
Run the MCP server
CLI Environment
STDIO Mode
uv run mcp run ./src/semgrep_mcp/server.py -t stdio
SSE Mode
uv run mcp run ./src/semgrep_mcp/server.py -t sse
See the official Python MCP SDK for more details and configuration options.
Run as a script:
chmod +x ./src/semgrep_mcp/server.py
./src/semgrep_mcp/server.py --help
Docker
STDIO Mode
docker run -i --rm semgrep-mcp -t stdio
SSE Mode
docker run -p 8000:8000 semgrep-mcp
Run the development server
Start the MCP server in development mode:
uv run mcp dev ./src/semgrep_mcp/server.py
By default, the MCP server runs on http://localhost:8000 with the inspector server on http://localhost:6274.
Note: When opening the inspector server, add query parameters to the URL to increase the default timeout of the server from 10 seconds.
http://localhost:6274/?timeout=300000
Release
-
Bump the version:
# takes one argument {patch, minor, major} with 'minor' as the default argument uv run python ./scripts/bump_version.py -
Verify the release diff looks correct, and add changelog notes.
-
Merge the release in to
main. -
Tag the release with
git tag -a vX.Y.Z -m "vX.Y.Z". -
Verify the builds are green.
-
Push the tag:
git push origin vX.Y.Z -
Manually approve the
publish.yamlworkflow. -
Verify the release looks good on PyPI.