Fortify-SCA-MCP

command module
v0.0.0-...-e4851cd Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Fortify SCA MCP

MCP server for Fortify SCA dependency policy compliance checks.

This project is implemented in Go using the official MCP Go SDK:

  • github.com/modelcontextprotocol/go-sdk

Transport

This build is stdio only.

  • MCP_TRANSPORT must be stdio when set.
  • The server runs over stdin/stdout using MCP newline-delimited JSON messages.

Authentication

FORTIFY_SCA_ACCESS_TOKEN is the long-lived token. The server never sends it to the API endpoint directly. Instead it posts the token to POST {FORTIFY_SCA_BASE_URL}/api/login_refresh to obtain a short-lived bearer token, which is cached in memory and sent as Authorization: Bearer <token>.

The cached bearer is refreshed:

  • proactively, 60 seconds before the exp claim in the returned JWT (or after 50 minutes if the token is opaque), and
  • reactively, once, when the API responds 401.

Configuration

Required:

  • FORTIFY_SCA_ACCESS_TOKEN

Optional:

  • FORTIFY_SCA_BASE_URL (default: https://debricked.com)
  • FORTIFY_SCA_API_VERSION (default: 1.0)
  • MCP_TRANSPORT (default: stdio)

Build

go build -o fortify-sca-mcp .

Use From Another Go Module

The public integration package is github.com/debricked/Fortify-SCA-MCP/pkg/server. Packages under internal/ are implementation details and cannot be imported by a different module. The pkg directory is a public-package convention; exported identifiers such as server.Serve are the actual integration API.

For a host application such as the future Debricked CLI, run the MCP server with host-supplied configuration and streams:

import (
	"context"
	"io"

	"github.com/debricked/Fortify-SCA-MCP/pkg/server"
)

func runFortifySCAMCP(ctx context.Context, accessToken string, input io.Reader, output io.Writer) error {
	return server.Serve(ctx, server.Options{
		AccessToken: accessToken,
		BaseURL:     "https://debricked.com",
		APIVersion:  "1.0",
	}, input, output)
}

The host owns authentication, context cancellation, and stream lifecycle. The CLI does not need to import or use the MCP SDK directly. The package does not read the host's environment or process stdio.

The standalone executable loads FORTIFY_SCA_ACCESS_TOKEN, FORTIFY_SCA_BASE_URL, and FORTIFY_SCA_API_VERSION in main.go, handles process signals there, and calls the same server.Serve function over stdin/stdout.

Run

./fortify-sca-mcp

Test

go test ./...

Release

Releases are source-only Go module releases. Push a semantic-version tag such as v26.3.0 to run the release workflow. It runs the test and build checks, then creates a GitHub Release with automatically generated notes. GitHub provides the tagged source as .tar.gz and .zip archives.

The module version comes from the Git tag:

go get github.com/debricked/Fortify-SCA-MCP@v26.3.0

This project does not upload binary or checksum assets for the module release. The MCP metadata version and Fortify SCA API version are independent of the Go module tag.

Tool Contract

Tool name:

  • check_dependency_policy_compliance

Required tool inputs:

  • purl: package URL including version (for example, pkg:npm/lodash@4.17.21)
  • repo_url: git remote URL (SSH or HTTPS)
  • repo_name: repository slug with owner/org (for example, my-org/my-repo)

Example payload:

{
	"purl": "pkg:npm/react@19.1.8",
	"repo_url": "https://github.com/my-org/my-repo",
	"repo_name": "my-org/my-repo"
}

Failure mode:

  • returns recommendation POLICY_CHECK_UNAVAILABLE with an actionable reason when input validation fails, Fortify SCA API auth/plan checks fail, network timeout occurs, or other API/runtime errors occur.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
client command
internal
pkg

Jump to

Keyboard shortcuts

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