Local Socket MCP
If you prefer to run your own instance, you can deploy the Socket MCP server locally using either stdio or HTTP modes.
Getting an API key
To use a local Socket MCP Server, you need to create an API key. You can do this by following these steps. The only required permission scope is packages:list
, which allows the MCP server to query package metadata for dependency scores.
For local deployment, you have two options:
Stdio Mode (Default)
Click a button below to install the self-hosted stdio server in your favorite AI assistant.
Claude Code (stdio mode) can be set up with the following command:
claude mcp add socket-mcp -e SOCKET_API_KEY="your-api-key-here" -- npx -y @socketsecurity/mcp@latest
This is how the configuration looks like on most MCP clients:
{
"mcpServers": {
"socket-mcp": {
"command": "npx",
"args": ["@socketsecurity/mcp@latest"],
"env": {
"SOCKET_API_KEY": "your-api-key-here"
}
}
}
}
This approach automatically uses the latest version without requiring global installation.
HTTP Mode
-
Run the server in HTTP mode using npx:
MCP_HTTP_MODE=true SOCKET_API_KEY=your-api-key npx @socketsecurity/mcp@latest --http
-
Configure your MCP client to connect to the HTTP server:
{ "mcpServers": { "socket-mcp": { "type": "http", "url": "http://localhost:3000" } } }
Updated 1 day ago