Socket MCP Server
Socket MCP lets AI assistants query Socket dependency security scores and related metadata.
Score and audit packages across ecosystems such as npm, PyPI, cargo, Maven, NuGet, RubyGems, and Go using
depscore, including batch checks and optional version/platform hints.Retrieve organization details, alerts, and threat-feed data.
Inspect package files by listing, reading contents, and grepping them.
Connect through the hosted OAuth server at
https://mcp.socket.dev/or self-host locally via stdio or HTTP.
Integrates with GitHub Copilot in VS Code to provide dependency security scanning capabilities through the Socket MCP server.
Enables querying security and quality information for npm packages, including comprehensive security scores for dependency analysis.
Allows checking security scores and vulnerability information for Python packages from the PyPI ecosystem.
Provides tools for checking dependency security scores and vulnerability information across package ecosystems like npm, PyPI, and Cargo, including supply chain, quality, maintenance, vulnerability, and license metrics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Socket MCP Servercheck security score for express version 4.18.2"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Socket MCP Server
Socket MCP lets AI assistants query Socket's dependency security scores and metadata through the Model Context Protocol (MCP).
Use it to score a package, audit a package.json, or identify risky dependencies in a conversation.
Connect your MCP client to the hosted server at https://mcp.socket.dev/ and authenticate through OAuth, or run the npm package yourself.
β¨ Features
π Dependency Security Scanning - Get comprehensive security scores for npm, PyPI, cargo, Maven, NuGet, RubyGems, Go Modules, and more (supported ecosystems)
π Public Hosted Service - Use our public server at
https://mcp.socket.dev/and sign in through your MCP client's OAuth flowπ Multiple Deployment Options - Run locally via stdio, HTTP, or use our service
π€ AI Assistant Integration - Connect from MCP-compatible clients; OAuth behavior varies by client
π Batch Processing - Check multiple dependencies in a single request
π OAuth Sign-In - Public server authenticates through your MCP client's OAuth flow; no API key to copy or manage
π οΈ This project is in early development and rapidly evolving.
Related MCP server: MCP NVD Server
Install
Option 1: Use the public Socket MCP server (recommended)
The public server requires Socket sign-in through OAuth for every tool call, including package scoring. Some MCP clients need an explicit sign-in step. You do not need an API key.
Add the hosted server through Claude's custom connector settings. The Developer configuration file is for local servers.
Open Customize > Connectors in Claude.
Select Add custom connector and enter
https://mcp.socket.dev/as the server URL. On Team and Enterprise plans, an organization owner adds the connector through Organization settings > Connectors first.Select Connect and complete the Socket authorization flow when prompted.
Enable the connector for your conversation, then ask Claude "Check the security score for express version 4.18.2".
For Claude Code, add the server:
claude mcp add --transport http socket-mcp https://mcp.socket.dev/Then run /mcp, select socket-mcp, choose Authenticate (or Re-authenticate, if shown), and approve access in your browser. An "authenticated" status before sign-in does not mean organization tools are ready.
Add the server:
codex mcp add socket-mcp --url https://mcp.socket.dev/Codex starts sign-in during this command. You may see an invalid_scope page before Codex automatically retries with the three MCP read permissions. Complete the browser authorization on the retry.
To avoid that initial error page, you can instead add the server directly to ~/.codex/config.toml:
[mcp_servers.socket-mcp]
url = "https://mcp.socket.dev/"
scopes = ["packages:list", "alerts:list", "threat-feed:list"]Then run:
codex mcp login socket-mcpWith dynamic client registration, each sign-in creates a new OAuth client with Socket.
# For VS Code with GitHub Copilot
code --add-mcp '{"name":"socket-mcp","type":"http","url":"https://mcp.socket.dev/"}'Or add to .vscode/mcp.json:
{
"servers": {
"socket-mcp": {
"type": "http",
"url": "https://mcp.socket.dev/"
}
}
}Cursor Settings β MCP β Add new MCP Server. Name socket-mcp, http type, URL https://mcp.socket.dev/.
{
"mcpServers": {
"socket-mcp": {
"type": "http",
"url": "https://mcp.socket.dev/"
}
}
}Windsurf does not support http type MCP servers. Use the stdio configuration in Option 2 below, or the serverUrl form:
{
"mcpServers": {
"socket-mcp": {
"serverUrl": "https://mcp.socket.dev/mcp"
}
}
}Factory is an AI-powered software engineering platform. Install the Socket MCP server with the Factory CLI:
droid mcp add socket https://mcp.socket.dev/ --type httpTo self-host with an API key instead, see Option 2 below and register the stdio command with droid mcp add.
Alternatively, type /mcp within the Factory droid to manage MCP servers from an interactive UI. Learn more in the Factory MCP documentation.
Clients that need a local bridge
Prefer your client's native remote HTTP connection to https://mcp.socket.dev/ when available. For clients that only launch local stdio servers, install mcp-remote 0.8.3:
pnpm add --global mcp-remote@0.8.3Add this local server configuration to your MCP client:
{
"mcpServers": {
"socket": {
"command": "mcp-remote",
"args": ["https://mcp.socket.dev/"]
}
}
}The bridge runs on your computer and receives OAuth redirects at http://localhost:<port>/oauth/callback. Keep it running while you authorize. Version 0.3.3 introduced the mid-session authorization fix; the forwarding and reauthorization retry paths were verified against the published 0.8.3 package. This verification does not cover a complete browser sign-in.
Reuse saved authorization while it remains valid. If a browser reports connection refused at the localhost callback, check the bridge's version and process. The callback listener belongs to the bridge; changing the hosted MCP URL does not start it.
Option 2: Self-host the Socket MCP server
See the self-hosted server instructions for installation, stdio and HTTP setup, environment variables, and OAuth configuration.
Usage
Once installed, ask your AI assistant questions like:
"Check the security score for express version 4.18.2"
"Analyze the security of my package.json dependencies"
"What are the vulnerability scores for react, lodash, and axios?"
Documentation
Service and tool reference lists every tool, input, result, authentication rule, and HTTP behavior.
Server commands and workflows covers local launch, self-hosting, environment variables, and the optional Claude Code hook.
Tools exposed
The complete tool roster, schemas, parameters, and result examples are in the service reference.
depscore
See depscore.
organizations
See organizations.
alerts
See alerts.
threat_feed
See threat_feed.
package_files
See package_files.
package_file_contents
package_file_grep
See package_file_grep.
Authentication
See the authentication reference for local tokens, per-request HTTP credentials, and hosted OAuth.
Worked example: organization details and alerts
See the organization and alerts example.
Adjusting tool usage via client rules
See client rule examples.
Claude Code Hook (Optional)
The optional Socket package guard is documented in the commands and workflows reference.
Setup
See the hook setup instructions.
How it works
See how the hook works.
Limitations
See the hook limitations.
Inspired by Jimmy Vo's dependency hook.
Development
This repo uses pnpm, and every command runs from the repo root. Node.js 24+ is required.
git clone https://github.com/SocketDev/socket-mcp.git
cd socket-mcp
pnpm installRun from source. No build step is needed, because Node 24 strips the TypeScript itself:
export SOCKET_API_TOKEN=your_api_token_here
pnpm run server-stdioOr in HTTP mode:
pnpm run server-httpBoth scripts read SOCKET_API_TOKEN (falling back to SOCKET_API_KEY) from your environment. Append :debug to either one (pnpm run server-http:debug) to set SOCKET_DEBUG=1 and get per-request tracing on stderr.
Audit events
Audit-event destinations and record behavior are documented in the service reference.
Health check endpoint
The HTTP health response is documented in the service reference.
Troubleshooting
Getting help
π Socket Documentation
π Report Issues
π¬ Community Support
Compatibility
MCP is still evolving, and client implementations differ in how they handle parts of the protocol. We proactively track compatibility gaps and work to offer the best possible experience with Claude Code, Codex, Cursor, and Zed. The table below summarizes the latest tests and known gaps.
Snapshot dated October 2, 2026; tests ran September 29βOctober 1. Each result applies to the listed client version and setup.
Client and tested setup | Hosted OAuth result | Verified tools and continuity | Important limit or workaround |
Claude Code 2.1.285, hosted HTTP | First | The 2.1.285 run verified the initial failure and successful login. | The pre-login βauthenticatedβ label was misleading; see upstream issue #98942. |
Codex CLI 0.159.2, hosted HTTP | Works after explicit login. |
| A broad scope request showed |
Cursor 3.22.12, hosted HTTP OAuth | Fails in tested conditions: |
| Cursor 3.20 recurrence was manually reported; no fix version is known. A related forum reply describes an unsuccessful workaround attempt but identifies a separate Cursor 3.18.9 marketplace-import blocker. |
Cursor, local stdio with API token (version not recorded) | Not applicable; this setup bypasses hosted OAuth. |
| This does not verify hosted OAuth, |
Zed Agent 1.22.0, hosted HTTP | Works after explicit OAuth. |
| Intermittent timeouts after idle, cause under investigation; four client timeouts matched fast server HTTP 400 responses. |
Only organizations and depscore were tested. Token refresh, server-side revocation, and all-tool coverage were not tested. Claude Desktop, VS Code, Windsurf, and Factory were not tested in this matrix.
License
MIT
Available Tools
1 tooldepscoreDependency Score ToolARead-only
Get the dependency score of packages with the depscore tool from Socket. Use 'unknown' for version if not known. Use this tool to scan dependencies for their quality and security on existing code or when code is generated. Stop generating code and ask the user how to proceed when any of the scores are low. When checking dependencies, make sure to also check the imports in the code, not just the manifest files (pyproject.toml, package.json, etc).
| Name | Required | Description | Default |
|---|---|---|---|
| packages | Yes | Array of packages to check | |
| platform | No | Optional OS-architecture hint (e.g., 'linux-x64', 'darwin-arm64', 'win32-x64'). Used to select the most relevant artifact when a package has platform-specific builds. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations indicate readOnlyHint=true, and the description aligns with that as a read-only operation. The description adds valuable behavioral context beyond annotations, such as using 'unknown' for unknown versions and the recommendation to stop code generation on low scores.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well front-loaded with the core purpose in the first sentence. It contains 6 sentences, with some redundancy (e.g., 'use unknown for version' appears both in description and schema). Slightly verbose but still efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description does not explain return values, but it provides sufficient behavioral guidance (when to use, how to handle low scores, extra checks). The tool is simple with only 2 parameters, and the description covers usage context well.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description reinforces using 'unknown' for the version parameter, which is already documented in the schema. No additional semantic value is provided for the 'platform' parameter, but the description does not need to add much given full schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get the dependency score of packages with the `depscore` tool from Socket,' providing a specific verb and resource. No sibling tools exist, so differentiation is not needed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly tells when to use the tool: 'to scan dependencies for their quality and security on existing code or when code is generated.' It also provides explicit instructions on what to do when scores are low ('Stop generating code and ask the user how to proceed') and advises checking imports beyond manifest files.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.0.17- First observed
depscore
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of confusion between tools.
Single tool named 'depscore' is clear and concise; no inconsistency arises with only one tool.
With only one tool, the server feels underdeveloped for its stated purpose of dependency security, lacking features like package listing or alert management.
The single tool provides dependency scoring but misses other essential operations such as checking for known vulnerabilities, updating packages, or generating detailed reports, leaving significant gaps.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
An MCP server for Arcjet - the runtime security platform that ships with your AI code.
Related MCP Servers
- AlicenseAqualityBmaintenanceA Model Context Protocol server that enables AI-powered analysis of NPM packages through multiple tools for security vulnerability scanning, dependency analysis, package comparison, and quality assessment.19658 npm19TypeScriptMIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that retrieves CVE information from the National Vulnerability Database, allowing AI models to access up-to-date vulnerability data.17Apache 2.0
- AlicenseAqualityDmaintenanceA Model Context Protocol server providing security vulnerability intelligence tools including CVE lookup, EPSS scoring, CVSS calculation, exploit detection, and Python package vulnerability checking.89MIT
- AlicenseNot gradedqualityAmaintenanceA security-focused MCP server that enables AI assistants to search PyPI packages, scan for vulnerabilities, audit dependencies, and ensure security across Python projects.335 PyPI3MIT