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

  1. Install uv using their installation instructions.

  2. Ensure that you have Python 3.13+ installed.

  3. Clone this repository.

  4. Install Semgrep (additional methods):

    pip install semgrep
    

Docker

  1. Install docker using their installation instructions.
  2. Clone this repository.
  3. Run semgrep login to get a Semgrep API token if you have not already. Check in ~/.semgrep/settings.yml.
  4. 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

  1. Bump the version:

    # takes one argument {patch, minor, major} with 'minor' as the default argument
    uv run python ./scripts/bump_version.py 
    
  2. Verify the release diff looks correct, and add changelog notes.

  3. Merge the release in to main.

  4. Tag the release with git tag -a vX.Y.Z -m "vX.Y.Z".

  5. Verify the builds are green.

  6. Push the tag:

    git push origin vX.Y.Z
    
  7. Manually approve the publish.yaml workflow.

  8. Verify the release looks good on PyPI.