UnityAssetDB logo

UnityAssetDB

Organization
song-chaoyang

๐Ÿ—„๏ธ Every Unity asset reference in one queryable database. Rust + SQLite + tree-sitter. CLI + Web UI + MCP server.

Publishersong-chaoyang
RepositoryUnityAssetDB
LanguageRust
Forks
5
Stars
63
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    UnityAssetDB exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    63 stars and 5 forks from the linked repository.


Why UnityAssetDB?

Unity projects grow into tangled webs of asset dependencies. "Who references this material?" "Is this texture safe to delete?" "Which scenes use this prefab?" โ€” answering these questions by hand means grepping through thousands of YAML files.

UnityAssetDB indexes your entire Unity project into a SQLite database and answers these questions in under 1 millisecond.

$ unityassetdb refs Assets/Materials/Enemy.mat

๐Ÿ“‚ Assets/Materials/Enemy.mat (2 referenced by)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  โ† Assets/Scenes/Game.unity [scene] via depends_on (guid-file)
  โ† Assets/Scenes/Game.unity [scene] via instance_of
2 reference(s) total

โœจ Key Features

FeatureWhat it does
๐Ÿ”— Reference TrackingTrace any asset's incoming/outgoing dependencies via GUID resolution
๐ŸŒณ Hierarchy BrowserNavigate GameObject trees, component bindings, Transform parent/child
๐Ÿ”ฌ C# Script Analysistree-sitter powered class/method extraction + MonoBehaviour binding
๐Ÿ“ Virtual File SystemQuery assets as virtual paths with glob, grep, and tree listing
๐ŸŒ Interactive Web UIvis.js dependency graph, click-to-explore, REST API
๐Ÿ”Œ MCP ServerJSON-RPC over stdio โ€” integrate with any MCP-compatible tool
โšก Blazing FastRust + SQLite + rayon parallelism โ€” 10,000+ files/sec
๐Ÿ“ฆ Zero DependenciesSingle static binary, no runtime needed

Quick Start

Install

bash
# Download pre-built binary (macOS / Linux / Windows)
# โ†’ https://github.com/song-chaoyang/UnityAssetDB/releases

# Or build from source
cargo install --git https://github.com/song-chaoyang/UnityAssetDB

3 Steps to Go

bash
# 1๏ธโƒฃ  Index your Unity project
unityassetdb index build /path/to/your/unity/project

# 2๏ธโƒฃ  Query references
unityassetdb refs Assets/Materials/Enemy.mat -p /path/to/project

# 3๏ธโƒฃ  Launch the Web UI
unityassetdb serve /path/to/project --port 8089

Live Progress Feedback

The 8-phase pipeline renders a live multi-bar display โ€” weighted overall percentage + ETA, a phase bar with throughput and live extraction stats, and the file currently being processed:

โ ธ [00:00:12] โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  48% 3/8 extract ยท ETA 08s
โ น โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘  extract 31,422/54,120 ยท 2,615/s ยท 892K objs ยท 1.2M refs ยท 2.3 GB
  ๐Ÿ“„ Assets/Scenes/MainMenu.unity

When it finishes, you get a per-phase timing breakdown so you always know where the time went:

  phase breakdown:
    scan          1.8s  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
    register      0.6s  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
    extract      14.2s  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
    assets        0.9s  โ–ˆโ–ˆ
    graph         2.7s  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
    bind          0.4s  โ–ˆ
    vfs           1.1s  โ–ˆโ–ˆ
    publish       0.2s
โœ… Index built in 21.4s: .unityassetdb/index.db (54,120 files, 12,830 assets, 8,221 scripts bound, 2,529 files/s)

Demo: Reference Query


CLI Reference

unityassetdb <COMMAND>

Commands:
  index   Index management (build / sync / status)
  refs    Query the reference graph for a VFS path
  ls      List VFS entries under a path
  glob    Find VFS entries matching a glob pattern
  grep    Search content within VFS entries
  read    Read content of a VFS entry
  serve   Start web server with interactive graph UI
  mcp     Start MCP server (JSON-RPC over stdio)
  help    Print this message

Common Queries

bash
# Who references this material? (incoming)
unityassetdb refs Assets/Materials/Enemy.mat -p /project

# What does this scene depend on? (outgoing)
unityassetdb refs Assets/Scenes/Game.unity -p /project --direction out

# Filter to file-level results only
unityassetdb refs Assets/Materials/Enemy.mat -p /project --filter File

# Browse the asset tree
unityassetdb ls Assets -p /project --depth 2

# Find all prefabs
unityassetdb glob "*.prefab" -p /project

# Search for a class name in indexed content
unityassetdb grep "PlayerController" -p /project

# View index statistics
unityassetdb index status /project

Architecture

How It Works

UnityAssetDB runs a 7-stage indexing pipeline:

StageWhat happens
1. DiscoveryWalk Assets/, Packages/, ProjectSettings/ with walkdir. Parse .meta files for GUIDs.
2. ExtractParse Unity YAML (.unity, .prefab, .mat, .asset) with serde_yaml. Parse C# with tree-sitter. Extract objects, references, declarations.
3. ResolveBuild entity graph: GameObjectโ†’Component edges, Transform hierarchy, prefab instance links, script-to-symbol bindings.
4. MaterializeProject entities into a Virtual File System (VFS) with queryable paths and edges.
5. FinalizeIntegrity checks โ€” verify no broken VFS edges.
6. PublishAtomic SQLite database swap-in.
7. SyncIncremental update โ€” only re-index changed files based on content hash.

SQLite Schema โ€” 19 Tables

LayerTablesPurpose
Filesfiles, assemblies, assembly_referencesTrack every file + .meta GUID
YAMLyaml_objects, yaml_referencesParsed Unity YAML structure + references
C#cs_declarations, cs_mentions, symbols, symbol_edgestree-sitter extracted code structure
Graphassets, entities, entity_edges, entity_symbol_edgesEntity relationship graph
VFSvfs_entries, vfs_edgesVirtual file system for querying
Metaprojects, index_diagnostics, rebuild_summaryIndex metadata

VFS Edge Types

EdgeMeaning
child_ofDirectory โ†’ file, parent โ†’ child
defined_inNode โ†’ file where it's defined
depends_onFile โ†’ referenced file (via GUID)
instance_ofPrefab instance โ†’ source prefab
binds_toComponent โ†’ C# script class
refsGeneral reference edge

REST API

When running serve, these endpoints are available:

EndpointDescription
GET /api/statusIndex statistics (file count, asset count, etc.)
GET /api/ls?path=...&depth=NList VFS children
GET /api/refs?path=...&direction=in&filter=ALLReference query
GET /api/glob?pattern=...&entry_type=ALLGlob search
GET /api/grep?pattern=...&path=...Content search
GET /api/read?path=...Read VFS entry content
GET /api/graph?path=...Subgraph for visualization (nodes + edges)

MCP Server

UnityAssetDB can run as an MCP (Model Context Protocol) server, exposing 7 tools via JSON-RPC over stdio.

bash
unityassetdb mcp

Configuration

Add to your MCP client config file (e.g. claude_desktop_config.json):

json
{
  "mcpServers": {
    "unityassetdb": {
      "command": "/path/to/unityassetdb",
      "args": ["mcp"]
    }
  }
}

Available Tools

ToolDescription
index_buildBuild a fresh index for a Unity project
index_statusShow index statistics
refsQuery reference graph (in/out, with filter)
lsList VFS entries
globGlob pattern search
grepContent search
readRead VFS entry content

Supported File Types

ExtensionKindParser
.unity, .sceneSceneUnity YAML
.prefabPrefabUnity YAML
.matMaterialUnity YAML
.assetScriptableObjectUnity YAML
.controller, .overrideControllerAnimatorUnity YAML
.animAnimationUnity YAML
.vfxVisual EffectUnity YAML
.csC# Scripttree-sitter
.asmdef, .asmrefAssembly DefinitionJSON
.shader, .hlslShaderText
.fbx, .png, .wav, ...BinaryHash only

Tech Stack

ComponentTechnologyWhy
LanguageRustZero-cost abstractions, memory safety, single binary
Databaserusqlite (bundled)Recursive CTE queries, WAL mode, zero-config
C# Parsertree-sitterIncremental parsing, AST extraction
YAML Parserserde_yamlUnity multi-document YAML support
Web Serveraxum + tokioAsync, type-safe routing
ParallelismrayonData-parallel file extraction
Graph UIvis.jsInteractive network visualization

Benchmarks

Measured on a real Unity project (URP + TextMeshPro, Apple Silicon MacBook):

Project SizeFilesIndex TimeThroughputDB Size
Test fixture10<0.1sโ€”48 KB
Real project (Assets + PackageCache)12,96913.6s~950 files/s185 MB

Indexing covers Assets/, Packages/, ProjectSettings/ and Library/PackageCache/ (built-in package scripts resolve too). Includes indexing file bodies for grep/read.


Development

bash
cargo test      # Run all 32 tests
cargo clippy    # Lint
cargo fmt       # Format
cargo bench    # Benchmarks

Project Structure

src/
โ”œโ”€โ”€ model/          # Data types (FileKind, AssetKind, EntityKind, EdgeKind)
โ”œโ”€โ”€ discovery/      # File system scanning + .meta parsing
โ”œโ”€โ”€ extract/         # Unity YAML + C# tree-sitter parsers
โ”œโ”€โ”€ resolve/        # Entity graph construction + script binding
โ”œโ”€โ”€ materialize/    # VFS projection
โ”œโ”€โ”€ db/              # SQLite schema + connection management
โ”œโ”€โ”€ query/           # refs, ls, glob, grep, read
โ”œโ”€โ”€ cli/             # CLI + MCP command handlers
โ”œโ”€โ”€ server/          # axum REST API
โ””โ”€โ”€ web/             # Embedded HTML/JS/CSS

tests/
โ”œโ”€โ”€ fixtures/        # Minimal Unity test project
โ””โ”€โ”€ integration_test # 32 tests: unit + integration

Download

Pre-built binaries available on the Releases page:

PlatformDownload
macOS (Apple Silicon)unityassetdb-aarch64-apple-darwin.tar.gz
macOS (Intel)unityassetdb-x86_64-apple-darwin.tar.gz
Linux (x86_64)unityassetdb-x86_64-unknown-linux-gnu.tar.gz
Windows (x86_64)unityassetdb-x86_64-pc-windows-msvc.zip

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Star History

Star History Chart

License

MIT ยฉ 2026

Installation

TypingMind
{
  "mcpServers": {
    "unityassetdb": {
      "command": "unityassetdb",
      "args": [
        "mcp"
      ]
    }
  }
}

Use UnityAssetDB MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once UnityAssetDB is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add UnityAssetDB as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the UnityAssetDB MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "unityassetdb": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the UnityAssetDB MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the UnityAssetDB MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use UnityAssetDB to help me with this task?
UnityAssetDB
Sure. I read it.
Here is what I found using UnityAssetDB.

Frequently asked questions

What is the UnityAssetDB MCP server used for?

UnityAssetDB is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use UnityAssetDB MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use UnityAssetDB with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use UnityAssetDB MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With UnityAssetDB connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect UnityAssetDB MCP to TypingMind?

UnityAssetDB runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does UnityAssetDB MCP provide in TypingMind?

UnityAssetDB exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use UnityAssetDB MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If UnityAssetDB requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter ๐Ÿ‘‡