mcp

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package mcp provides an MCP server for exposing Overseer functionality.

Index

Constants

View Source
const ServerName = "ovrse"

ServerName is the MCP server name.

Variables

View Source
var Version = "dev"

Version is the ovrse version. Set via ldflags at build time: -ldflags "-X github.com/emphereio/ovrse/pkg/mcp.Version=x.y.z" Falls back to "dev" for local builds without ldflags.

Functions

This section is empty.

Types

type AnalyzeCVEArgs

type AnalyzeCVEArgs struct {
	CVEID          string `json:"cve_id"`
	PackageName    string `json:"package_name,omitempty"`
	CurrentVersion string `json:"current_version,omitempty"`
	Ecosystem      string `json:"ecosystem,omitempty"`
	OutputFormat   string `json:"output_format,omitempty"`
}

AnalyzeCVEArgs are arguments for analyze_cve tool.

type BatchTriageArgs

type BatchTriageArgs struct {
	CVEIDs []string `json:"cve_ids"`
}

BatchTriageArgs are arguments for batch_triage tool.

type CheckIfAffectedArgs

type CheckIfAffectedArgs struct {
	CVEID          string `json:"cve_id"`
	PackageName    string `json:"package_name"`
	CurrentVersion string `json:"current_version"`
	Ecosystem      string `json:"ecosystem"`
}

CheckIfAffectedArgs are arguments for check_if_affected tool.

type CheckIfAffectedResponse

type CheckIfAffectedResponse struct {
	Status     string `json:"status"`
	Message    string `json:"message"`
	FixVersion string `json:"fix_version,omitempty"`
	Action     string `json:"action"`
}

CheckIfAffectedResponse is the response for check_if_affected tool.

type GetCVEVerdictArgs

type GetCVEVerdictArgs struct {
	CVEID string `json:"cve_id"`
}

GetCVEVerdictArgs are arguments for get_cve_verdict tool.

type GetFixArgs

type GetFixArgs struct {
	Ecosystem      string `json:"ecosystem"`
	PackageName    string `json:"package_name"`
	CurrentVersion string `json:"current_version"`
	FixVersion     string `json:"fix_version"`
}

type GetProjectStatusArgs

type GetProjectStatusArgs struct {
	Path string `json:"path"`
}

GetProjectStatusArgs are arguments for get_project_status tool.

type ListProjectsArgs

type ListProjectsArgs struct {
	Limit int `json:"limit,omitempty"`
}

ListProjectsArgs are arguments for list_projects tool.

type ListVulnsArgs

type ListVulnsArgs struct {
	Severity string `json:"severity,omitempty"`
	Project  string `json:"project,omitempty"`
	Limit    int    `json:"limit,omitempty"`
}

ListVulnsArgs are arguments for list_vulnerabilities tool.

type ProjectInfo

type ProjectInfo struct {
	Path        string `json:"path"`
	Name        string `json:"name,omitempty"`
	Ecosystem   string `json:"ecosystem,omitempty"`
	LastScanned string `json:"last_scanned,omitempty"`
	VulnCount   int    `json:"vuln_count"`
}

ProjectInfo represents a monitored project for MCP responses.

type ReportOutcomeArgs

type ReportOutcomeArgs struct {
	CVEID                 string                 `json:"cve_id"`
	PackageName           string                 `json:"package_name"`
	Ecosystem             string                 `json:"ecosystem"`
	FromVersion           string                 `json:"from_version"`
	ToVersion             string                 `json:"to_version"`
	Outcome               string                 `json:"outcome"`
	FailureReason         string                 `json:"failure_reason,omitempty"`
	ErrorMessage          string                 `json:"error_message,omitempty"`
	BreakingChangeDetails string                 `json:"breaking_change_details,omitempty"`
	AlternativeVersion    string                 `json:"alternative_version,omitempty"`
	Environment           map[string]interface{} `json:"environment,omitempty"`
}

ReportOutcomeArgs are arguments for report_remediation_outcome tool.

type ScanNowArgs

type ScanNowArgs struct {
	Path string `json:"path"`
}

ScanNowArgs are arguments for scan_now tool.

type ScanProjectArgs

type ScanProjectArgs struct {
	Path        string `json:"path"`
	Ecosystem   string `json:"ecosystem,omitempty"`
	NativeAudit bool   `json:"native_audit,omitempty"`
}

type ScanResponse

type ScanResponse struct {
	Path          string                  `json:"path"`
	Results       []*ecosystem.ScanResult `json:"results"`
	TotalPackages int                     `json:"total_packages"`
	TotalVulns    int                     `json:"total_vulns"`
	Warnings      []string                `json:"warnings,omitempty"`
}

type ScanSummary

type ScanSummary struct {
	ProjectPath     string         `json:"project_path"`
	PackagesScanned int            `json:"packages_scanned"`
	VulnsFound      int            `json:"vulns_found"`
	BySeverity      map[string]int `json:"by_severity"`
}

ScanSummary represents scan results for MCP responses.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the MCP server using the plugin system.

func NewServer

func NewServer(ic *intel.Client) *Server

NewServer creates a new MCP server.

func (*Server) MCPServer

func (s *Server) MCPServer() *server.MCPServer

MCPServer returns the underlying MCP server.

type VulnerabilityInfo

type VulnerabilityInfo struct {
	CVEID       string   `json:"cve_id"`
	PackageName string   `json:"package_name"`
	Version     string   `json:"version"`
	Ecosystem   string   `json:"ecosystem"`
	Severity    string   `json:"severity"`
	CVSSScore   *float64 `json:"cvss_score,omitempty"`
	Summary     string   `json:"summary,omitempty"`
	FixVersion  string   `json:"fix_version,omitempty"`
	ProjectPath string   `json:"project_path"`
	DetectedAt  string   `json:"detected_at"`
}

VulnerabilityInfo represents a vulnerability for MCP responses.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL