This page covers the hosted MCP server for AppSec Platform. It’s separate from the local Semgrep MCP server that Semgrep Guardian runs with
semgrep mcp. For that server, see Semgrep Guardian overview.- Search and filter findings, triage them in bulk, and read finding history.
- Generate fixes, inspect failed scans, and start new scans.
- Look up projects, dependencies, and advisories.
- Test rules, manage policies, and open Jira or Linear tickets.
Prerequisites
- An AppSec Platform account in an organization on a Teams or Enterprise plan, including trials.
- An MCP client that supports remote servers over HTTP, such as Claude Code, Codex, Cursor, or VS Code.
Server URLs
Use the URL for your deployment type:
Replace
YOUR_TENANT with your single-tenant subdomain. The examples on this page use the multi-tenant MCP server URL.
If you open either URL in a browser, Semgrep shows a page with setup instructions.
Read-only URL
The read-only URL provides only the tools that read data, plus thediscover, semgrep_account, and semgrep_app_link tools. It doesn’t provide tools that make changes, such as triaging findings, generating fixes, applying policies, configuring rules, creating tickets, or starting scans and workflows. The semgrep_run_job tool isn’t available, and the discover tool suggests only read tools.
To connect to the read-only URL, follow the steps in Connect with OAuth or Connect with an API token, and replace /api/mcp with /api/mcp/read-only. If you also connect to the full MCP server URL, give each server a different name. For example, in Claude Code:
The read-only URL limits which tools your client sees and can call. It doesn’t limit your credentials: both URLs accept the same OAuth sign-in and API tokens. To also limit what the credential can do, connect with a Read-only API token. See Token scopes.
How authentication works
The hosted MCP server uses your existing permissions. Each tool call uses the same API route as AppSec Platform. Semgrep checks your permissions on that route, as it does for any other request. You can authenticate with OAuth or with an API token:Connect with OAuth
OAuth is the recommended way to connect. You add the server to your client, then sign in through your browser and select a Semgrep organization.Single-tenant URLThe steps below use
https://semgrep.dev/api/mcp. On a single-tenant deployment, replace that URL with https://YOUR_TENANT.semgrep.dev/api/mcp. Use your subdomain for YOUR_TENANT.- Claude Code
- Codex
- Cursor
- VS Code
- Other MCP clients
1
Add the server at user scope so that it’s available in every project:If
semgrep is already configured, update its existing entry instead of adding it again.2
Start Claude Code and run
/mcp.3
Select
semgrep.4
Sign in and select an organization in your browser.
5
Run
/mcp again and confirm that semgrep is connected.Connect with an API token
Use an API token if you prefer to manage the credential yourself, or if your client doesn’t support OAuth.Token scopes
Create a token in Settings > Tokens > API tokens. The token’s scope determines which tools work:
For more information, see Access tokens.
For the examples below, use a Web API or Read-only token. Where the client supports it, these examples read the token from the
SEMGREP_APP_TOKEN environment variable. The token stays out of the configuration file.
Single-tenant URLThe steps below use
https://semgrep.dev/api/mcp. On a single-tenant deployment, replace that URL with https://YOUR_TENANT.semgrep.dev/api/mcp. Use your subdomain for YOUR_TENANT.- Claude Code
- Codex
- Cursor
- VS Code
- Other MCP clients
1
Add the server with an Replace
Authorization header:YOUR_SEMGREP_APP_TOKEN with your API token. If semgrep is already configured, update the Authorization header in its existing entry instead of adding it again.2
Start a new Claude Code session. Run
/mcp and confirm that semgrep is connected.Available capabilities
The hosted MCP server provides tools in the following areas. Which tools you can use depends on your role or token scope, your organization’s plan, and the URL you connect to. On the read-only URL, each area provides only its read tools. For example, you can search findings, read scan logs, test patterns, and dry-run policies, but you can’t triage findings, generate fixes, or start scans.
Both URLs also provide a
discover tool that your agent can call to find the right tool for a task, a semgrep_account tool that returns the organization you’re connected to, and a semgrep_app_link tool that builds links to pages in AppSec Platform. The full MCP server URL also provides a FeedbackService_SendFeedback tool, which your agent can use to send feedback about the hosted MCP server to the Semgrep team.
The hosted MCP server also publishes a semgrep-automations skill through the MCP skills extension. The skill guides your agent through scheduling Agentic Workflows and setting up the automations that act on their findings.
Run Semgrep jobs
Use thesemgrep_run_job tool to start a scan or workflow on a project and get a summary of the findings it produces. Set jobType to choose what runs:
To choose the branch, set
branch. Otherwise, the job runs on the branch that Managed Scans uses for full scans of the project, or on the project’s primary branch if no full-scan branch is set.
AI-powered detection scans and Agentic Workflows runs consume credits.
Only admins can run
workflow and deep jobs, because both run Agentic Workflows. The semgrep_run_job tool isn’t available on the read-only URL.semgrep_run_job uses the MCP tasks extension. Instead of waiting for the job to finish, the tool returns a task right away. Your MCP client checks the task until the job is completed, failed, or canceled, then reads the result. The result describes the job and summarizes the findings from each scan or workflow that ran. Tasks expire 24 hours after they’re created.
The semgrep_run_job tool appears only if your MCP client supports the tasks extension. If you don’t see it, check your client’s documentation for tasks support.
You can cancel a workflow job. You can’t stop a Managed Scans or AI-powered detection scan after it starts, so sms, aiDetection, and deep jobs keep running until they finish.
Troubleshooting
The connection fails with “Invalid or expired bearer token”
The client receives a401 error. The token was revoked, was created in a different deployment than the server URL, or has the Member scope.
To fix this, use a token with the Web API scope from the same deployment as the server URL, or connect with OAuth.
Only the semgrep_account tool appears
The connection isn’t tied to an organization that can use the hosted MCP server. Either your organization is on the Free plan, or you connected with a token that isn’t bound to an organization.
To fix this, connect to an organization on a Teams or Enterprise plan. If you use an API token, create it in that organization’s Settings > Tokens > API tokens.
A tool returns “status 404: The requested URL was not found”
Your token or role doesn’t have the permission that the tool requires. The hosted MCP server reports permission denials as404, not 403, even for an organization you belong to.
To fix this, check Token scopes, or switch to a Web API token or OAuth.