mcp-semclone

mcp-semclone

Enables LLMs to perform software composition analysis including license detection, vulnerability assessment, SBOM generation, and policy validation using the SEMCL.ONE toolchain.

Category
访问服务器

README

mcp-semclone - Model Context Protocol Server for SEMCL.ONE

Apache-2.0 Python 3.10+ MCP 1.0+

MCP (Model Context Protocol) server that provides LLMs with comprehensive OSS compliance and vulnerability analysis capabilities through the SEMCL.ONE toolchain.

Overview

mcp-semclone integrates the complete SEMCL.ONE toolchain to provide LLMs with powerful software composition analysis capabilities:

  • License Detection & Compliance: Scan codebases for licenses and validate against policies
  • Binary Analysis: Analyze compiled binaries (APK, EXE, DLL, SO, JAR) for OSS components and licenses
  • Vulnerability Assessment: Query multiple vulnerability databases for security issues
  • Package Discovery: Identify packages from source code and generate PURLs
  • SBOM Generation: Create Software Bill of Materials in CycloneDX format
  • Policy Validation: Check license compatibility and organizational compliance

Features

Tools

Analysis & Scanning:

  • scan_directory - Comprehensive directory scanning for packages, licenses, and vulnerabilities
  • scan_binary - Analyze compiled binaries (APK, EXE, DLL, SO, JAR) for OSS components
  • check_package - Check specific packages for licenses and vulnerabilities
  • download_and_scan_package - Download package source from registries and perform deep license/copyright scanning

Legal Notices & Documentation:

  • generate_legal_notices - Generate legal notices by scanning source code directly (fast, recommended)
  • generate_legal_notices_from_purls - Generate legal notices from PURL list (downloads from registries)
  • generate_sbom - Generate Software Bill of Materials in CycloneDX format

License & Policy Validation:

  • validate_policy - Validate licenses against organizational policies
  • validate_license_list - Quick license safety validation for distribution types
  • get_license_obligations - Get detailed compliance requirements for licenses
  • check_license_compatibility - Check if two licenses can be mixed
  • get_license_details - Get comprehensive license information including full text
  • analyze_commercial_risk - Assess commercial distribution risks

Complete Workflows:

  • run_compliance_check - Universal one-shot compliance workflow for any project type

Resources

  • license_database - Access license compatibility information
  • policy_templates - Get pre-configured policy templates

Prompts

  • compliance_check - Guided workflow for license compliance checking
  • vulnerability_assessment - Guided workflow for security assessment

Installation

Single Command Installation

pip install mcp-semclone

This automatically installs all required SEMCL.ONE tools:

  • purl2notices - Comprehensive package detection and license extraction
  • osslili - License detection from archives (used by check_package)
  • binarysniffer - Binary analysis for OSS components
  • ospac - Policy validation engine
  • vulnq - Vulnerability database queries
  • upmex - Package metadata extraction (used by check_package)

Pipx Installation (Recommended for Global Access)

pipx installs the package in an isolated environment while making the CLI tools globally available. This is ideal for avoiding dependency conflicts with other Python packages on your system.

# Install pipx if you don't have it
pip install pipx
pipx ensurepath

# Install mcp-semclone
pipx install mcp-semclone

# IMPORTANT: Inject all SEMCL.ONE tool dependencies into the same isolated environment
# This ensures all tools are available both as libraries and CLI commands
# Required by some agents that need direct CLI tool access
# Use --include-apps to make CLI commands globally available
pipx inject mcp-semclone purl2notices purl2src osslili binarysniffer ospac vulnq upmex --include-apps

Benefits of pipx:

  • ✅ Isolated environment prevents dependency conflicts
  • ✅ All tools globally accessible in PATH
  • ✅ Easy to update: pipx upgrade mcp-semclone
  • ✅ Clean uninstall: pipx uninstall mcp-semclone

For detailed setup instructions including:

  • IDE-specific configurations (Cursor, Cline, Kiro, VS Code, JetBrains)
  • Auto-approve settings
  • pip vs pipx configurations
  • Configuration templates
  • Troubleshooting

See the IDE Integration Guide

Environment Variables

Optional environment variables for enhanced functionality:

# API Keys (optional, for higher rate limits)
export GITHUB_TOKEN="your_github_token"
export NVD_API_KEY="your_nvd_api_key"

# Tool paths (optional, only if tools are not in PATH)
# Tools are auto-detected by default using shutil.which()
export PURL2NOTICES_PATH="/custom/path/to/purl2notices"
export OSSLILI_PATH="/custom/path/to/osslili"
export BINARYSNIFFER_PATH="/custom/path/to/binarysniffer"
export VULNQ_PATH="/custom/path/to/vulnq"
export OSPAC_PATH="/custom/path/to/ospac"
export UPMEX_PATH="/custom/path/to/upmex"

Note: Tools are automatically detected in your PATH. Environment variables are only needed for custom installation locations.

Usage Examples

With MCP Clients

Once configured, you can ask your LLM:

  • "Scan /path/to/project for license compliance issues"
  • "Analyze this Android APK file for OSS components and licenses"
  • "Check if this project has any critical vulnerabilities"
  • "Generate an SBOM for my project"
  • "What licenses are in this compiled binary?"
  • "Validate these licenses against our commercial distribution policy"
  • "Find all GPL-licensed dependencies in this codebase"

Workflows

License Compliance Check

  1. Scan the project to identify all packages and licenses
  2. Load or create a policy defining allowed/denied licenses
  3. Validate licenses against the policy
  4. Generate compliance report with violations and recommendations

Vulnerability Assessment

  1. Discover packages in the codebase
  2. Query vulnerability databases for each package
  3. Prioritize by severity (CRITICAL > HIGH > MEDIUM > LOW)
  4. Identify available fixes and upgrade paths
  5. Generate security report with remediation steps

SBOM Generation

  1. Scan project structure to identify components
  2. Extract metadata for each component
  3. Detect licenses and copyright information
  4. Format as SBOM (CycloneDX 1.4 JSON)
  5. Validate completeness of the SBOM

Examples

Basic MCP Client Usage

See examples/basic_usage.py for simple examples of calling MCP tools directly.

Strands Agent with Ollama

A complete autonomous agent example demonstrating OSS compliance analysis using local LLM (Ollama) with MCP integration.

Location: examples/strands-agent-ollama/

Features:

  • Autonomous decision-making (plan → execute → interpret → report)
  • Local LLM inference via Ollama (llama3, gemma3, deepseek-r1)
  • Interactive and batch analysis modes
  • Custom policy enforcement
  • Complete privacy (no external API calls)

Quick Start:

cd examples/strands-agent-ollama
./quickstart.sh
python agent.py interactive

Documentation:

Use Cases:

  • Mobile app compliance (APK/IPA analysis)
  • Embedded/IoT firmware scanning
  • CI/CD integration
  • Interactive compliance queries

See the example directory for full details.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

License

mcp-semclone is released under the Apache License 2.0. See LICENSE for details.

Support


Part of the SEMCL.ONE Software Composition Analysis toolchain

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选