Skip to main content
Glama
Art Asset MCP

Art Asset MCP

README.md
# Art Asset MCP · 0.1.0

An open-source, read-only MCP server that enables AI agents to discover, preview, filter and compare 3D models, PBR materials and HDRIs across asset libraries.

[简体中文](README.zh-CN.md) · [Test report](docs/TEST_REPORT.md) · [Security audit](docs/SECURITY_AUDIT.md)

**Asset discovery and screening only.** Actual asset downloads and use belong to other tools. This project's MIT license grants no additional rights to third-party assets. No Blender, game project, AI model, import/export, shell execution, purchase, upload or telemetry is included.

Powered by Poly Haven. Poly Haven is not affiliated with or an endorser of this project.

## Run

Install [uv](https://docs.astral.sh/uv/getting-started/installation/), then from this directory:

```sh
uv sync --frozen --python 3.12
uv run --frozen art-asset-mcp                         # stdio
uv run --frozen art-asset-mcp --transport http        # http://127.0.0.1:8765/mcp
curl http://127.0.0.1:8765/health
```

Windows PowerShell uses the same uv commands. Environment variables use `$env:NAME = 'value'`, rather than `export NAME=value`. Python code and CI target macOS, Linux and Windows; local execution was tested on macOS only.

Poly Haven needs no credential. Sketchfab is optional: set `SKETCHFAB_API_TOKEN` in the **server process environment**, using your secret manager. `.env.example` contains names only; the server does not automatically load `.env`. Missing credentials produce a source-specific error while Poly Haven continues. Public Sketchfab endpoints exist, but this MVP deliberately requires a token for its adapter; this is not a claim that every Data API endpoint requires authentication. Download API and OAuth download grants are never used.

## Exactly four tools

All arguments are wrapped in `request`. All tools set `readOnlyHint=true`, `destructiveHint=false`, `idempotentHint=true`, `openWorldHint=true`.

| Tool | Request | Result |
|---|---|---|
| `search_assets` | query, sources, filters, page, page_size, preview_count | Ranked candidates, per-condition match/unknown/mismatch, source errors and previews |
| `get_asset_details` | source, asset_id | Unified metadata with evidence URLs and null/unknown fields |
| `get_asset_previews` | source, asset_id, count | Real official thumbnail, attribution, URL and MCP image; legal fallback links |
| `compare_assets` | assets (up to 10 source/id pairs), query, filters, preview_count | Comparable metadata and explained technical/keyword scores |

Example `search_assets` tool arguments:

```json
{
  "request": {
    "query": "深色胡桃木地板 / dark walnut wooden floor PBR",
    "sources": ["polyhaven", "sketchfab"],
    "filters": {"asset_type": "texture", "min_resolution": 4096, "license": "CC0"},
    "page": 1,
    "page_size": 10,
    "preview_count": 3
  }
}
```

Types are `texture`, `model`, `hdri`; sources are `polyhaven`, `sketchfab`. Filters also accept categories, tags, formats, downloadable, max_polygons, rigged, animated, and exact attribute key/value pairs. Empty filters do not assert any technical condition. Unknowns are excluded from explicit filters unless `include_unknown=true`; they still score zero and remain marked unknown.

Search understands a small, documented Chinese/English synonym vocabulary (`ranking.py`), not unrestricted natural-language semantics. Ranking is the fraction of expanded words found in provider metadata. Partial lexical matches can be unsuitable: a coffee table is not proof of a bedside table; warm lighting or artistic quality must be visually evaluated by the client. No visual-quality score is produced.

Default: 10 candidates and at most 3 thumbnails. Maximum: 20 candidates/page, 20 pages, 3 images/result. Deduplication uses `(source, asset_id)` only; we do not claim to detect the same artwork across libraries. Poly Haven uses a five-minute in-memory public metadata cache. Sketchfab searches up to 72 candidates through bounded pagination; candidate-window truncation is reported. Format/downloadability enrichment is limited to 24 Poly Haven candidates per call. Pagination is deterministic over the currently available candidate window, not a durable snapshot.

Details contain all requested fields, including author, license/license_url, source page, preview_urls, formats, resolution, texture maps, polygon count, dimensions, rigged, animated, downloadable, verified_metadata and unknown_fields. Resolution is native pixel dimensions in catalog results, and available resolution-edge presets in detailed Poly Haven file metadata. Dimensions preserve raw values with `unit:null` when units are not verified. `verified_metadata` identifies the API/source supporting each value; it is not independent verification of an artist's claims.

Poly Haven `/files/{id}` is used only for **JSON format/resolution metadata**. Binary URLs are neither fetched nor returned. Preview images are limited to 4 MiB input, 8 million decoded pixels, 768×768 output, and 512 KiB encoded JPEG; metadata/EXIF is removed by re-encoding. Sketchfab currently returns official thumbnail links only, pending redistribution-terms review. Metadata and images are untrusted third-party data, never instructions.

## Clients and deployment

- [Codex](docs/CODEX.md): actual CLI connection and image interpretation tested.
- [ChatGPT](docs/CHATGPT.md): instructions reviewed; account-level test Untested.
- [Claude](docs/CLAUDE.md): Untested.
- [Grok](docs/GROK.md): Untested.
- [Independent Secure MCP Tunnel](docs/TUNNEL.md): private testing instructions, not provisioned.
- [Deployment and owner-only release](docs/DEPLOYMENT.md).

HTTP is stateless, binds to loopback by default and rejects unapproved Host/Origin headers. It has no built-in OAuth server. Remote hosting requires a separate HTTPS/auth gateway, rate limits and egress restrictions; do not expose a personal computer. `ART_ASSET_ALLOWED_HOSTS` accepts exact deployment hostnames. Docker Compose binds the published port to loopback and uses a non-root user, read-only filesystem and dropped capabilities. Container runtime validation is still outstanding.

## Test

```sh
uv run --frozen pytest -q -m 'not integration'
uv run --frozen ruff check src tests scripts
uv run --frozen ruff format --check src tests scripts
uv build
# Explicit network opt-in; no actual asset files fetched:
ART_ASSET_LIVE_TEST=1 uv run --frozen pytest -q -m integration
uv run --frozen python scripts/live_probe.py
uv run --frozen python scripts/protocol_probe.py
uv run --frozen python scripts/inspector_probe.py  # Node/npm required
```

On PowerShell set `$env:ART_ASSET_LIVE_TEST = '1'` before the integration command. Artifacts are local and gitignored; normal server usage saves no search history. See the reports for tested vs untested features and current limitations. Nothing in this repository automatically publishes a package, server, plugin or release.

TDQS

A3.7/5.0

Scored across 4 tools

Disambiguation5/5

Each tool maps to a distinct verb+resource: search (query), details (metadata), previews (thumbnails), compare (differential analysis). The two 'get_asset_*' tools could superficially overlap since both key off source+asset ID, but the descriptions make the metadata-vs-image split unambiguous, including the explicit 'never accepts a URL' constraint.

Naming Consistency5/5

All four names follow a consistent snake_case verb_noun pattern (get_/search_/compare_ + asset(s)). The only nit is singular 'asset' in get_asset_details vs the plural asset-oriented search/compare, which is a natural noun-phrase difference rather than a convention break.

Tool Count4/5

Four tools is lean but each earns its place for an asset discovery surface: find, inspect, preview, compare. It sits just under the comfortable 5-15 band, so a fifth tool (e.g. listing supported libraries/sources) would round it out.

Completeness4/5

Discovery, metadata, preview, and license comparison cover the core read-only lifecycle, and downloads are deliberately out of scope. Minor gaps remain: no tool to enumerate supported sources/libraries or categories, and no pagination/cursor control for broad searches.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues