Skip to main content
Glama
akiraKido

Unity Build Automation MCP

by akiraKido

Unity Build Automation MCP Server

Unity Cloud Build (Build Automation) の REST API を MCP (Model Context Protocol) サーバーとしてラップし、Claude Code から直接ビルド状況の確認・操作を可能にします。

Architecture

Claude Code <--stdio--> MCP Server (Node.js/TypeScript) <--HTTPS--> Unity Build API
                                                                     https://build-api.cloud.unity3d.com/api/v1/

Related MCP server: UniMCP4CC

Setup

Prerequisites

  • Node.js (ES2022+)

  • Unity Build Automation API Key

Install

# npx で直接使う場合(インストール不要)
npx -y unity-build-automation-mcp

# グローバルインストール
npm install -g .

# ローカル開発
npm install

Environment Variables

Variable

Required

Description

UNITY_BUILD_API_KEY

Yes

Unity Build Automation API Key

UNITY_BUILD_ORG_ID

Yes

Organization ID

UNITY_BUILD_DEFAULT_PROJECT

No

Default project name or ID

Claude Code MCP Settings

Claude Code CLI で追加:

claude mcp add unity-build -- npx -y unity-build-automation-mcp

または ~/.claude.json / .mcp.json に手動で追加:

{
  "mcpServers": {
    "unity-build": {
      "command": "npx",
      "args": ["-y", "unity-build-automation-mcp"],
      "env": {
        "UNITY_BUILD_API_KEY": "<your-api-key>",
        "UNITY_BUILD_ORG_ID": "<your-org-id>"
      }
    }
  }
}

ローカルリポジトリから直接使う場合:

{
  "mcpServers": {
    "unity-build": {
      "command": "node",
      "args": ["<path-to-repo>/dist/index.js"],
      "env": {
        "UNITY_BUILD_API_KEY": "<your-api-key>",
        "UNITY_BUILD_ORG_ID": "<your-org-id>"
      }
    }
  }
}

Tools

Read Operations

Tool

Description

list_projects

Organization 内のプロジェクト一覧を取得

list_build_targets

プロジェクトのビルドターゲット一覧を取得

list_builds

ビルド一覧を取得(ステータスでフィルタ可)

get_build

特定ビルドの詳細情報を取得

get_build_log

ビルドログの末尾N行を取得

Write Operations

Tool

Description

start_build

新しいビルドを開始

cancel_build

実行中のビルドをキャンセル

Write operations は Claude Code 側で実行前に確認プロンプトが表示されます。

Usage Examples

ビルド状況の確認:

「最新のビルド状況を見せて」

失敗ビルドの調査:

「失敗したビルドのログを確認して」

ビルドの開始:

「Android の develop ブランチでビルドを開始して」

ビルドターゲットの確認:

「MyProject のビルドターゲット一覧を見せて」

Parameters

ほとんどのツールで project パラメータは省略可能です。省略時はデフォルトプロジェクトが使用されます。プロジェクト名(例: MyProject)または UUID のどちらでも指定できます。

Build Status Values

Status

Description

queued

キュー待ち

sentToBuilder

ビルダーに送信済み

started

ビルド中

restarted

再開

success

成功

failure

失敗

canceled

キャンセル

unknown

不明

Development

npm run dev    # TypeScript watch mode
npm run build  # Build
npm start      # Run server

Project Structure

src/
  index.ts             # Entry point, MCP server setup
  api.ts               # Unity Build API client
  config.ts            # Configuration / env var handling
  types.ts             # TypeScript type definitions
  format.ts            # Output formatting utilities
  tools/
    list-projects.ts
    list-build-targets.ts
    list-builds.ts
    get-build.ts
    get-build-log.ts
    start-build.ts
    cancel-build.ts

License

Private

Available Tools

7 tools
cancel_buildCancel BuildC

Cancel a running build. This is a write operation.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectNoProject ID or name (defaults to the configured default project)
buildtargetYesBuild target ID
build_numberYesBuild number to cancel

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, so 'This is a write operation' merely restates structured data and adds no value. The description omits genuinely useful behavioral context: whether cancellation is reversible, what happens to a build already completed or queued, what state the build ends in, and any permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the action, but the second sentence duplicates the readOnlyHint=false annotation rather than earning its place. Short but not maximally efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with only a readOnlyHint annotation and no output schema, the description should cover side effects, reversibility, and error conditions (e.g., cancelling a non-running build). None of this is present, leaving the agent uncertain about the consequences of invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so buildtarget, build_number, and project are all documented in the schema. The description adds nothing beyond that, which is the correct baseline when the schema carries the full parameter burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Cancel a running build'), which is unambiguous against siblings like start_build or get_build. It does not explicitly contrast itself with alternatives, but the destructive verb makes the distinction obvious.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no when-to-use or when-not-to-use guidance, no prerequisites (e.g., build must be actively running), and does not reference alternatives such as letting a build finish naturally. Usage must be inferred entirely from the name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_buildGet Build DetailsC
Read-only

Get detailed information about a specific build.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectNoProject ID or name (defaults to the configured default project)
buildtargetYesBuild target ID
build_numberYesBuild number

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

readOnlyHint=true already declares this a safe read, and the description adds nothing behavioral beyond that — no note on what fields are returned, whether it errors on a nonexistent build, or how the default project is resolved. It neither contradicts nor enriches the annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler or padding. It is arguably too terse for the information an agent needs, but nothing present is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only lookup with a fully documented schema and no output schema, this is minimally viable. It stops short of clarifying what 'detailed information' contains or how the optional project default behaves, which would help given the absence of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all three parameters are documented in the schema. The description adds no syntax, format, or defaulting detail beyond 'a specific build', so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Get') and resource ('build'), and 'specific' plus the required buildtarget/build_number signals it retrieves a single build, implicitly contrasting with list_builds. It does not distinguish itself from get_build_log, which is the nearest sibling overlap.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Purely a statement of function with no when-to-use guidance, no prerequisites, and no routing to alternatives like list_builds or get_build_log. The agent must infer selection from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_build_logGet Build LogA
Read-only

Get the build log for a specific build. Returns the last N lines to help investigate failures.

ParametersJSON Schema
NameRequiredDescriptionDefault
tailNoNumber of lines from the end to return (default 100)
projectNoProject ID or name (defaults to the configured default project)
buildtargetYesBuild target ID
build_numberYesBuild number

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, so safety is already covered. The description usefully discloses that output is truncated to the last N lines rather than the full log, which is behavioral context beyond the annotation. Beyond that it adds nothing about paging back further or log availability timing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with purpose and then the return behavior. No filler or redundant restatement of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only log retrieval tool with full schema coverage, the description covers purpose, scoping, and truncation behavior adequately; the absence of an output schema means return format is only lightly described, which is a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters including tail, project, buildtarget, and build_number are documented in the schema. The description's 'last N lines' wording reinforces the tail parameter but adds no syntax or format detail beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (get) and resource (build log) scoped to a specific build, and clarifies the return shape (last N lines) for failure investigation. It doesn't explicitly differentiate itself from sibling get_build, which returns build metadata rather than the log, but the log-vs-build distinction is reasonably implied.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'to help investigate failures' implies the intended scenario (debugging a failing build), which is useful context. However, there is no explicit statement of when to use this versus get_build or list_builds, and no exclusions offered, leaving usage to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_buildsList BuildsB
Read-only

List builds for a project. Can filter by build target and status.

ParametersJSON Schema
NameRequiredDescriptionDefault
statusNoFilter by status: queued, sentToBuilder, started, restarted, success, failure, canceled, unknown
projectNoProject ID or name (defaults to the configured default project)
per_pageNoNumber of results (max 25)
buildtargetNoBuild target ID (_all for all targets)_all

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, so safety is covered. The description adds only that filtering exists and that project defaults to the configured default project — useful but thin; it says nothing about result ordering, pagination, or the default page size of 10 beyond what the schema states.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short, front-loaded sentences with no wasted words. It is efficient, though the terseness leaves gaps rather than being optimally informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no required parameters, the description is minimally adequate given 100% schema coverage. However, it omits anything about return shape, pagination, total counts, or ordering, which an agent listing builds would benefit from knowing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all four parameters in detail, including default project and per_page limits. The description names two filters (build target, status) that are already fully specified in the schema, adding little beyond it, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a clear verb+resource ('List builds') and scopes it to a project, plus names the filterable dimensions. It does not explicitly distinguish itself from siblings like list_build_targets or get_build, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states what can be filtered but gives no when-to-use guidance, no exclusions, and no routing to alternatives such as get_build for a single build or list_build_targets for target metadata. Usage context is only implied by the tool name and filter mention.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_build_targetsList Build TargetsA
Read-only

List build targets for a project. Defaults to the configured default project.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectNoProject ID or name (defaults to the configured default project)

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The readOnlyHint=true annotation already establishes this as a safe read. The description adds the useful default-project fallback behavior, but says nothing about result shape, ordering, or empty-result handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with zero padding, and the core action is front-loaded before the default behavior note. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-optional-parameter, read-only list tool with no output schema and full schema coverage, the description covers what an agent needs. It is slightly thin on how 'build targets' differ from builds, but nothing critical is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single 'project' parameter is fully documented in the schema, including the default behavior. The description merely restates that default, adding no format or resolution detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('List build targets') scoped to a project, which is clear enough to separate from list_projects and list_builds. It does not explicitly name the sibling it is not, so the differentiation is left partly to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description notes the default project behavior, which implies when the argument can be omitted, but it gives no explicit guidance on when to use this tool versus list_builds or get_build. Usage is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_projectsList ProjectsA
Read-only

List all projects in the Unity Build Automation organization.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, so the agent knows this is a safe read-only operation. The description adds no further behavioral context such as pagination, return format, or rate limits. With annotations covering the safety profile, the description adds little, but it is not misleading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no wasted words. It clearly states the action and scope, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters, no output schema, and simple read-only behavior, the description is adequate but minimal. It lacks details about what a 'project' contains or whether pagination applies, which could help an agent understand the response. However, for a basic list operation, it covers the essential purpose.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so there is nothing to document. The baseline for zero parameters is 4, and the description does not need to explain parameters. It correctly implies that all projects are listed without filtering.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'List all projects in the Unity Build Automation organization.' It clearly communicates what the tool returns, but it does not differentiate itself from sibling tools like list_build_targets or list_builds, which also use 'list' semantics. Sibling differentiation is absent, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by naming the resource (projects in the organization), but it offers no explicit guidance on when to use this tool versus alternatives. With no parameters, there is little ambiguity, yet it fails to mention any prerequisites or contexts like requiring an organization ID. This is the minimum viable level.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

start_buildStart BuildC

Start a new build for a build target. This is a write operation.

ParametersJSON Schema
NameRequiredDescriptionDefault
cleanNoWhether to perform a clean build
branchNoBranch to build (defaults to the build target's configured branch)
projectNoProject ID or name (defaults to the configured default project)
buildtargetYesBuild target ID

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, and the description's only behavioral claim, 'This is a write operation,' merely restates that. It adds nothing about permissions required, whether the build is asynchronous, whether it can conflict with an in-flight build, or what happens if the target is invalid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the core action. The second sentence is largely redundant with the readOnlyHint annotation, but it costs little and the description is not bloated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a mutation tool with no output schema and no annotations beyond readOnlyHint=false, so the description must carry more weight. It says nothing about what starting a build returns (e.g. a build ID), whether the operation is async, or how to subsequently track the build via get_build — information an agent would need to use this tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and all four parameters (clean, branch, project, buildtarget) are fully documented with defaults in the schema itself. The description adds no parameter-level meaning beyond that, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Start') and resource ('a new build for a build target'), so the agent knows exactly what action is taken. It does not distinguish itself from siblings like cancel_build or get_build, but the purpose itself is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives, no mention of prerequisites (e.g. the target must exist, must not already be building), and no reference to cancel_build as its counterpart. The agent gets a purpose but no routing context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 7 tool updatesv0.0.2
    • First observedcancel_build
    • First observedget_build
    • First observedget_build_log
    • First observedlist_build_targets
    • First observedlist_builds
    • First observedlist_projects
    • First observedstart_build

TDQS

A3.5/5.0

Scored across 7 tools

Disambiguation5/5

Each tool targets a distinct resource and action: listing projects, build targets, or builds; getting build details or logs; and starting or canceling builds. The descriptions clearly differentiate similar-sounding operations like list_build_targets and list_builds.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern (list_, get_, start_, cancel_), with only natural extensions like list_build_targets and get_build_log. No mixed conventions or vague verbs are present.

Tool Count5/5

Seven tools are well-scoped for a build automation server, covering core listing, inspection, and control operations without redundancy. The count sits comfortably within the ideal 3–15 range.

Completeness4/5

The surface covers the essential build lifecycle: listing projects, targets, and builds; retrieving build details and logs; and starting or canceling builds. Minor gaps exist, such as no tool to inspect or manage build target configurations directly, but core workflows are fully supported.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables Claude Code to directly control Unity Editor, supporting scene manipulation, component operations, asset management, prefab handling, and audio control through natural language commands.
    5
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants like Claude to interact with Unity projects programmatically, supporting project management, asset creation, and build automation.
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Allows MCP clients like Claude Desktop or Cursor to perform Unity Editor actions, including asset management, scene modification, and game mechanic testing.
    22
    MIT