SS

socketdev/socket-mcp

Developer tools
138 stars 46 forks Quality 89 Trend 30MIT

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.

Overview

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.

README

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.

Install

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.

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 [email protected]

Add 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:/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

Tools exposed

The complete tool roster, schemas, parameters, and result examples are in the service reference.

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

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 organizations call failed with a sign-in request; explicit OAuth then completed. The 2.1.285 run verified the initial failure and successful login. organizations and depscore passed after login in a separate 2.1.284 run. The pre-login “authenticated” label was misleading; see upstream issue #98942.
Codex CLI 0.159.2, hosted HTTP Works after explicit login. organizations and depscore passed after login, including a new conversation and idle checks. A broad scope request showed invalid_scope before Codex retried with the three MCP read permissions; see upstream issue #15643.
Cursor 3.22.12, hosted HTTP OAuth Fails in tested conditions: organizations remained Unauthorized; the Authenticate card did not establish access. organizations only; no successful hosted OAuth call verified. 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. depscore passed; restart continuity was reported manually. This does not verify hosted OAuth, organizations, or other tools.
Zed Agent 1.22.0, hosted HTTP Works after explicit OAuth. organizations and depscore passed after login, restart, and a six-minute idle check. 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

View the full README on GitHub

Install

This server does not publish a one-line install command.

Open the repository installation guide New to MCP? Start with the mcpskill.org guide →

Configuration

{ "mcpServers": { "socket-mcp": { "type": "http", "url": "https://mcp.socket.dev/" } } }