FOSSA
Query Software Bill of Materials (SBOM), license compliance, and dependency data from FOSSA using AI assistants.
Overview
The FOSSA molecule provides Model Context Protocol (MCP) integration for retrieving software composition analysis data from FOSSA. It enables AI assistants like Claude to query SBOMs, licenses, dependencies, and security issues.
Key Features:
- Download SBOMs in multiple formats (CycloneDX, SPDX)
- Retrieve license and attribution data
- Query project dependencies with license information
- Track security vulnerabilities and compliance issues
- List and filter FOSSA projects
Note: This is an MCP-only molecule (no discovery component).
Quick Start
Configure the FOSSA MCP server:
mcp:
fossa:
api_token: ${FOSSA_API_TOKEN}
base_url: https://app.fossa.com/api # Optional
Configuration
Basic Configuration
mcp:
fossa:
api_token: ${FOSSA_API_TOKEN}
Self-Hosted FOSSA
mcp:
fossa:
api_token: ${FOSSA_API_TOKEN}
base_url: https://fossa.company.com/api
Configuration Options
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
api_token | string | Yes | - | FOSSA API authentication token |
base_url | string | No | https://app.fossa.com/api | FOSSA API base URL |
Authentication
Getting a FOSSA API Token
- Log in to FOSSA
- Go to Settings → API Tokens
- Click "Create New Token"
- Give it a name (e.g., "Devgraph MCP")
- Select appropriate permissions
- Copy the token
Set environment variable:
export FOSSA_API_TOKEN="your-fossa-token-here"
MCP Tools
list_projects
List all FOSSA projects with optional filtering.
Parameters:
filter_title(optional): Filter by project titlelimit(optional): Maximum results (default: 100)offset(optional): Pagination offset (default: 0)
Example via Claude:
List all FOSSA projects with "backend" in the title
Response:
{
"projects": [
{
"id": "custom+1/backend-api",
"title": "Backend API",
"url": "https://github.com/myorg/backend-api",
"default_branch": "main"
}
]
}
get_project_sbom
Download a Software Bill of Materials for a project revision.
Parameters:
revision_id(required): Project revision ID (e.g., "custom+1/my-project/main")format(optional): SBOM format (default: "cyclonedx-json")include_deep_dependencies(optional): Include transitive deps (default: true)
Supported Formats:
cyclonedx-json- CycloneDX JSON format (OWASP standard)cyclonedx-xml- CycloneDX XML formatspdx-json- SPDX JSON format (Linux Foundation standard)spdx-tag-value- SPDX Tag-Value format
Example via Claude:
Get the SBOM for backend-api main branch in CycloneDX JSON format
Response: Full SBOM in requested format with components, licenses, and dependencies.
get_project_licenses
Retrieve license information and attribution data for a project.
Parameters:
revision_id(required): Project revision ID
Example via Claude:
What licenses are used in the backend-api project?
Response:
{
"licenses": [
{
"name": "MIT",
"url": "https://opensource.org/licenses/MIT",
"components": ["lodash@4.17.21", "express@4.18.0"]
},
{
"name": "Apache-2.0",
"url": "https://apache.org/licenses/LICENSE-2.0",
"components": ["typescript@5.0.0"]
}
]
}
get_project_dependencies
Get detailed dependency information for a project revision.
Parameters:
revision_id(required): Project revision ID
Example via Claude:
Show me all dependencies for backend-api including their licenses
Response:
{
"dependencies": [
{
"name": "lodash",
"version": "4.17.21",
"license": "MIT",
"direct": true
},
{
"name": "express",
"version": "4.18.0",
"license": "MIT",
"direct": true
}
]
}
get_project_issues
Query security vulnerabilities and compliance issues.
Parameters:
project_id(required): Project IDissue_type(optional): Filter by type ("vulnerability", "license", "quality")
Example via Claude:
What security vulnerabilities does backend-api have?
Response:
{
"issues": [
{
"type": "vulnerability",
"severity": "HIGH",
"title": "Prototype Pollution in lodash",
"description": "CVE-2020-8203",
"component": "lodash@4.17.15",
"remediation": "Upgrade to lodash@4.17.21"
}
]
}
Usage Examples
Via Claude Desktop
After configuring the FOSSA MCP server, interact with Claude:
Get SBOM
Download the SBOM for my-backend-service in SPDX JSON format
Check Licenses
What licenses are we using in the frontend-app project?
Are there any GPL licenses in our codebase?
Analyze Dependencies
Show me all dependencies for backend-api
Which dependencies use the MIT license?
Security Vulnerabilities
What security vulnerabilities does backend-api have?
List all high-severity issues in our projects
Compliance Checks
Are there any license compliance issues in frontend-app?
Which projects have GPL dependencies?
SBOM Formats
CycloneDX
JSON Format (Recommended):
format: cyclonedx-json
XML Format:
format: cyclonedx-xml
CycloneDX is an OWASP standard focused on security and component analysis.
SPDX
JSON Format:
format: spdx-json
Tag-Value Format:
format: spdx-tag-value
SPDX is a Linux Foundation standard focused on licensing and compliance.
Revision ID Format
FOSSA uses a specific format for revision IDs:
<fetcher>+<org_id>/<project>/<branch>
Examples:
custom+1/my-project/maingit+github.com/myorg/my-repo/developcustom+5/backend-api/release/v1.0
Components:
fetcher: How code is fetched (custom, git, etc.)org_id: Organization ID in FOSSAproject: Project namebranch: Branch or version
Use Cases
License Compliance
Ensure all dependencies meet licensing requirements:
Check all projects for GPL licenses
Get attribution report for backend-api
Security Auditing
Track vulnerabilities across projects:
List all high-severity vulnerabilities
Which projects have unpatched CVEs?
Dependency Management
Analyze dependency usage:
What version of lodash is backend-api using?
Show all projects using vulnerable dependencies
SBOM Generation
Generate SBOMs for compliance and documentation:
Download SBOM for all production projects in SPDX format
Generate CycloneDX SBOM for security audit
Supply Chain Security
Track software supply chain:
Map all dependencies for critical services
Identify shared dependencies across projects
Troubleshooting
Authentication Errors
Symptom: "401 Unauthorized" or "403 Forbidden"
Solutions:
- Verify API token is correct
- Check token hasn't expired
- Ensure token has required permissions
- For self-hosted: Verify base URL is correct
Project Not Found
Symptom: "Project not found" error
Solutions:
- Verify revision ID format is correct
- Check project exists in FOSSA
- Ensure branch/tag exists
- Use
list_projectsto find correct ID
Invalid Revision ID
Symptom: "Invalid revision ID" error
Solutions:
- Use correct format:
fetcher+org_id/project/branch - Check for typos in project or branch name
- Verify org_id is correct
- Try with default branch first
SBOM Format Not Supported
Symptom: "Unsupported format" error
Solutions:
- Use supported formats:
cyclonedx-json,cyclonedx-xml,spdx-json,spdx-tag-value - Check FOSSA version supports requested format
- Try default format (cyclonedx-json)
Missing Dependencies
Symptom: Dependencies not appearing in results
Solutions:
- Ensure project has been scanned by FOSSA
- Check scan completed successfully
- For deep dependencies: Use
include_deep_dependencies: true - Re-scan project if needed
Integration Examples
CI/CD Integration
Use FOSSA MCP in CI/CD pipelines:
- Generate SBOM after build
- Check for vulnerabilities before deploy
- Verify license compliance
- Block on policy violations
Development Workflow
Integrate into development:
- Query licenses before adding dependencies
- Check security issues during code review
- Generate SBOMs for releases
- Track dependency updates
Compliance Reporting
Automate compliance workflows:
- Generate attribution reports
- Export SBOMs for customers
- Track license obligations
- Audit third-party code
Best Practices
- Regular Scans: Scan projects frequently in FOSSA
- Branch Strategy: Track main/production branches
- Format Selection: Use CycloneDX for security, SPDX for licensing
- Deep Dependencies: Include transitive dependencies
- Issue Tracking: Monitor vulnerabilities continuously
- Policy Enforcement: Set up FOSSA policies
- Documentation: Document license compliance decisions
Performance Tips
- Specific Queries: Use filters to narrow results
- Pagination: Use offset/limit for large result sets
- Format Selection: JSON formats are faster than XML
- Cache Results: Cache SBOM data when possible
- Batch Operations: Query multiple projects in parallel
Next Steps
- Set up GitHub molecule to link source repositories
- Configure Docker molecule to track container licenses
- Explore software composition analysis workflows