Skip to main content
Glama

Genio520 ISP MCP

An MCP development bridge for Genio 520: inspect and edit a local source workspace, build a Camera2 diagnostic APK, deploy it through ADB, and retrieve YUV images with capture metadata.

Uses standard Node.js and the official MCP TypeScript SDK. No code indexer, AI runtime, MediaTek BSP, or vendor SDK binary is included. Each user connects their own Android board to their own Windows PC.

Install

Install Node.js 22 or later, Git, JDK 21, and Android SDK platform-tools, platform 35 and build-tools 35.0.0. Android Studio's JBR can supply the JDK. Source-only tools can run without a board; camera build/deploy currently requires Windows.

git clone https://github.com/eric612/Genio520_ISP_MCP.git
cd Genio520_ISP_MCP
npm ci --ignore-scripts
node bin/genio-dev-mcp.mjs doctor

Set GENIO_ANDROID_SDK and GENIO_JDK for custom installations. With exactly one ADB device, no serial is needed; set GENIO_SERIAL for multiple devices. The doctor reports missing prerequisites; it does not install SDKs or flash firmware.

Related MCP server: flutter-bridge-mcp

Local MCP client

Copy examples/mcp.local.json, replace the workspace path, and configure your client to launch it. --write enables edits and commits; omit it for inspection and camera validation. Use an absolute Node executable path if the client's default is older than 22.

{
  "mcpServers": {
    "genio_dev": {
      "command": "node",
      "args": ["D:/dev/Genio520_ISP_MCP/bin/genio-dev-mcp.mjs", "--workspace", "D:/dev/Genio520_ISP_MCP", "--write"]
    }
  }
}

Ask the AI to list sources, read a file, edit it using the returned SHA256, inspect the diff, then build and validate. Edits are restricted to allowed source paths within the workspace. New files require existing parent directories. There is no general shell tool. Building modified source executes it with the local user's permissions; use a workspace and AI client you trust.

Tool

Function

list_source_files

List allowed source files

read_source_file

Read UTF-8 content and SHA256

edit_source_file

Apply unique exact replacements, or create a file with expected_sha256: "NEW"

get_source_diff

Read selected files' Git status and diffs

commit_candidate

Commit exactly selected source files; never push

get_target_info

Inspect ADB, Android, ABI and board build

get_camera_capabilities

Read HAL-advertised metadata

build_camera_probe

Build diagnostic APK and return hashes

run_camera_validation

Run capture, controls, inventory, RAW/YUV, JPEG, WB, NR-control or static NR-sequence suite; return a job ID

get_job

Check asynchronous validation status

get_report

Read summary or full report

evaluate_wb

Compare a completed WB run in a fixed ROI; save diagnostic/candidate report with readback and restoration checks

evaluate_nr

Measure a completed static NR sequence in a fixed ROI; report temporal Y noise, drift, gaps and restoration without installing a profile

Browser AI

Installing the repository alone does not connect a browser AI to the PC. See browser connection instructions. A token-protected, loopback-only Streamable HTTP endpoint is available; it is not an OAuth implementation or a public shared service.

For ChatGPT, the documented private connection is Secure MCP Tunnel, which can forward to this stdio server. It requires the user's own tunnel/account permissions and runtime key. No shared credentials are included. Account-specific browser testing is separate from local MCP protocol testing.

Validate

See validated behavior and remaining scope.

npm test
node tools/mcp_smoke.mjs --run

The camera test closes the existing camera app, installs the diagnostic app, grants it CAMERA permission, wakes the board and captures YUV. The controls suite collects 3 frames for each of 7 cases: auto, two exposures, NR OFF/FAST and linear/lifted tone curves. Each case saves its first frame as NV21 and a viewing JPEG. Reports and the exact APK are stored in outputs/camera-runs/<run-id>/.

Control readback does not prove image quality, temporal NR implementation, hardware HDR, sustained frame rate, power or end-to-end latency. WDR/Defog/TNR implementations and other projects' data are not included.

The ISP inventory, RAW capture and NR-control suites inspect the control surface before integrating enhancement algorithms. On the tested Genio 520/Android 15 build, full-resolution RAW16/DNG with timestamp-matched YUV and independent standard NR/vendor 3DNR control readback passed. Internal ISP stage export and noise-reduction quality remain unverified.

Version 0.3.0 adds simple WB tuning, native JPEG capture, RAW development and live preview. WB uses bounded R/Ge/Go/B probes with fixed captured CCM/exposure, compares the same neutral ROI and returns to AUTO. A physically changed camera or scene needs a new baseline. Python RAW inspection and scrcpy preview are optional local tools; neither is required by the MCP server.

Version 0.4.0 adds static lowlight NR sequences, evaluation and optional Windows scheduling: 64 matched YUV samples per manual NR/3DNR case, fixed current-light exposure/color, and explicit drift/gap/return checks. The server exposes 13 tools. Offline tests and APK compilation pass; the new sequence's on-board behavior and lowlight quality remain pending hardware validation.

Version 0.4.1 adds an optional external algorithm replay harness for hash-pinned NV21 inputs, source/recipe snapshots, independent decoder checks and deterministic WDR/chroma reference outputs. It does not ship external algorithm code or claim Android algorithm execution or approved visual quality.

For repeated builds, keep the same local development keystore. When moving a source checkout, set GENIO_CAMERA_KEYSTORE to the original development.keystore (development alias/password as generated by this project's build script). Different signatures cannot update the same installed app. The tool reports that installation error; it does not uninstall the app or erase its captures. Never commit or distribute the keystore.

The standalone native ARM64 deployment probe is a saturating multiply-by-two fixture, not an ISP algorithm.

License

Public MCP source is MIT licensed. Dependency copyright and license texts are preserved in THIRD_PARTY_NOTICES.md. Android/JDK tools are installed separately under their own terms. No official board photographs, SDK binaries, camera captures or signing keys are distributed.

Available Tools

11 tools
build_camera_probeA

Build the diagnostic Camera2 APK using the existing local Android SDK/JDK. Returns source and APK hashes.

Inputs: no named parameters.

commit_candidateA

Commit exactly the listed individual Genio source files. Never operates on IMG_ENHANCE or TTC, never pushes, and refuses unrelated staged files.

Inputs: files (required), message (required).

edit_source_fileA

Edit one source file using exact unique replacements and the SHA256 returned by read_source_file. NEW creates a file exclusively in an existing directory using content. Requires source write opt-in; never deletes files.

Inputs: path (required), expected_sha256 (required), content, replacements.

get_camera_capabilitiesA
Read-only

Read HAL-advertised camera metadata. Availability is distinct from verified control effects.

Inputs: no named parameters.

get_jobC
Read-only

Read asynchronous build/capture job status.

Inputs: job_id (required).

get_reportB
Read-only

Read a local validation report and artifact paths. Summary is the default.

Inputs: run_id (required), full.

get_source_diffA
Read-only

Read Git status plus unstaged and staged changes for explicitly selected source files.

Inputs: files (required).

get_target_infoA
Read-only

Read Genio Android/ABI/build and ADB status. No system changes.

Inputs: no named parameters.

list_source_filesB
Read-only

List allowed source files in the configured workspace. Does not require a board or Trail.

Inputs: limit.

read_source_fileA
Read-only

Read one allowed UTF-8 source file, including its SHA256 for conflict checking.

Inputs: path (required).

run_camera_validationA

Install the built diagnostic APK and start YUV capture/control validation. Temporarily closes the built-in camera app, wakes the board, grants this diagnostic app CAMERA permission, and returns a job ID. Files are saved per run.

Inputs: suite, camera_id.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 11 tools

    Disambiguation4/5

    Each tool has a fairly distinct role: read-only target info, camera capability probing, build, run validation, job status, and report retrieval form a clear pipeline, while the source tools (list/read/edit/diff/commit) are well separated. Minor potential confusion exists between get_job (async job status) and get_report (validation report contents), and between commit_candidate and get_source_diff, but descriptions differentiate them adequately.

    Naming Consistency5/5

    Every tool follows a consistent verb_noun snake_case pattern (get_target_info, build_camera_probe, run_camera_validation, commit_candidate, list_source_files, read_source_file, edit_source_file, get_source_diff). No mixed conventions or vague single-word names.

    Tool Count5/5

    Eleven tools is well within the ideal 3-15 range and each maps to a concrete step in the camera-validation or source-editing workflow. Nothing seems redundant or missing at the count level.

    Completeness4/5

    The surface covers the core lifecycle: board inspection, build, run validation, job polling, report reading, plus a full source read/edit/diff/commit loop. Gaps are minor and largely intentional (no delete/restore source, no job cancellation, no push), which an agent can work around within stated constraints.

    Related MCP Connectors

    Related MCP Servers