Skip to content

Add: MCP, Python & MATLAB Examples #765

@xsscx

Description

@xsscx

Maintainer Summary

2026-05-13 02:07:12 UTC

MCP, Python & MATLAB Examples for iccDEV

Python bindings for the RefIccMAX (iccDEV)
ICC color profile library, built with Cython.

Rev.A1 Release

  • Install paths are tested: wheel install, git branch install, editable install
  • Core Cython API covers profile header reads and CMM transforms
  • CLI-backed Python helpers give users practical XML/JSON/blob/dump/round-trip workflows
  • Tests compare helper behavior against native command-line tools
  • MCP Server with REST API & UI UX

Python Tools

  • iccdev.icc_to_xml()
  • iccdev.icc_from_xml()
  • iccdev.icc_to_json()
  • iccdev.icc_from_json()
  • iccdev.dump_profile()
  • iccdev.round_trip()
  • iccdev.find_tool()
  • iccdev.available_tools()
  • iccdev.IccToolError

Current Status

The iccdev package is in alpha development. Release automation will publish signed wheels via Deployment by end of May 2026.

From source (when available)

git clone https://github.com/InternationalColorConsortium/iccDEV.git
cd iccDEV/python
pip install -e ".[dev]"

When installing from the git repo, the build system auto-detects whether
IccProfLib2 is pre-built (via ICCDEV_BUILD_DIR) or compiles all 36
source files inline.

Source distributions require Cython at build time. The project intentionally
does not ship a generated _iccdev.cpp; reproducible builds regenerate the C++
extension source from iccdev/_iccdev.pyx using the Cython version declared in
pyproject.toml.

Requirements

  • Python >= 3.9
  • C++17 compiler (MSVC, GCC, or Clang) - only for source builds
  • NumPy >= 1.23,<3 (optional, for apply_ndarray())
  • Cython >= 3.0,<3.2 - only for source distribution builds

MCP UI UX WiP

Image

Wheel: Python Workflow

iccdev-mcp

DRAFT: iccMCP Documentation Rev.1

MCP server for ICC color profile tools from the International Color Consortium's RefIccMAX (iccDEV) library.

Exposes 23 tools to AI assistants (Claude, Copilot, Cursor) via the Model Context Protocol, covering profile inspection, color transforms, and format conversion for ICC.1 and ICC.2 profiles.

Install

pip install iccdev-mcp

Usage

Docker

The MCP runtime image includes the Python package, REST dependencies, iccDEV
CLI tools, runtime libraries, and Testing/ profiles. It is the lowest-friction
way to use all 23 MCP tools without building iccDEV locally.

# MCP stdio mode
docker run --rm -i ghcr.io/internationalcolorconsortium/iccdev-mcp:latest

# REST API mode on http://127.0.0.1:8080
docker run --rm -p 127.0.0.1:8080:8080 \
  ghcr.io/internationalcolorconsortium/iccdev-mcp:latest rest

Useful runtime defaults are already configured:

Variable Default
ICCDEV_TOOLS_DIR /opt/iccdev/Build/Tools
ICCDEV_TESTING_DIR /opt/iccdev/Testing
LD_LIBRARY_PATH iccDEV build library directories

Mount additional profiles read-only and list them through
ICCDEV_PROFILE_DIRS:

docker run --rm -p 127.0.0.1:8080:8080 \
  -v "$PWD/profiles:/profiles:ro" \
  -e ICCDEV_PROFILE_DIRS=/profiles \
  ghcr.io/internationalcolorconsortium/iccdev-mcp:latest rest

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "iccdev": {
      "command": "iccdev-mcp",
      "env": {
        "ICCDEV_TOOLS_DIR": "/path/to/iccDEV/Build/Tools"
      }
    }
  }
}

VS Code (Copilot)

Add to .vscode/mcp.json:

{
  "servers": {
    "iccdev": {
      "command": "iccdev-mcp"
    }
  }
}

Remote (SSE transport)

iccdev-mcp --transport sse --port 8080

Tools

Python-Native (5) -- always available

Tool Description
inspect_header ICC profile header (22 fields + 6 computed names)
color_transform Multi-profile color transform via CMM
roundtrip_delta Round-trip fidelity measurement (delta-E)
icc_sig_to_str 4-byte ICC signature to string
enum_spaces List all 32 ICC color space identifiers

CLI-Backed (16) -- iccMCP

Tool CLI Binary Description
dump_profile iccDumpProfile Full profile text dump
profile_to_xml iccToXml ICC to XML conversion
xml_to_profile iccFromXml XML to ICC conversion
profile_to_json iccToJson ICC to JSON conversion
json_to_profile iccFromJson JSON to ICC conversion
round_trip_test iccRoundTrip Round-trip transform fidelity
tiff_dump iccTiffDump TIFF metadata + embedded ICC
jpeg_dump iccJpegDump JPEG metadata + embedded ICC
png_dump iccPngDump PNG metadata + embedded ICC
from_cube iccFromCube .cube LUT to ICC profile
apply_profiles iccApplyProfiles Multi-profile TIFF transform
apply_named_cmm iccApplyNamedCmm Named color CMM
create_link iccApplyToLink Device link creation
v5_to_v4 iccV5DspObsToV4Dsp v5 display to v4 conversion
spec_sep_to_tiff iccSpecSepToTiff Spectral separation
apply_search iccApplySearch Search-based transform

Utility (2)

Tool Description
health_check Server status and tool availability
list_available_profiles Browse ICC test profiles

Environment Variables

Variable Description
ICCDEV_TOOLS_DIR Path to iccDEV CLI tool binaries
ICCDEV_TESTING_DIR Path to iccDEV Testing/ profiles directory
ICCDEV_PROFILE_DIRS Additional profile search directories (colon-separated)

Development

# Install for development
cd iccdev-mcp
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

# Run server (stdio)
python -m iccdev_mcp.server

License

BSD 3-Clause. See LICENSE.md.

Metadata

Metadata

Assignees

Labels

DockerDockerfile, container, or image workflow changesDocumentationDocumentation-only or documentation-related changeMCPMCP subject matterPythonPython related contentfeatureFeature request or enhancement

Type

No fields configured for Task.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions