power-instrument-data-to-allotrope — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited power-instrument-data-to-allotrope (MCP Server) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server that provides tools for working with Allotrope Simple Model (ASM) data formats. This server enables AI assistants to validate instrument data files against ASM schemas and discover available ASMs.
Allotrope is a data standards framework for laboratory and analytical instrument data. The Allotrope Simple Model (ASM) provides a standardized JSON format for representing instrument data, making it easier to integrate, analyze, and share scientific data across different systems and organizations.
This MCP server provides the following tools:
purl.allotrope.org to the local filesystem at a path mirroring the URI structureAdd the following configuration to your MCP client to download and install the server.
{
"mcpServers": {
"allotrope-mcp-server": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/aws-samples/sample-laboratory-data-transformation-mcp.git",
"allotrope-mcp-server"
],
"disabled": false,
"autoApprove": [],
"disabledTools": []
}
}
}# Clone the repository
git clone <your-repo-url>
cd allotrope-mcp-server
# Install dependencies
uv sync
# Run the server
uv run allotrope-mcp-serversequenceDiagram
participant Client as MCP Client<br/>(AI Assistant / IDE)
participant Server as allotrope-mcp-server<br/>(FastMCP / stdio)
participant FS as Local Filesystem
participant Ref as model_reference.json<br/>(bundled)
participant PURL as purl.allotrope.org<br/>(HTTPS)
Note over Client,Server: Trust Boundary: stdio (no auth)
Client->>Server: list_asms()
Server->>Ref: read model_reference.json
Ref-->>Server: ASM name → description map
Server-->>Client: JSON result
Client->>Server: describe_asm(model_name)
Server->>Ref: lookup model_name
Ref-->>Server: metadata (URIs, description)
Server-->>Client: JSON result
Client->>Server: validate_asm_schema(asm_document_path, asm_schema_path)
Note over Server,FS: Path traversal risk (T1) — sanitised by M1
Server->>FS: read asm_document_path
FS-->>Server: ASM JSON document
Server->>FS: read asm_schema_path
FS-->>Server: JSON Schema
Server->>Server: validate document against schema
Server-->>Client: validation result
Client->>Server: fetch_asm_document(asm_document_uri, output_dir)
Note over Server: URI prefix check (PURL_ORIGIN allowlist — A002)
Note over Server,PURL: TLS encrypted (CN001) — MitM risk (T5)
Server->>PURL: GET asm_document_uri (HTTPS)
PURL-->>Server: ASM JSON document
Note over Server,FS: Arbitrary write risk (T2) — sanitised by M1
Server->>FS: write to output_dir/<path>
Server-->>Client: saved file pathThis repo includes a Kiro Power in the power-instrument-data-to-allotrope/ folder. The power bundles the MCP server configuration and a guided workflow for converting laboratory instrument data into valid ASM JSON.
#### Install the Power
View: Show Powers from the command palette).power-instrument-data-to-allotrope/ directory from this repo.allotrope-mcp-server MCP server automatically using the bundled mcp.json.#### Use the Power
Once installed, open a new chat and type / to browse available powers. Select Instrument Data to Allotrope and provide:
input_path — path to your instrument data fileasm_model — the target ASM model name (e.g. plate-reader)output_path _(optional)_ — destination for the generated ASM JSON (defaults to <input_path>.asm.json)Kiro will guide you through schema discovery, data parsing, code generation, and validation against the ASM schema.
The repo also includes an Agent Skill at .agents/skills/instrument-data-to-allotrope/SKILL.md. Skills follow an open standard and can be imported into Kiro (or any compatible AI tool) independently of the Power.
Note: The skill requires the allotrope-mcp-server MCP server to be connected. Use the Power (above) to configure it automatically, or add the server manually via the MCP settings.Once configured in Kiro, you can use natural language to interact with the tools:
You: Validate tests/testdata/plate_reader_weyland_yutani_valid.json
against tests/testdata/plate_reader.embed.schema.jsonKiro will use the validate_asm_schema tool to check the document and report any validation errors.
You: Download the plate reader schema document to my projectKiro will use the fetch_asm_document tool to download the raw JSON document from purl.allotrope.org and save it locally at a path that mirrors the URI structure.
Returns the full metadata for a specific ASM model by name. Looks up the model in the bundled model_reference.json and returns its description, manifest URL, JSON schema URL, and data instance example URLs as a JSON string.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
model_name | string | Yes | The ASM model identifier to look up (e.g., "absorbance", "balance"). Use list_asms to discover valid names. |
Returns: A JSON object with the model metadata on success, or an object with an error key and a valid_model_names list if the model name is not recognised.
Example response (success):
{
"description": "...",
"asm_manifest": "http://purl.allotrope.org/manifests/...",
"asm_json_schema": "http://purl.allotrope.org/json-schemas/...",
"asm_data_instance_examples": ["http://purl.allotrope.org/test/..."]
}Downloads a raw ASM JSON document from the Allotrope PURL repository (purl.allotrope.org) and saves it to the local filesystem at a path that mirrors the URI structure. $ref references are not resolved — the document is saved exactly as received.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
asm_document_uri | string | Yes | Fully-qualified URI starting with http://purl.allotrope.org (case-sensitive). |
output_dir | string | No | Base directory for saving the document. Defaults to the current working directory. |
Behavior:
http://purl.allotrope.org (case-sensitive) — no network call is made on rejectionpath key on success, or an error key on failureExample response (success):
{"path": "/absolute/path/to/json-schemas/adm/plate-reader/REC/2025/12/plate-reader.embed.schema"}Lists all available Allotrope Simple Models (ASMs) with their descriptions. Reads from the bundled model_reference.json file and returns a mapping of ASM IDs to descriptions.
Parameters: None
Returns: A JSON object mapping ASM identifiers to their descriptions, or an error key on failure.
Validates an ASM JSON document against its corresponding JSON schema.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
asm_document_path | string | Yes | Path to the ASM JSON document to validate |
asm_schema_path | string | Yes | Path to the ASM JSON schema to validate against |
Validates a field mapping file produced by a custom converter script. Reads the JSON file and compares each entry's source_value against its asm_value using string equality (primary) and numeric float equality (fallback). Returns a structured result with match counts, mismatches, and a summary message.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
field_map_path | string | Yes | Path to the field mapping JSON file (the _map.json produced by the converter) |
Returns: A JSON object with matched, total, mismatches, and message keys on success, or an error key on failure.
Example response (all match):
{
"matched": 19,
"total": 19,
"mismatches": [],
"message": "The conversion script accurately reproduced all 19 field(s) from the raw data file."
}Example response (with mismatches):
{
"matched": 17,
"total": 19,
"mismatches": [
{
"source_field": "Recorded",
"source_value": "2023-10-26:11:15:40",
"asm_field": "measurement time",
"asm_value": "2023-10-26T11:15:40+00:00",
"unit": ""
}
],
"message": "The conversion script needs to be updated to address 2 mismatched field(s)."
}Note: Entries whereasm_valueis an ISO 8601 normalised form ofsource_value(e.g. timestamp conversion) will appear as mismatches. This is intentional — the tool surfaces all value divergences so the developer or AI agent can review whether they are acceptable.
validate_asm_schema and fetch_asm_document resolve and sanitise all caller-supplied file paths. Paths that escape the intended working directory are rejected before any file I/O occurs.fetch_asm_document enforces a hard-coded http://purl.allotrope.org URI prefix check. Any URI that does not match this origin is rejected without making a network call.validate_asm_schema enforces a maximum file size before reading documents or schemas into memory, preventing resource exhaustion from oversized inputs.$ref cycles.purl.allotrope.org or read from local files is returned to the AI assistant. Malicious content in those files could attempt to influence subsequent assistant actions (indirect prompt injection). Only point the server at files and URIs you trust. See Prompt Injection below for details.uv.lock. Verify that your Python environment has not been tampered with before running the server.The MCP server passes tool arguments supplied by an AI assistant directly to filesystem and network operations. Because the server cannot distinguish a legitimate assistant request from one that has been manipulated by malicious content, all MCP tool arguments must be treated as untrusted input.
Indirect prompt injection can occur when:
validate_asm_schema contains embedded instructions that the AI assistant interprets as commands.purl.allotrope.org by fetch_asm_document contains text that causes the assistant to invoke further tool calls with attacker-controlled arguments.Recommended mitigations for MCP client operators:
uv run pytest --cov --cov-branch --cov-report=term-missinguv run ruff check .
uv run ruff format .uv run pyrightThis project is licensed under the MIT-0 license. See the LICENSE file for details.
The Allotrope Foundation® Simple Models (“ASM”) and other data is collectively licensed under three licenses, depending on intended usage and membership status. Please visit https://gitlab.com/allotrope-public/asm/-/blob/main/LICENSE.md for more information.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.