mograph-mcp 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mograph_mcp-0.5.0/LICENSE +201 -0
- mograph_mcp-0.5.0/NOTICE +20 -0
- mograph_mcp-0.5.0/PKG-INFO +301 -0
- mograph_mcp-0.5.0/README.md +264 -0
- mograph_mcp-0.5.0/pyproject.toml +66 -0
- mograph_mcp-0.5.0/setup.cfg +4 -0
- mograph_mcp-0.5.0/src/mograph/__init__.py +7 -0
- mograph_mcp-0.5.0/src/mograph/__main__.py +5 -0
- mograph_mcp-0.5.0/src/mograph/ae_bridge.py +305 -0
- mograph_mcp-0.5.0/src/mograph/aftereffects.py +2996 -0
- mograph_mcp-0.5.0/src/mograph/cli.py +66 -0
- mograph_mcp-0.5.0/src/mograph/clustering.py +671 -0
- mograph_mcp-0.5.0/src/mograph/doctor.py +323 -0
- mograph_mcp-0.5.0/src/mograph/hotreload.py +130 -0
- mograph_mcp-0.5.0/src/mograph/illustrator.py +3306 -0
- mograph_mcp-0.5.0/src/mograph/imagediff.py +254 -0
- mograph_mcp-0.5.0/src/mograph/install_panel.py +211 -0
- mograph_mcp-0.5.0/src/mograph/layout.py +385 -0
- mograph_mcp-0.5.0/src/mograph/mapping.py +170 -0
- mograph_mcp-0.5.0/src/mograph/matching.py +706 -0
- mograph_mcp-0.5.0/src/mograph/motion.py +388 -0
- mograph_mcp-0.5.0/src/mograph/outputs.py +203 -0
- mograph_mcp-0.5.0/src/mograph/panel/CSXS/manifest.xml +56 -0
- mograph_mcp-0.5.0/src/mograph/panel/index.html +23 -0
- mograph_mcp-0.5.0/src/mograph/panel/main.js +190 -0
- mograph_mcp-0.5.0/src/mograph/preview.py +323 -0
- mograph_mcp-0.5.0/src/mograph/server.py +1860 -0
- mograph_mcp-0.5.0/src/mograph/symbiosis.py +543 -0
- mograph_mcp-0.5.0/src/mograph/toolmeta.py +587 -0
- mograph_mcp-0.5.0/src/mograph/util.py +481 -0
- mograph_mcp-0.5.0/src/mograph_mcp.egg-info/PKG-INFO +301 -0
- mograph_mcp-0.5.0/src/mograph_mcp.egg-info/SOURCES.txt +57 -0
- mograph_mcp-0.5.0/src/mograph_mcp.egg-info/dependency_links.txt +1 -0
- mograph_mcp-0.5.0/src/mograph_mcp.egg-info/entry_points.txt +2 -0
- mograph_mcp-0.5.0/src/mograph_mcp.egg-info/requires.txt +13 -0
- mograph_mcp-0.5.0/src/mograph_mcp.egg-info/top_level.txt +1 -0
- mograph_mcp-0.5.0/tests/test_ae_scripts.py +404 -0
- mograph_mcp-0.5.0/tests/test_ai_scripts.py +345 -0
- mograph_mcp-0.5.0/tests/test_bridge_security.py +179 -0
- mograph_mcp-0.5.0/tests/test_cli.py +77 -0
- mograph_mcp-0.5.0/tests/test_clustering.py +527 -0
- mograph_mcp-0.5.0/tests/test_docs.py +156 -0
- mograph_mcp-0.5.0/tests/test_doctor.py +104 -0
- mograph_mcp-0.5.0/tests/test_hotreload.py +128 -0
- mograph_mcp-0.5.0/tests/test_imagediff.py +106 -0
- mograph_mcp-0.5.0/tests/test_layout.py +284 -0
- mograph_mcp-0.5.0/tests/test_mapping.py +185 -0
- mograph_mcp-0.5.0/tests/test_matching.py +483 -0
- mograph_mcp-0.5.0/tests/test_motion.py +327 -0
- mograph_mcp-0.5.0/tests/test_outputs.py +193 -0
- mograph_mcp-0.5.0/tests/test_panel_contract.py +89 -0
- mograph_mcp-0.5.0/tests/test_preview.py +247 -0
- mograph_mcp-0.5.0/tests/test_protocol.py +418 -0
- mograph_mcp-0.5.0/tests/test_register_codex.py +113 -0
- mograph_mcp-0.5.0/tests/test_repo_hygiene.py +301 -0
- mograph_mcp-0.5.0/tests/test_sign_panel.py +82 -0
- mograph_mcp-0.5.0/tests/test_symbiosis.py +106 -0
- mograph_mcp-0.5.0/tests/test_threading.py +173 -0
- mograph_mcp-0.5.0/tests/test_util.py +58 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Victor Aragon
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
mograph_mcp-0.5.0/NOTICE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
mograph-mcp
|
|
2
|
+
Copyright 2026 Victor Aragon
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0. See LICENSE.
|
|
5
|
+
|
|
6
|
+
------------------------------------------------------------------------------
|
|
7
|
+
|
|
8
|
+
This project is not affiliated with, endorsed by, or sponsored by Adobe Inc.
|
|
9
|
+
|
|
10
|
+
"Adobe", "Adobe Illustrator", "Adobe After Effects", "ExtendScript" and "CEP"
|
|
11
|
+
are trademarks or registered trademarks of Adobe Inc. They are used here only
|
|
12
|
+
to describe what this software interoperates with, which is the "reasonable and
|
|
13
|
+
customary use in describing the origin of the Work" that section 6 of the
|
|
14
|
+
License allows. No trademark rights are granted by that license.
|
|
15
|
+
|
|
16
|
+
This project ships no Adobe code. It talks to Illustrator and After Effects
|
|
17
|
+
through the scripting interfaces Adobe publishes for that purpose (COM /
|
|
18
|
+
`do javascript` for Illustrator, a CEP panel for After Effects), and requires a
|
|
19
|
+
separate, valid installation of those applications, obtained from Adobe under
|
|
20
|
+
Adobe's own terms.
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mograph-mcp
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: MCP server to control Adobe Illustrator and After Effects, including an Illustrator-to-After-Effects transfer that keeps bezier curves, strokes and gradients.
|
|
5
|
+
Author: Victor Aragon
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://gitlab.com/vic-lab/mograph-mcp
|
|
8
|
+
Project-URL: Repository, https://gitlab.com/vic-lab/mograph-mcp
|
|
9
|
+
Project-URL: Issues, https://gitlab.com/vic-lab/mograph-mcp/issues
|
|
10
|
+
Project-URL: Changelog, https://gitlab.com/vic-lab/mograph-mcp/blob/main/CHANGELOG.md
|
|
11
|
+
Keywords: mcp,model-context-protocol,illustrator,after-effects,adobe,extendscript,motion-graphics,animation
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
16
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Multimedia :: Graphics
|
|
23
|
+
Classifier: Topic :: Multimedia :: Video
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
License-File: NOTICE
|
|
28
|
+
Requires-Dist: mcp<3,>=2
|
|
29
|
+
Requires-Dist: pywin32>=306; platform_system == "Windows"
|
|
30
|
+
Requires-Dist: websockets>=12.0
|
|
31
|
+
Requires-Dist: pillow>=10.0
|
|
32
|
+
Requires-Dist: typing_extensions>=4.6; python_version < "3.12"
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
35
|
+
Requires-Dist: ruff>=0.6; extra == "dev"
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
|
|
38
|
+
# mograph
|
|
39
|
+
|
|
40
|
+
An MCP server that drives **Adobe Illustrator** and **Adobe After Effects**, and
|
|
41
|
+
moves artwork between them.
|
|
42
|
+
|
|
43
|
+
The interesting part is not that it can draw a rectangle. It is
|
|
44
|
+
**`ai_to_ae_push`**: it takes what you have selected in Illustrator and rebuilds
|
|
45
|
+
it in an After Effects comp as editable shape layers — real bezier curves,
|
|
46
|
+
strokes, gradients, the group hierarchy recreated as parented nulls — and then
|
|
47
|
+
`ai_to_ae_verify` renders both sides and tells you how far apart they are, with
|
|
48
|
+
a number instead of an opinion.
|
|
49
|
+
|
|
50
|
+
It was built against a real 52-artboard storyboard, and most of what is in here
|
|
51
|
+
exists because that file broke something.
|
|
52
|
+
|
|
53
|
+
> **Not affiliated with Adobe.** "Adobe", "Illustrator" and "After Effects" are
|
|
54
|
+
> trademarks of Adobe Inc. This is an independent project that automates
|
|
55
|
+
> applications you already own, using Adobe's own scripting interfaces.
|
|
56
|
+
|
|
57
|
+
**Protocol:** implements MCP revision **2026-07-28**, on the official Python SDK
|
|
58
|
+
2.x (`mcp>=2,<3`). Transport is stdio only — this drives desktop applications, so
|
|
59
|
+
it is bound to one machine by design.
|
|
60
|
+
|
|
61
|
+
## Status
|
|
62
|
+
|
|
63
|
+
| | Windows | macOS |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| Illustrator (`ai_*`) | ✅ tested end to end (COM) | ⚠️ implemented, **never run** (osascript) |
|
|
66
|
+
| After Effects (`ae_*`) | ✅ tested (CEP + WebSocket) | ⚠️ should work — CEP is cross-platform — but untested |
|
|
67
|
+
| Illustrator → After Effects (`ai_to_ae_*`) | ✅ tested against a real client file | ⚠️ untested |
|
|
68
|
+
| Unit tests | ✅ | ✅ (no Adobe needed, run anywhere) |
|
|
69
|
+
|
|
70
|
+
macOS is written and unverified. That is not a soft "should be fine": nobody has
|
|
71
|
+
run it. The known risks are itemised in [`AGENTS.md`](AGENTS.md).
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Install
|
|
76
|
+
|
|
77
|
+
Requires Python 3.10+ and the Adobe applications you intend to drive.
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install mograph-mcp
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Then point your MCP client at the `mograph-mcp` command. For Claude Code:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
claude mcp add mograph -- mograph-mcp
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
There are registration scripts for Codex CLI, Claude Desktop and ZCode in
|
|
90
|
+
`scripts/`, and `mograph-mcp doctor` reports what this machine can and cannot
|
|
91
|
+
do without changing anything.
|
|
92
|
+
|
|
93
|
+
Illustrator needs nothing else — it is driven over COM on Windows and
|
|
94
|
+
`osascript` on macOS. After Effects needs the panel below.
|
|
95
|
+
|
|
96
|
+
## After Effects: the panel
|
|
97
|
+
|
|
98
|
+
After Effects has no COM interface, so this talks to it through a small CEP
|
|
99
|
+
extension that runs inside the application and connects back to the server over
|
|
100
|
+
a local WebSocket.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
mograph-mcp install-panel
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Then restart After Effects and open **Window → Extensions → mograph bridge**. It
|
|
107
|
+
should say *"Connected and authenticated"*.
|
|
108
|
+
|
|
109
|
+
> ### Read this before installing the panel
|
|
110
|
+
>
|
|
111
|
+
> `install-panel` copies the panel in place, which Adobe treats as unsigned, so
|
|
112
|
+
> it enables `PlayerDebugMode`. That setting tells CEP to load unsigned
|
|
113
|
+
> extensions — **all** of them, not just this one — and it stays on after the
|
|
114
|
+
> panel is removed. It is a defence in your Adobe installation being lowered.
|
|
115
|
+
>
|
|
116
|
+
> A **signed `.zxp`** avoids it: build one with `python scripts/sign_panel.py`
|
|
117
|
+
> and install it with ZXPInstaller or ExManCmd. See [`docs/panel.md`](docs/panel.md).
|
|
118
|
+
> If neither trade is acceptable, skip the panel entirely: everything on the
|
|
119
|
+
> Illustrator side works without it.
|
|
120
|
+
|
|
121
|
+
Details, the manual install, and what each disconnect code means are in
|
|
122
|
+
[`docs/panel.md`](docs/panel.md).
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## What it can do
|
|
127
|
+
|
|
128
|
+
The authoritative list is what the server returns from `tools/list`. A
|
|
129
|
+
hand-written inventory rots — this README once claimed 33 tools. By family:
|
|
130
|
+
|
|
131
|
+
**Illustrator (`ai_*`, 57 tools).** Documents, layers and items; export.
|
|
132
|
+
Inspection and triage of a delivered file (`ai_inspect_document`,
|
|
133
|
+
`ai_audit_for_animation`, `ai_audit_structure`). **Grouping derived from
|
|
134
|
+
geometry** for when the file's hierarchy does not match what the eye reads as one
|
|
135
|
+
thing (`ai_cluster_items` + `ai_apply_clusters`). Naming that survives the trip
|
|
136
|
+
(`ai_auto_name_items`, `ai_propagate_names`). Reading frames and comparing them
|
|
137
|
+
(`ai_frame_tree`, `ai_diff_frames`, `ai_track_frames`). Layout and reframing.
|
|
138
|
+
|
|
139
|
+
**After Effects (`ae_*`, 51 tools).** Projects, comps, layers; effects and
|
|
140
|
+
expressions; keyframes, easing and interpolation. **`ae_animate`** writes
|
|
141
|
+
entrances and exits with anticipation, overshoot and settle — the parts that are
|
|
142
|
+
not in a storyboard and are what makes an interpolation stop looking dead.
|
|
143
|
+
**`ae_stagger`** orders layers by where they *actually* are in the comp, walking
|
|
144
|
+
the parent chain. Anchors and parenting, render queue, headless `aerender`.
|
|
145
|
+
|
|
146
|
+
**Between them (`ai_to_ae_*`, 2 tools).** `ai_to_ae_push` and `ai_to_ae_verify`,
|
|
147
|
+
described at the top. The coordinate maths — the Y flip, artboard-to-comp
|
|
148
|
+
scaling, bezier handles to tangents, gradient endpoints — lives in `mapping.py`
|
|
149
|
+
as pure functions with unit tests, so it is verifiable without either
|
|
150
|
+
application.
|
|
151
|
+
|
|
152
|
+
### Renders come back as images
|
|
153
|
+
|
|
154
|
+
`ai_see_document`, `ae_see_frame` and `ai_contact_sheet` return the PNG inline,
|
|
155
|
+
not just a path on disk. A path only works if the client happens to have
|
|
156
|
+
filesystem access and happens to think of reading it, and the protocol promises
|
|
157
|
+
neither — which is a poor foundation for the tool that everything else is
|
|
158
|
+
verified with.
|
|
159
|
+
|
|
160
|
+
They are downscaled to `max_dim=1024` on the long side by default; the file path
|
|
161
|
+
is still in the reply, and `max_dim=0` restores the old path-only behaviour.
|
|
162
|
+
|
|
163
|
+
### The long notes are a resource, not a tax
|
|
164
|
+
|
|
165
|
+
Several tools carry substantial field notes — the traps, why each default is
|
|
166
|
+
what it is, what broke last time. Those are the most valuable thing here and
|
|
167
|
+
they used to be paid for, in tokens, at the start of every session whether or not
|
|
168
|
+
you ever called the tool.
|
|
169
|
+
|
|
170
|
+
Now `tools/list` carries what a tool does and when to use it, and the rest is
|
|
171
|
+
served on demand:
|
|
172
|
+
|
|
173
|
+
- `docs://guia` — which tools have extended notes
|
|
174
|
+
- `docs://tools/<name>` — the full notes for one
|
|
175
|
+
|
|
176
|
+
Nothing was deleted; there is one copy of each docstring and a test fails if a
|
|
177
|
+
paragraph goes missing.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Choosing what gets exposed
|
|
182
|
+
|
|
183
|
+
The full set is ~20,000 tokens of `tools/list`, paid at connect time before the
|
|
184
|
+
first question. A session that will only touch one application does not need the
|
|
185
|
+
other half:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
MOGRAPH_TOOLS=ai # Illustrator only -> 57 tools, ~9,000 tokens
|
|
189
|
+
MOGRAPH_TOOLS=ae # After Effects only
|
|
190
|
+
MOGRAPH_TOOLS=ai,symbiosis # Illustrator plus the transfer
|
|
191
|
+
MOGRAPH_TOOLS=all # everything (default)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
An invalid name is a startup error rather than an empty server: exposing zero
|
|
195
|
+
tools looks exactly like a broken installation.
|
|
196
|
+
|
|
197
|
+
Every tool ships `annotations` and a readable title, so a client can auto-approve
|
|
198
|
+
the reads and ask only about the mutations. Without that, all of them look
|
|
199
|
+
equally dangerous and people approve everything without reading.
|
|
200
|
+
|
|
201
|
+
Failures arrive as protocol errors (`isError`), not as successful calls with
|
|
202
|
+
`ok: false` buried in the body.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Security
|
|
207
|
+
|
|
208
|
+
Short version: **local only, the bridge is authenticated, and two tools can run
|
|
209
|
+
arbitrary code.** The full threat model — including why a web page you visit was
|
|
210
|
+
the attacker that mattered — is in [`SECURITY.md`](SECURITY.md).
|
|
211
|
+
|
|
212
|
+
| Variable | Default | What it does |
|
|
213
|
+
|---|---|---|
|
|
214
|
+
| `MOGRAPH_ALLOW_RAW_SCRIPT` | `1` | `0` drops `ai_run_script` and `ae_run_script` |
|
|
215
|
+
| `MOGRAPH_PORT_TAKEOVER` | `0` | `1` kills whatever holds the bridge port |
|
|
216
|
+
| `MOGRAPH_BRIDGE_AUTH` | `1` | `0` accepts an unauthenticated panel — **unsafe** |
|
|
217
|
+
| `MOGRAPH_WS_PORT` | `9123` | Bridge port; must match the panel |
|
|
218
|
+
| `MOGRAPH_AI_APPNAME` | `Adobe Illustrator` | macOS only, if the app name does not match |
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Development
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
python -m pytest tests/ -q # no Adobe required
|
|
226
|
+
python -m ruff check .
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
With both applications open and the panel connected:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
python scripts/smoke_fidelity_ai.py # Illustrator only, does not touch the bridge port
|
|
233
|
+
python scripts/smoke_fidelity_ae.py # round trip, reads bezier + stroke back out of AE
|
|
234
|
+
python scripts/smoke_gradient.py # gradient round trip
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
`dev_reload` swaps the backend code in place without restarting the client,
|
|
238
|
+
which covers most of the debugging loop. It cannot add or rename a tool — the
|
|
239
|
+
list is handed to the client once, at connect time.
|
|
240
|
+
|
|
241
|
+
See [`CONTRIBUTING.md`](CONTRIBUTING.md), [`AGENTS.md`](AGENTS.md) for the
|
|
242
|
+
accumulated field notes, and [`ROADMAP.md`](ROADMAP.md) for known work.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Troubleshooting
|
|
247
|
+
|
|
248
|
+
**The AE tools say no panel is connected.** Open After Effects and the `mograph
|
|
249
|
+
bridge` panel. If the panel says `code 4401`, After Effects is still running the
|
|
250
|
+
old `main.js` from memory — restart it. `4409` means another server already has a
|
|
251
|
+
panel. `mograph-mcp doctor` names which panels are installed, which port each one
|
|
252
|
+
dials, and whether a session token is present; [`docs/panel.md`](docs/panel.md)
|
|
253
|
+
covers the rest.
|
|
254
|
+
|
|
255
|
+
**The bridge port is busy.** The error names the PID holding it. Stop that
|
|
256
|
+
process, or set `MOGRAPH_PORT_TAKEOVER=1` to have it killed.
|
|
257
|
+
|
|
258
|
+
**Illustrator does not connect.** On Windows COM launches it. On macOS, if you
|
|
259
|
+
have several versions installed and it picks the wrong one, set
|
|
260
|
+
`MOGRAPH_AI_APPNAME="Adobe Illustrator 2026"`. A macOS error `-1743` is the
|
|
261
|
+
Automation permission prompt: approve it in System Settings → Privacy & Security
|
|
262
|
+
→ Automation.
|
|
263
|
+
|
|
264
|
+
**Shapes land in the wrong place after a push.** The mapping scales the artboard
|
|
265
|
+
onto the comp. If their aspect ratios differ, it distorts — use a comp the same
|
|
266
|
+
size as the artboard.
|
|
267
|
+
|
|
268
|
+
**A gradient lost a colour.** Only the first and last stop survive: After
|
|
269
|
+
Effects will not let scripting touch a shape layer's multi-stop gradient. The
|
|
270
|
+
geometry is not the problem -- that transfers exactly. Check `degraded` in the
|
|
271
|
+
push reply, which names each flattened layer and the colours it dropped, and
|
|
272
|
+
rasterize in Illustrator if the middle colours carry the design.
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Known limitations
|
|
277
|
+
|
|
278
|
+
- **Gradients keep their geometry and lose their middle stops.** Measured
|
|
279
|
+
against the applications: a two-stop gradient, linear or radial, arrives with
|
|
280
|
+
a mean channel error of 0.2/255 -- the angle, extent and centre are exact. A
|
|
281
|
+
three-stop one arrives at 19.8/255, because only the first and last colours
|
|
282
|
+
survive. After Effects does not expose a shape layer's multi-stop gradient to
|
|
283
|
+
scripting at all (`Colors` reports `NO_VALUE` and refuses both get and set),
|
|
284
|
+
so this is a limit of the host. The push reports every gradient it flattened
|
|
285
|
+
and names the colours it dropped. Patterns, brushes and mesh objects are
|
|
286
|
+
skipped with a warning.
|
|
287
|
+
- **After Effects' first launch** takes 20–40s; the bridge waits 60s
|
|
288
|
+
(`MOGRAPH_EVAL_TIMEOUT`).
|
|
289
|
+
- **One panel at a time**, by design — a second connection is refused rather
|
|
290
|
+
than silently displacing the first.
|
|
291
|
+
- **No live feedback.** Nothing reacts to events in the applications; every
|
|
292
|
+
exchange starts from a tool call.
|
|
293
|
+
- **macOS is untested.** See the table at the top.
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Licence
|
|
298
|
+
|
|
299
|
+
[Apache-2.0](LICENSE). "Adobe", "Illustrator" and "After Effects" are
|
|
300
|
+
trademarks of Adobe Inc.; this project is not affiliated with them and ships no
|
|
301
|
+
Adobe code. See [`NOTICE`](NOTICE).
|