Server URLs
Use the URL for your deployment type:
Replace
YOUR_TENANT with your single-tenant subdomain. The examples in these pages 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 for your client in Connect an MCP client, 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
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:
OAuth is the recommended way to connect. 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 in Connect an MCP client, 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, so the token stays out of the configuration file.