orca-profiles-mcp
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 syncClaude Code に登録する:
claude mcp add orca-profiles -- uv --directory ~/job/orca-profiles-mcp run orca-profiles-mcpツール
ツール | 目的 |
| 検出されたルート、Orca バージョン、ベンダー、選択されたプリセット |
| タイプ、名前、ベンダー、ソースで検索 |
|
|
| ルートまでの継承チェーン |
| 特定の値がどこから来たか |
| このプロファイルから継承するプロファイル |
| 2つのプロファイルを比較 |
| OrcaSlicer リポジトリと比較 |
| 壊れた |
| Orca 自身が書き込んだデルタに対する展開を検証 |
冗長なキーと説明できないベクトル長を個別に報告 | |
| デルタ再計算付きで値を設定 |
| ユーザープロファイルを作成 |
| 名前の変更と削除 |
| 親と同じキーを削除 |
値はファイルが保存している形式のまま返されます。"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 pytest4つの層:
ミニチュアフィクスチャライブラリに対する単体テスト。各エッジケースにつき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 toolscheck_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
Scored across 15 tools
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.
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.
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.
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.
Maintenance
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceAn MCP server for interactively reading, validating, previewing, and saving Renovate configurations with LLM assistance.706 npm14MIT
- FlicenseNot gradedqualityDmaintenanceProfile-driven MCP server for safely inspecting and changing local Git repositories via a Streamable HTTP endpoint with deny-by-default security.1-
- AlicenseNot gradedqualityDmaintenanceMCP 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
- AlicenseBqualityBmaintenanceMCP server for BambuStudio slicer: inspect geometry, configure saved projects, and compare slices with Claude Code or Codex.292AGPL 3.0