Skip to main content
Glama
orca-profiles-mcp

orca-profiles-mcp

by Zmokizmoghi

orca-profiles-mcp

MCP サーバーで、OrcaSlicer のプロファイルを読み書きします。inherits チェーン全体を展開し、各値がどのリンクによって設定されたかを示します。

機能

OrcaSlicer のプロファイルには、親プロファイルとの差分だけが保存されます。ファイルを開くだけでは外壁速度を知ることはできません。その値は親、親の親、またはエンジン組み込みのデフォルトに由来する場合があるからです。このサーバーはチェーンをルートまでたどり、実効値を計算して、その出所を保持します。

単純な読み取りでは対応できない Orca の部分も処理します:

  • 親は 名前により、ベンダーを越えて 解決されます — Sovol フィラメントは OrcaFilamentLibrary から継承します;

  • Generic … の親がない場合は Generic <material> @System にフォールバックし、名前が変更されたプロファイルは renamed_from リストから見つけられます;

  • エクストルーダーバリアントにバインドされたベクトルは、nil マーカー(「ここでは親の値を保持する」の意味)も含めて要素ごとにマージされます;

  • 子は親よりも多くのエクストルーダーを宣言できる場合があります — シングルエクストルーダーのマシンプロファイル上にツールチェンジャーを重ねる場合 — そして両方のエクストルーダーは自分の値を保持します;

  • プロファイルタイプに属さないキーは破棄されます。Orca も同様に破棄するからです。それらは黙って適用される代わりに報告されます。

Related MCP server: local-code-mcp

セットアップ

cd ~/job/orca-profiles-mcp
uv sync

Claude Code に登録する:

claude mcp add orca-profiles -- uv --directory ~/job/orca-profiles-mcp run orca-profiles-mcp

ツール

ツール

目的

get_setup

検出されたルート、Orca バージョン、ベンダー、選択されたプリセット

list_profiles

タイプ、名前、ベンダー、ソースで検索

get_profile

raw / resolved / traced モードのプロファイル

get_chain

ルートまでの継承チェーン

explain_key

特定の値がどこから来たか

find_children

このプロファイルから継承するプロファイル

diff_profiles

2つのプロファイルを比較

compare_with_upstream

OrcaSlicer リポジトリと比較

validate

壊れた inherits、循環、不明なキー、冗長なデルタ

check_deltas

Orca 自身が書き込んだデルタに対する展開を検証

冗長なキーと説明できないベクトル長を個別に報告

set_values

デルタ再計算付きで値を設定

create_profile

ユーザープロファイルを作成

rename_profile, delete_profile

名前の変更と削除

normalize_profile

親と同じキーを削除

値はファイルが保存している形式のまま返されます。"0.20" は "0.20" のままであり、"100%" はパーセントのままです。エンジンはスライス時に両方を正規化しますが、このサーバーは正規化しないため、読んだ内容はプロファイルが示す内容そのものであり、書き戻される内容も変更されません。

プロファイルの書き込み

自分のプロファイルは自由に編集できます。システムまたはバンドルされたプロファイルを変更するには force=true が必要です。それらのファイルはベンダーライブラリに属しているため、次のプロファイル更新で復元され、すべての子孫がその変更を継承します。

書き込みは一時ファイルとアトミックなリネームを介して行われるため、書き込みが中断してもプロファイルが切り詰められることはありません。また、最初にファイルの隣にバックアップコピーが作成されます(backup=false で無効化できます)。何かを書き込む前に値がチェックされます。別のプロファイルタイプに属するキー、エンジンがスカラーを期待するベクトル、形式が文字列を要求する数値は、保存されて Orca に黙って破棄されるのではなく、拒否されます。ピン留めしたスナップショットが認識しない設定はそのまま引き継がれるため、新しい Orca で書き込まれたプロファイルでもそれらが失われることはありません。

OrcaSlicer は起動時にプロファイルを読み込み、終了時に書き直します。 アプリケーションの実行中に行われた編集は上書きされます — 先に Orca を閉じてください。

正しさの検証方法

Orca の CLI は継承を検証できません。--export-settings は、渡されたファイルに存在するキーに加えてエンジンのデフォルトを返すだけで、inherits をたどることはありません。OrcaSlicer.conf でプリセットを選択してもそれらは有効になりません。チェーン全体をファイルリストとして渡すと、重複した設定ファイルとして拒否されます。この3つの方法はすべて 2.4.2 に対して試行されました。

Orca が残すものは、自身の展開の証拠です。ユーザープロファイルを保存するとき、完全に展開された親に対する最小限の差分を保存します。したがって、Orca が書き込んだすべてのプロファイルは、記録された答えです。check_deltas はそれらの差分を再計算して比較します。不一致は、リゾルバがエンジンとは異なる方法で親を展開していることを意味します。

これが tests/test_smoke.py がインストール済みライブラリに対して検証している内容であり、ツールチェンジャーのベクトル欠陥が発見された方法でもあります。

すでに親と一致しているにもかかわらず保存されたキーは、別途報告されます。それらは親が変更される前の無害な残り物であり、リゾルバエラーではありません。

エンジンスナップショットの更新

エンジンのデフォルト、バリアントのキーセット、タイプごとのキーリストは、インストールされている Orca から src/orca_profiles_mcp/data/engine-snapshot.json に取り込まれ、そのバージョンタグに固定されます。OrcaSlicer をアップグレードした後:

uv run python scripts/build_snapshot.py
uv run pytest

テスト

uv run pytest

4つの層:

  • ミニチュアフィクスチャライブラリに対する単体テスト。各エッジケースにつき1つ — ベンダー間の継承、Generic フォールバック、renamed_from、循環、親の欠落、ストライド1およびストライド2のベクトル、nil 要素;

  • 書き込みのラウンドトリップ: 読み取り → 変更せずに書き込み → ファイルがバイト単位で同一;

  • パッケージ化されたエントリポイントをサブプロセスとして起動し、MCP stdio を通じて操作するエンドツーエンドテスト。ツール登録、作成/編集/検証/削除の完全なサイクル、およびエラー伝播をカバー;

  • インストール済みライブラリに対するチェック。上記のデルタ検証を含みます。

実際のライブラリを使用するテストは、Orca データディレクトリが存在しない場合はスキップされます。それ以外はすべてフィクスチャに対して実行されます。

ドキュメント

  • 設計: docs/specs/2026-08-17-orca-profiles-mcp-design.md — OrcaSlicer のソースを読むことでプロファイル形式について判明した内容と、CLI の実験で除外された内容を含みます

  • 実装計画: docs/plans/2026-08-17-orca-profiles-mcp.md

ライセンス

AGPL-3.0、OrcaSlicer 自体に一致しています。このプロジェクトには OrcaSlicer のコードは含まれていませんが、その継承ロジックは Preset.cpp と PrintConfig.cpp の行ごとの移植であり、エンジンスナップショットはそのソースから抽出されたデフォルト値とキーリストを保持しています。

OrcaSlicer プロジェクトとは提携しておらず、その承認も受けていません。

Available Tools

15 tools
check_deltasB

Verify inheritance expansion against the deltas Orca itself wrote: for every profile, the delta is recomputed and compared with the file. A mismatch means the resolver expands the parent differently than the engine did; redundant keys are reported separately and are harmless

Inputs: scope.

compare_with_upstreamC

Compare a profile against its version in the OrcaSlicer repository

Inputs: name (required), type (required), ref.

create_profileC

Create a user profile inheriting from the given one

Inputs: name (required), type (required), values (required), inherits (required).

delete_profileB

Delete a profile; deleting outside your own profiles needs force=True, and cloud-synced ones keep a flagged .info

Inputs: name (required), type (required), force.

diff_profilesB

Compare two profiles by effective values (mode=resolved) or by their stored deltas (mode=raw)

Inputs: a (required), b (required), type (required), mode.

explain_keyB

Where a key's value came from: originating link, overridden values, engine default

Inputs: key (required), name (required), type (required).

find_childrenC

Profiles inheriting from this one. Check before editing shared profiles

Inputs: name (required), type (required).

get_chainC

The inheritance chain to its root, with how each link was resolved

Inputs: name (required), type (required).

get_profileC

A profile with inheritance expanded. mode: raw — file contents, resolved — effective values, traced — values with provenance. Engine defaults are excluded unless include_defaults is set

Inputs: name (required), type (required), keys, mode, +3 more.

get_setupB

Discovered Orca profile roots, application version, vendors, selected presets

Inputs: no named parameters.

list_profilesC

Search profiles by type, name, vendor and source

Inputs: type, limit, query, source, +3 more.

normalize_profileC

Drop keys whose values are identical to the parent's

Inputs: name (required), type (required), force, backup.

rename_profileC

Rename a user profile

Inputs: name (required), type (required), new_name (required).

set_valuesA

Set profile values. The delta against the parent is recomputed automatically and the paired .info is updated. Editing a system or bundled profile affects every descendant and needs force=True

Inputs: name (required), type (required), values (required), force, +1 more.

validateC

Integrity check: broken inherits, cycles, unknown keys, redundant deltas, name collisions

Inputs: scope.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 15 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: get_profile expands inheritance, get_chain shows the chain, explain_key traces a single key's origin. However, validate and check_deltas both verify integrity and could be confused; diff_profiles and compare_with_upstream both compare but to different targets. Descriptions are detailed enough to resolve ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent snake_case imperative verb-noun pattern (get_setup, list_profiles, set_values, create_profile). Even compound names like compare_with_upstream and check_deltas fit the pattern. No mixed conventions or vague verbs.

    Tool Count5/5

    15 tools is well-scoped for a profile management server, covering discovery, inspection, mutation, validation, and comparison. Each tool addresses a distinct need without unnecessary duplication.

    Completeness5/5

    The tool surface provides full lifecycle coverage: create, read (multiple views), update, delete, rename, plus validation, diffing, and impact analysis (find_children). Missing operations like import/export are not core to the domain, and the set appears complete for effective profile management.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for pre-print QA of Bambu Studio projects, providing tools to inspect models and 3MF files, validate risky settings, create support variants, and open files in Bambu Studio.
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      MCP server for BambuStudio slicer: inspect geometry, configure saved projects, and compare slices with Claude Code or Codex.
      29
      2
      AGPL 3.0