Connect Semgrep to Claude Code

Read code, supply-chain and secrets findings from the Semgrep AppSec Platform, triage them, and manage projects. Add Toolspoke to Claude Code once and it can use 13 Semgrep actions. Your Semgrep credential stays in Toolspoke, and you choose which actions Claude Code may call.

Set it up in Claude Code

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Claude Code

    Run it in your project, then /mcp to sign in

    claude mcp add --transport http toolspoke https://toolspoke.com/mcp

    The sign-in opens in your browser, and Toolspoke asks you to approve it.

  2. Install Semgrep and connect it

    Add Semgrep to a project in your Toolspoke workspace.

    API token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

    API token
    Semgrep AppSec Platform → Settings → Tokens → API tokens → Create new token, and tick Web API. A token without Web API access is refused by every call here.
  3. Choose what Claude Code may do

    All 13 actions start on. Switch off any of the 4 actions that change something in Semgrep, and Claude Code gets a refusal if it tries.

What you can ask Claude Code for

A few of the Semgrep actions that only read, so they are safe to try first.

  • Return the deployment (organization) this token can reach, with its slug and numeric id
  • List the projects (repositories) that have been scanned or onboarded to Managed Scans, 100 per page by default
  • Read one project's details, its URL, tags, latest scan and Managed Scans state
  • List Semgrep Secrets findings, leaked credentials found in code, with their validation state

What Claude Code can do in Semgrep

9 actions read, 3 write and one deletes or permanently changes something.

Reads

  • List deployments

    Return the deployment (organization) this token can reach, with its slug and numeric id. Every other call needs one of the two, and a token without Web API access fails here, which is why an install tests itself with it.

  • List projects

    List the projects (repositories) that have been scanned or onboarded to Managed Scans, 100 per page by default. Archived repositories are left out.

  • Get project

    Read one project's details, its URL, tags, latest scan and Managed Scans state.

  • List findings

    List code (sast), supply-chain (sca) or AI-detected (ai_sast) findings, 100 per page, filtered by repository, status, severity, branch, rule or triage reason. Each finding carries its rule, location, severity, status and triage history; its id is what triage_findings takes.

  • List secrets

    List Semgrep Secrets findings, leaked credentials found in code, with their validation state. The response names where each secret was found and whether Semgrep could confirm it is live, not the secret's value; it is still kept out of the audit log.

  • Search scans

    List scans from the past 30 days, optionally for one repository or branch. Use it to answer "did the last scan run" and to get a scan id for get_scan.

  • Get scan

    Read one scan with its repository, commit, branch, status and timing.

  • List policies

    List the deployment's policies, the rule sets and modes (monitor, comment, block) that decide what a scan reports.

  • List dependencies

    List the open-source dependencies Semgrep Supply Chain found across the deployment's repositories, paged by cursor.

Writes

  • Triage findings

    Set the triage state of findings by id: ignored, reviewing, fixing, reopened or provisionally_ignored, with a reason and a note. A write rather than destructive because every state can be reopened. Ignoring a finding hides it from every PR comment and block, so do it only when asked.

  • Add project tags

    Add tags to a project. Tags that do not exist yet are created. Tags are what policies and finding filters group projects by.

  • Remove project tags

    Remove tags from one project. The tags themselves stay on the deployment and can be added back with add_project_tags.

Deletes or permanently changes

  • Delete project

    Delete a project and every finding recorded against it. There is no undo, the findings history and its triage notes are gone, and a later scan starts the project from nothing.

Semgrep in Claude Code: questions

Does Claude Code see my Semgrep credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Claude Code from changing things in Semgrep?

Yes. Each of the 13 actions can be switched off for a project. Turn off the 4 that change something and Claude Code can only read.

Will 13 actions crowd Claude Code's context?

No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Semgrep action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Can I add it once for every project?

Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.

What does it cost?

Tool calls are free on every plan, and a Semgrep call does not run in a sandbox, so it bills nothing.

Try Semgrep in Claude Code

Free to start, and tool calls cost nothing on any plan.