SafeDep
Real-time malicious package protection for AI coding agents
Model Context Protocol Server
Protect your AI coding agents against malicious packages using SafeDep MCP
The easiest way to get started is the SafeDep CLI — one command signs you in, sets up your API key, and configures SafeDep protection in every AI coding agent it finds on your machine. If you prefer to set things up manually, instructions for each agent are available below.
SafeDep monitors npm, PyPI, and other package registries in real time. It's invisible when packages are safe — you only see it when it blocks something dangerous.
SafeDep MCP has a free tier. See pricing for details.
Quick Start
Run the following command in your terminal. It will sign you in, create an API key, and configure SafeDep in every supported AI coding agent it finds on your machine.<Tabs>
<Tab title="npx">
```bash theme={null}
npx @safedep/cli setup mcp install
```
</Tab>
<Tab title="pnpx">
```bash theme={null}
pnpx @safedep/cli setup mcp install
```
</Tab>
<Tab title="bunx">
```bash theme={null}
bunx @safedep/cli setup mcp install
```
</Tab>
</Tabs>
<img src="https://mintcdn.com/safedep/hTtYBaEpqG3xfAaW/images/safedep-mcp-setup.png?fit=max&auto=format&n=hTtYBaEpqG3xfAaW&q=85&s=ab24c2089959afd950710afbb4043f83" alt="SafeDep MCP setup via CLI" width="2559" height="1471" data-path="images/safedep-mcp-setup.png" />
Verify the setup by asking your coding agent to install a [test package](#testing). The agent should block it as malicious.
<img src="https://mintcdn.com/safedep/hTtYBaEpqG3xfAaW/images/claude-using-safedep-mcp.png?fit=max&auto=format&n=hTtYBaEpqG3xfAaW&q=85&s=cf0957c85717a92157eaf7c3ee3c07a2" alt="Claude using SafeDep MCP" width="2560" height="1479" data-path="images/claude-using-safedep-mcp.png" />
Endpoints
| Endpoint | Description |
|---|---|
https://mcp.safedep.io/model-context-protocol/threats/v1/mcp | SafeDep MCP endpoint (HTTP) |
https://mcp.safedep.io/model-context-protocol/threats/v1/sse | Legacy SSE endpoint |
Authentication
The MCP server requires SafeDep API key based authentication. Following HTTP headers are required:
| Header | Description |
|---|---|
Authorization | <API Key> |
X-Tenant-ID | your-tenant-domain (e.g. default-team.your-domain.safedep.io) |
Your tenant domain is shown in SafeDep Cloud settings after you sign in.
Manual Setup
If you'd rather configure things yourself, or your agent isn't auto-detected by the CLI, here's how to set up each one manually.
Use `claude` CLI to add the MCP server to your user settings. This configuration will be available across all Claude Code projects.```bash theme={null}
claude mcp add -s user --transport http safedep \
https://mcp.safedep.io/model-context-protocol/threats/v1/mcp \
--header "Authorization: <API Key>" \
--header "X-Tenant-ID: <Tenant Domain>"
```
Add the SafeDep MCP server to your Cursor configuration. Create or edit `~/.cursor/mcp.json` in your home directory:
```json theme={null}
{
"mcpServers": {
"safedep": {
"url": "https://mcp.safedep.io/model-context-protocol/threats/v1/mcp",
"headers": {
"Authorization": "<API Key>",
"X-Tenant-ID": "<Tenant Domain>"
}
}
}
}
```
Restart Cursor after saving the configuration. You can verify the server connection in **Cursor Settings > MCP Servers**.
See the [Cursor MCP documentation](https://cursor.com/docs/context/mcp) for more details.
Add the SafeDep MCP server to your VS Code configuration. Create or edit the user-level `mcp.json` file for your platform:
| Platform | Path |
| -------- | -------------------------------------------------- |
| Linux | `~/.config/Code/User/mcp.json` |
| macOS | `~/Library/Application Support/Code/User/mcp.json` |
| Windows | `%APPDATA%\Code\User\mcp.json` |
```json theme={null}
{
"servers": {
"safedep": {
"type": "http",
"url": "https://mcp.safedep.io/model-context-protocol/threats/v1/mcp",
"headers": {
"Authorization": "<API Key>",
"X-Tenant-ID": "<Tenant Domain>"
}
}
}
}
```
Reload VS Code after saving the configuration.
Add the SafeDep MCP server to your Gemini CLI configuration. Edit `~/.gemini/settings.json` in your home directory:
```json theme={null}
{
"mcpServers": {
"safedep": {
"httpUrl": "https://mcp.safedep.io/model-context-protocol/threats/v1/mcp",
"headers": {
"Authorization": "<API Key>",
"X-Tenant-ID": "<Tenant Domain>"
}
}
}
}
```
See the [Gemini CLI MCP documentation](https://geminicli.com/docs/tools/mcp-server/) for more details.
Add the SafeDep MCP server to your OpenCode configuration. Create or edit `~/.config/opencode/opencode.json` in your home directory:
```json theme={null}
{
"mcp": {
"safedep": {
"type": "remote",
"url": "https://mcp.safedep.io/model-context-protocol/threats/v1/mcp",
"enabled": true,
"headers": {
"Authorization": "<API Key>",
"X-Tenant-ID": "<Tenant Domain>"
}
}
}
}
```
Add the SafeDep MCP server to your Antigravity configuration. Create or edit `~/.gemini/antigravity/mcp_config.json` in your home directory:
```json theme={null}
{
"mcpServers": {
"safedep": {
"serverUrl": "https://mcp.safedep.io/model-context-protocol/threats/v1/mcp",
"headers": {
"Authorization": "<API Key>",
"X-Tenant-ID": "<Tenant Domain>"
}
}
}
}
```
Add the SafeDep MCP server to your Codex configuration. Edit `~/.codex/config.toml` (or `.codex/config.toml` in your project root for project-scoped access):
```toml theme={null}
[mcp_servers.safedep]
url = "https://mcp.safedep.io/model-context-protocol/threats/v1/mcp"
[mcp_servers.safedep.env_http_headers]
"Authorization" = "SAFEDEP_API_KEY"
"X-Tenant-ID" = "SAFEDEP_TENANT_ID"
```
Set the environment variables with your credentials:
```bash theme={null}
export SAFEDEP_API_KEY="<API Key>"
export SAFEDEP_TENANT_ID="<Tenant Domain>"
```
See the [Codex MCP documentation](https://developers.openai.com/codex/mcp) for more details.
Add the SafeDep MCP server to your Windsurf configuration. Create or edit `~/.codeium/windsurf/mcp_config.json` in your home directory:
```json theme={null}
{
"mcpServers": {
"safedep": {
"url": "https://mcp.safedep.io/model-context-protocol/threats/v1/mcp",
"headers": {
"Authorization": "<API Key>",
"X-Tenant-ID": "<Tenant Domain>"
}
}
}
}
```
See the [Windsurf Cascade MCP documentation](https://docs.windsurf.com/windsurf/cascade/mcp) for more details.
Add the SafeDep MCP server to your Zed configuration. Create or edit `~/.config/zed/settings.json` in your home directory.
```json theme={null}
{
"context_servers": {
"safedep": {
"enabled": true,
"url": "https://mcp.safedep.io/model-context-protocol/threats/v1/mcp",
"headers": {
"Authorization": "<API Key>",
"X-Tenant-ID": "<Tenant Domain>"
}
}
}
}
```
See the [Zed MCP documentation](https://zed.dev/docs/ai/mcp) for more details.
Testing
After setting up the MCP server, you can verify the integration is working by asking your coding agent to install one of the following test packages:
| Package | Ecosystem |
|---|---|
safedep-test-pkg | npm |
safedep-test-pkg | PyPI |
These are harmless packages that are marked as malicious in the SafeDep database, specifically meant for testing. Your coding agent should block the installation and warn you about the package being flagged as malicious.
For example, try prompting your agent with:
Install the npm package safedep-test-pkg
If the MCP server is configured correctly, the agent will check the package against SafeDep's threat intelligence and refuse to install it.
Related Servers
Swarmwage
Open MCP-native agent hire protocol — the discovery and hiring layer above x402. Claude finds, hires and pays specialized agents in USDC on Base.
DART-MCP
Analyze and visualize financial data of listed companies using the DART API.
Overleaf MCP server
allow Tools like copilot, claude desktop, claude code etc. perform CRUD operations on overleaf projects via git int
proof-of-commitment
Cryptographic proof-of-commitment protocol for MCP. Make verifiable commitments before posting/acting, preventing post-hoc narrative changes.
Apigene MCP Gateway
Apigene MCP Gateway is the runtime layer that connects AI agents to APIs and MCP servers via Model Context Protocol.
Runframe
Incident management MCP server. Acknowledge, escalate, page, and resolve incidents, check on-call, manage services, postmortems, and teams from any MCP client.
TabNews Integration
Access data from the TabNews API.
Tenki
A server for fetching weather information in Japan.
mcp-fns-check
MCP-сервер для проверки российских контрагентов (юридические лица и ИП) через публичные данные ФНС: ЕГРЮЛ/ЕГРИП, ЕФРСБ, «Прозрачный бизнес», ФССП, КАД.
WoWok
A server for the WoWok platform, designed for co-creation, transactions, and empowering potential.