Documentation
¶
Overview ¶
Package mcp finds the MCP servers that MCP client configs in a source tree launch or connect to, and judges each launched package with the SCANOSS vulnerabilities API.
Index ¶
Constants ¶
const ( TransportStdio = "stdio" TransportSSE = "sse" TransportHTTP = "http" )
Transports of an MCP server.
const ( RuleID = "ai.mcp.server-config" Category = "mcp_server" )
Rule and category of an MCP server finding.
const ( StatusMalicious = "malicious" StatusVulnerable = "vulnerable" StatusClean = "clean" StatusUnknown = "unknown" // StatusUnpinned is a package without a version and no MAL-* advisory: not known malicious, // but whatever version is latest runs, and its advisories cannot be told apart. StatusUnpinned = "unpinned" )
Verdict statuses of an MCP server.
const VerdictSource = "vulnerabilities-api"
VerdictSource names where verdicts come from.
Variables ¶
This section is empty.
Functions ¶
func Checkable ¶
Checkable counts the servers whose package the vulnerabilities API can be asked about.
Types ¶
type Server ¶
type Server struct {
// Name is the server's key in the config.
Name string
// File is the config's path relative to the scanned root, with forward slashes.
File string
// Line is the line of the server's key.
Line int
Transport string
// Launcher is the program a stdio server runs (npx, uvx, docker, node); empty for a remote one.
Launcher string
// Package is the purl of the package the launcher runs; empty when it names none.
Package string
// Pinned is true when the launch names one exact version.
Pinned bool
// URL is a remote server's endpoint, without credentials or query.
URL string
// contains filtered or unexported fields
}
Server is one server entry of an MCP client config.
type Verdict ¶
type Verdict struct {
Status string
// IDs are the advisories behind a malicious or vulnerable status, e.g. MAL-2025-47604.
IDs []string
}
Verdict is what the vulnerabilities API says about the package a server launches.