
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
@socketsecurity/mcp
Advanced tools
A Model Context Protocol (MCP) server for Socket integration, allowing AI assistants to efficiently check dependency vulnerability scores and security information.
š ļø This project is in early development and rapidly evolving.
The depscore
tool allows AI assistants to query the Socket API for dependency scoring information. It provides security and quality metrics for packages across different ecosystems.
Parameters:
ecosystem
: The package ecosystem (e.g., npm, PyPI). Defaults to "npm".depname
: The name of the dependency.version
: The version of the dependency. Defaults to "unknown".To use the Socket MCP Server, you need to create an API key. You can do this by following these steps.
[!NOTE] Custom integrations are not available to all paid versions of Claude. Check here for more information.
To use this MCP server with Claude Desktop:
Install the Socket MCP server:
npm install -g @socketsecurity/mcp
Set the API key in your environment:
export SOCKET_API_KEY=your_api_key_here
In Claude Desktop, go to Settings > Developer > Edit Config.
{
"mcpServers": {
"socket-mcp": {
"command": "socket-mcp",
"args": [],
"env": {
"SOCKET_API_KEY": "your-api-key"
}
}
}
}
Enter the following:
socket-mcp
Now you can ask Claude questions like "Check the security score for express version 4.18.2".
The process is similar for Claude Code. See the Claude Code documentation for more details.
For quick installation, you can use the following link to install the Socket MCP server in VS Code:
To use this MCP server in VS Code:
Set the API key in your environment:
export SOCKET_API_KEY=your_api_key_here
In VS Code settings, add the Socket MCP server to your configuration .vscode/mcp.json
file:
{
"inputs": [
{
"type": "promptString",
"id": "socket_api_key",
"description": "Socket API Key",
"password": true
}
],
"servers": {
"socket-mcp": {
"type": "stdio",
"command": "socket-mcp",
"args": [],
"env": {
"SOCKET_API_KEY": "${input:socket_api_key}"
},
}
}
}
Now you can ask questions about dependency security within your VS Code environment.
Feel free to add the following to your .github/copilot-instructions.md
file to control better how the tools is used by your agent:
## Socket MCP Server
Always check the dependencies scores with the depscore tool when you add a new dependency. If the score is low, consider using an alternative library or writing the code yourself. If you decide to use a library with a low score, make sure to document the reasons for your choice. If you are unsure about the score, ask for a review from someone with more experience.
When checking dependencies, make sure to also check the imports not just the pyproject.toml/package.json/dependency file.
Clone the repository and install dependencies:
git clone https://github.com/SocketDev/socket-mcp.git
cd socket-mcp
npm install
To build the project:
npm run build
This compiles the TypeScript files and makes the binary executable called socket-mcp
.
To run the Socket MCP server locally:
export SOCKET_API_KEY=your_api_key_here
node build/index.js
After installing globally, you can run the executable directly:
export SOCKET_API_KEY=your_api_key_here
socket-mcp
To install the tool globally and make the socket-mcp
command available system-wide:
npm install -g .
After global installation, you can use the socket-mcp
command from anywhere:
export SOCKET_API_KEY=your_api_key_here
socket-mcp
You can further customize how the Socket MCP server interacts with your AI assistant by modifying your client rules. The rules are usually a markdown file and its location depends on the AI assistant you are using.
MCP Client | Rules File Location |
---|---|
Claude Desktop/Code | CLAUDE.md |
VSCode Copilot | .github/copilot-instructions.md |
Cursor | .cursor/rules |
Rules that can be added to the client rules file include the following:
Always check dependency scores with the debscore tool when you add a new dependency. If the score is low, consider using an alternative library or writing the code yourself. If you are unsure about the score, ask for a review from someone with more experience. When checking dependencies, make sure to also check the imports not just the pyproject.toml file.
You can adjust the rules to fit your needs. For example, you can add rules to include specific manifest files, or guide the AI assistant on how to handle low scores. The rules are flexible and can be tailored to your workflow.
FAQs
Socket MCP server for scanning dependencies
The npm package @socketsecurity/mcp receives a total of 715 weekly downloads. As such, @socketsecurity/mcp popularity was classified as not popular.
We found that @socketsecurity/mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Ā It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.