ico-mcp 0.1.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.
Files changed (34) hide show
  1. ico_mcp-0.1.0/.gitignore +22 -0
  2. ico_mcp-0.1.0/LICENSE +201 -0
  3. ico_mcp-0.1.0/PKG-INFO +141 -0
  4. ico_mcp-0.1.0/README.md +115 -0
  5. ico_mcp-0.1.0/pyproject.toml +82 -0
  6. ico_mcp-0.1.0/src/ico_mcp/__init__.py +6 -0
  7. ico_mcp-0.1.0/src/ico_mcp/__main__.py +5 -0
  8. ico_mcp-0.1.0/src/ico_mcp/agent-guide.md +591 -0
  9. ico_mcp-0.1.0/src/ico_mcp/assets.py +276 -0
  10. ico_mcp-0.1.0/src/ico_mcp/config.py +380 -0
  11. ico_mcp-0.1.0/src/ico_mcp/crystallize.py +668 -0
  12. ico_mcp-0.1.0/src/ico_mcp/domain_types.py +88 -0
  13. ico_mcp-0.1.0/src/ico_mcp/drafts.py +192 -0
  14. ico_mcp-0.1.0/src/ico_mcp/environment.py +125 -0
  15. ico_mcp-0.1.0/src/ico_mcp/fetching.py +37 -0
  16. ico_mcp-0.1.0/src/ico_mcp/jobs.py +486 -0
  17. ico_mcp-0.1.0/src/ico_mcp/kernel.py +772 -0
  18. ico_mcp-0.1.0/src/ico_mcp/kernel_client.py +309 -0
  19. ico_mcp-0.1.0/src/ico_mcp/pipelines.py +213 -0
  20. ico_mcp-0.1.0/src/ico_mcp/profiles.py +125 -0
  21. ico_mcp-0.1.0/src/ico_mcp/progress.py +56 -0
  22. ico_mcp-0.1.0/src/ico_mcp/proposals.py +512 -0
  23. ico_mcp-0.1.0/src/ico_mcp/protocol.py +88 -0
  24. ico_mcp-0.1.0/src/ico_mcp/py.typed +0 -0
  25. ico_mcp-0.1.0/src/ico_mcp/remote.py +310 -0
  26. ico_mcp-0.1.0/src/ico_mcp/scaffold.py +166 -0
  27. ico_mcp-0.1.0/src/ico_mcp/server.py +1196 -0
  28. ico_mcp-0.1.0/src/ico_mcp/sources.py +89 -0
  29. ico_mcp-0.1.0/src/ico_mcp/targets.py +40 -0
  30. ico_mcp-0.1.0/src/ico_mcp/testing.py +49 -0
  31. ico_mcp-0.1.0/src/ico_mcp/traces.py +115 -0
  32. ico_mcp-0.1.0/src/ico_mcp/type_names.py +73 -0
  33. ico_mcp-0.1.0/src/ico_mcp/typecheck.py +92 -0
  34. ico_mcp-0.1.0/src/ico_mcp/version.py +123 -0
@@ -0,0 +1,22 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ .venv/
5
+ build/
6
+ dist/
7
+ *.egg-info/
8
+
9
+ # Tools
10
+ .pytest_cache/
11
+ .ruff_cache/
12
+ .coverage
13
+ htmlcov/
14
+
15
+ # OS
16
+ .DS_Store
17
+
18
+ # Run traces of a domain started from this checkout
19
+ runs/
20
+
21
+ # Machine-specific MCP client config (see README)
22
+ .mcp.json
ico_mcp-0.1.0/LICENSE ADDED
@@ -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 [yyyy] [name of copyright owner]
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.
ico_mcp-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.5
2
+ Name: ico-mcp
3
+ Version: 0.1.0
4
+ Summary: An MCP server on top of ICO: an agent writes typed operators, composes them into pipelines, runs and profiles them, and turns what works into reviewed code.
5
+ Project-URL: Homepage, https://github.com/apriori3d/ico-mcp
6
+ Project-URL: Repository, https://github.com/apriori3d/ico-mcp
7
+ Project-URL: Issues, https://github.com/apriori3d/ico-mcp/issues
8
+ Author-email: Sergei Shumilin <shumilinss@gmail.com>
9
+ License: Apache 2.0
10
+ License-File: LICENSE
11
+ Keywords: agents,ico,mcp,pipelines
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: <3.13,>=3.11
21
+ Requires-Dist: anyio>=4.15
22
+ Requires-Dist: apriori-ico>=0.1.0
23
+ Requires-Dist: mcp>=2.3.0
24
+ Requires-Dist: pyright>=1.1.414
25
+ Description-Content-Type: text/markdown
26
+
27
+ # ico-mcp
28
+
29
+ [![CI](https://img.shields.io/github/actions/workflow/status/apriori3d/ico-mcp/ci.yml?label=CI&logo=github)](https://github.com/apriori3d/ico-mcp/actions/workflows/ci.yml)
30
+ ![Python](https://img.shields.io/badge/Python-3.11%E2%80%933.12-blue?logo=python)
31
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
32
+
33
+ An MCP server on top of [ICO](https://github.com/apriori3d/ico) with which
34
+ an agent builds data pipelines from its own operators. The agent writes
35
+ operators, small typed Python functions, and composes them into pipelines
36
+ as JSON specs; the server checks, runs and profiles them. Operators that
37
+ proved themselves in runs become the domain's stable code through a pull
38
+ request a human reviews, and the next task starts from them instead of a
39
+ blank script.
40
+
41
+ - **Work accumulates.** Each task adds operators and pipelines to the
42
+ domain's library instead of one-off scripts.
43
+ - **Errors before the run.** Types are checked at every link before
44
+ anything runs, so a broken pipeline does not burn GPU time.
45
+ - **Fewer tokens.** The agent finds operators as compact cards by input and
46
+ output type instead of reading code, runs saved pipelines by name, and
47
+ gets data back as paths; long runs go on in the background.
48
+ - **Visible runs.** The Live Board shows the plan and the progress of every
49
+ node, the profiler where time and memory go, `sample_run` what flows out
50
+ of a node; a run can be cancelled between items.
51
+ - **Local or GPU.** The same pipeline runs here or on a RunPod GPU: the job
52
+ carries the operators' code, model weights are pinned assets.
53
+
54
+ ```
55
+ search_operators → validate → run → save_pipeline → crystallize → PR
56
+ a step is missing → propose_operator, propose_types
57
+ ```
58
+
59
+ ## How it is built
60
+
61
+ ```mermaid
62
+ flowchart TB
63
+ A["agent"] -- "MCP tools" --> S["ico-mcp server, Live Board"]
64
+ S --> kernels
65
+ subgraph kernels["kernels"]
66
+ direction LR
67
+ K["main: catalog, validate, plans"] ~~~ J["one per run"] ~~~ X["remote: RunPod GPU"]
68
+ end
69
+ kernels -- "operator code" --> D
70
+ S -- "crystallize: pull request" --> D
71
+ subgraph D["domain repository"]
72
+ direction LR
73
+ P["video: stable"] ~~~ Q["video_draft: drafts"] ~~~ L["pipelines, assets"]
74
+ end
75
+ ```
76
+
77
+ **Server.** Speaks MCP over stdio, never imports operator code, hosts the
78
+ Live Board and keeps the runs.
79
+
80
+ **Kernels.** Child processes in the domain's environment that import the
81
+ operators: a main one for the catalog and validation, one per run (so a run
82
+ can be cancelled alone), and a remote one that sends a run with its
83
+ operators' code to a RunPod Serverless GPU.
84
+
85
+ **Domain.** A repository of its own, created by `ico-mcp init`: stable and
86
+ draft packages, saved pipelines, pinned model weights (assets), notes for
87
+ agents.
88
+
89
+ **Crystallization.** `crystallize` moves the drafts a pipeline uses into the
90
+ stable package, checks them (pyright strict, examples, saved pipelines
91
+ validate) and opens a pull request with the operator cards and the runs that
92
+ used them.
93
+
94
+ <img src="https://raw.githubusercontent.com/apriori3d/ico/main/docs/images/live_board.gif" width="900" alt="The Live Board">
95
+
96
+ ## Tools
97
+
98
+ | Tool | Does |
99
+ | --- | --- |
100
+ | `search_operators`, `get_operator` | find operators by input / output type, text, tags; a card with the source |
101
+ | `list_types`, `get_type` | domain types with fields and docstrings |
102
+ | `validate` | type-check a spec; issues carry their place in the spec |
103
+ | `run`, `run_status`, `wait_run`, `cancel_run`, `sample_run` | run a spec or a saved pipeline, locally or on a target; follow, stop, sample it |
104
+ | `dashboard` | the URL of the Live Board |
105
+ | `save_pipeline`, `list_pipelines`, `get_pipeline`, `delete_pipeline` | saved, validated specs with parameters |
106
+ | `propose_operator`, `propose_types`, `delete_module` | write, edit or remove a draft module |
107
+ | `crystallize`, `wait_crystallize` | a pull request that makes drafts stable |
108
+ | `assets_status`, `fetch_assets` | the weights a pipeline needs, here or on a target |
109
+ | `volume_up`, `volume_down` | the network volume of an order on a RunPod target |
110
+ | `environment`, `guide`, `reload`, `server_status` | what operators see, the reference for agents, reload after a merge, a stale server |
111
+
112
+ ## Setup
113
+
114
+ Requires Python 3.11 or 3.12 and [uv](https://docs.astral.sh/uv/);
115
+ [gh](https://cli.github.com) for `crystallize`. Create a domain:
116
+
117
+ ```bash
118
+ uvx ico-mcp init /abs/path/to/ico-mcp-video --package video
119
+ ```
120
+
121
+ It depends on `ico-mcp` and [`apriori-ico`](https://pypi.org/project/apriori-ico/)
122
+ (ICO). Add the domain's dependencies to its `pyproject.toml`, `uv sync`
123
+ there, and connect it:
124
+
125
+ ```bash
126
+ claude mcp add video -- uv run --project /abs/path/to/ico-mcp-video ico-mcp --root /abs/path/to/ico-mcp-video
127
+ ```
128
+
129
+ In the Claude desktop app, put the same server into
130
+ `claude_desktop_config.json` with the absolute path of `uv`.
131
+
132
+ For development, check out ICO next to this repository (`../ico`) and run
133
+ `uv sync` and `make ci` here; `ico-mcp init` from this checkout makes a
134
+ domain that uses both checkouts.
135
+
136
+ Design notes: [docs/design/ico-mcp.md](https://github.com/apriori3d/ico-mcp/blob/main/docs/design/ico-mcp.md). The guide
137
+ for agents: [src/ico_mcp/agent-guide.md](https://github.com/apriori3d/ico-mcp/blob/main/src/ico_mcp/agent-guide.md).
138
+
139
+ ## License
140
+
141
+ Apache License 2.0, see [LICENSE](https://github.com/apriori3d/ico-mcp/blob/main/LICENSE).
@@ -0,0 +1,115 @@
1
+ # ico-mcp
2
+
3
+ [![CI](https://img.shields.io/github/actions/workflow/status/apriori3d/ico-mcp/ci.yml?label=CI&logo=github)](https://github.com/apriori3d/ico-mcp/actions/workflows/ci.yml)
4
+ ![Python](https://img.shields.io/badge/Python-3.11%E2%80%933.12-blue?logo=python)
5
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6
+
7
+ An MCP server on top of [ICO](https://github.com/apriori3d/ico) with which
8
+ an agent builds data pipelines from its own operators. The agent writes
9
+ operators, small typed Python functions, and composes them into pipelines
10
+ as JSON specs; the server checks, runs and profiles them. Operators that
11
+ proved themselves in runs become the domain's stable code through a pull
12
+ request a human reviews, and the next task starts from them instead of a
13
+ blank script.
14
+
15
+ - **Work accumulates.** Each task adds operators and pipelines to the
16
+ domain's library instead of one-off scripts.
17
+ - **Errors before the run.** Types are checked at every link before
18
+ anything runs, so a broken pipeline does not burn GPU time.
19
+ - **Fewer tokens.** The agent finds operators as compact cards by input and
20
+ output type instead of reading code, runs saved pipelines by name, and
21
+ gets data back as paths; long runs go on in the background.
22
+ - **Visible runs.** The Live Board shows the plan and the progress of every
23
+ node, the profiler where time and memory go, `sample_run` what flows out
24
+ of a node; a run can be cancelled between items.
25
+ - **Local or GPU.** The same pipeline runs here or on a RunPod GPU: the job
26
+ carries the operators' code, model weights are pinned assets.
27
+
28
+ ```
29
+ search_operators → validate → run → save_pipeline → crystallize → PR
30
+ a step is missing → propose_operator, propose_types
31
+ ```
32
+
33
+ ## How it is built
34
+
35
+ ```mermaid
36
+ flowchart TB
37
+ A["agent"] -- "MCP tools" --> S["ico-mcp server, Live Board"]
38
+ S --> kernels
39
+ subgraph kernels["kernels"]
40
+ direction LR
41
+ K["main: catalog, validate, plans"] ~~~ J["one per run"] ~~~ X["remote: RunPod GPU"]
42
+ end
43
+ kernels -- "operator code" --> D
44
+ S -- "crystallize: pull request" --> D
45
+ subgraph D["domain repository"]
46
+ direction LR
47
+ P["video: stable"] ~~~ Q["video_draft: drafts"] ~~~ L["pipelines, assets"]
48
+ end
49
+ ```
50
+
51
+ **Server.** Speaks MCP over stdio, never imports operator code, hosts the
52
+ Live Board and keeps the runs.
53
+
54
+ **Kernels.** Child processes in the domain's environment that import the
55
+ operators: a main one for the catalog and validation, one per run (so a run
56
+ can be cancelled alone), and a remote one that sends a run with its
57
+ operators' code to a RunPod Serverless GPU.
58
+
59
+ **Domain.** A repository of its own, created by `ico-mcp init`: stable and
60
+ draft packages, saved pipelines, pinned model weights (assets), notes for
61
+ agents.
62
+
63
+ **Crystallization.** `crystallize` moves the drafts a pipeline uses into the
64
+ stable package, checks them (pyright strict, examples, saved pipelines
65
+ validate) and opens a pull request with the operator cards and the runs that
66
+ used them.
67
+
68
+ <img src="https://raw.githubusercontent.com/apriori3d/ico/main/docs/images/live_board.gif" width="900" alt="The Live Board">
69
+
70
+ ## Tools
71
+
72
+ | Tool | Does |
73
+ | --- | --- |
74
+ | `search_operators`, `get_operator` | find operators by input / output type, text, tags; a card with the source |
75
+ | `list_types`, `get_type` | domain types with fields and docstrings |
76
+ | `validate` | type-check a spec; issues carry their place in the spec |
77
+ | `run`, `run_status`, `wait_run`, `cancel_run`, `sample_run` | run a spec or a saved pipeline, locally or on a target; follow, stop, sample it |
78
+ | `dashboard` | the URL of the Live Board |
79
+ | `save_pipeline`, `list_pipelines`, `get_pipeline`, `delete_pipeline` | saved, validated specs with parameters |
80
+ | `propose_operator`, `propose_types`, `delete_module` | write, edit or remove a draft module |
81
+ | `crystallize`, `wait_crystallize` | a pull request that makes drafts stable |
82
+ | `assets_status`, `fetch_assets` | the weights a pipeline needs, here or on a target |
83
+ | `volume_up`, `volume_down` | the network volume of an order on a RunPod target |
84
+ | `environment`, `guide`, `reload`, `server_status` | what operators see, the reference for agents, reload after a merge, a stale server |
85
+
86
+ ## Setup
87
+
88
+ Requires Python 3.11 or 3.12 and [uv](https://docs.astral.sh/uv/);
89
+ [gh](https://cli.github.com) for `crystallize`. Create a domain:
90
+
91
+ ```bash
92
+ uvx ico-mcp init /abs/path/to/ico-mcp-video --package video
93
+ ```
94
+
95
+ It depends on `ico-mcp` and [`apriori-ico`](https://pypi.org/project/apriori-ico/)
96
+ (ICO). Add the domain's dependencies to its `pyproject.toml`, `uv sync`
97
+ there, and connect it:
98
+
99
+ ```bash
100
+ claude mcp add video -- uv run --project /abs/path/to/ico-mcp-video ico-mcp --root /abs/path/to/ico-mcp-video
101
+ ```
102
+
103
+ In the Claude desktop app, put the same server into
104
+ `claude_desktop_config.json` with the absolute path of `uv`.
105
+
106
+ For development, check out ICO next to this repository (`../ico`) and run
107
+ `uv sync` and `make ci` here; `ico-mcp init` from this checkout makes a
108
+ domain that uses both checkouts.
109
+
110
+ Design notes: [docs/design/ico-mcp.md](https://github.com/apriori3d/ico-mcp/blob/main/docs/design/ico-mcp.md). The guide
111
+ for agents: [src/ico_mcp/agent-guide.md](https://github.com/apriori3d/ico-mcp/blob/main/src/ico_mcp/agent-guide.md).
112
+
113
+ ## License
114
+
115
+ Apache License 2.0, see [LICENSE](https://github.com/apriori3d/ico-mcp/blob/main/LICENSE).
@@ -0,0 +1,82 @@
1
+ [project]
2
+ name = "ico-mcp"
3
+ version = "0.1.0"
4
+ description = "An MCP server on top of ICO: an agent writes typed operators, composes them into pipelines, runs and profiles them, and turns what works into reviewed code."
5
+ readme = "README.md"
6
+ license = { text = "Apache 2.0" }
7
+ authors = [{ name = "Sergei Shumilin", email = "shumilinss@gmail.com" }]
8
+ requires-python = ">=3.11,<3.13"
9
+ classifiers = [
10
+ "Development Status :: 3 - Alpha",
11
+ "Intended Audience :: Developers",
12
+ "License :: OSI Approved :: Apache Software License",
13
+ "Programming Language :: Python :: 3",
14
+ "Programming Language :: Python :: 3.11",
15
+ "Programming Language :: Python :: 3.12",
16
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
17
+ "Typing :: Typed",
18
+ ]
19
+ keywords = ["mcp", "agents", "pipelines", "ico"]
20
+ dependencies = [
21
+ "anyio>=4.15",
22
+ "apriori-ico>=0.1.0",
23
+ "mcp>=2.3.0",
24
+ # Type-checks proposed operators at run time (propose_operator).
25
+ "pyright>=1.1.414",
26
+ ]
27
+
28
+ [project.scripts]
29
+ ico-mcp = "ico_mcp.server:main"
30
+
31
+ [project.urls]
32
+ Homepage = "https://github.com/apriori3d/ico-mcp"
33
+ Repository = "https://github.com/apriori3d/ico-mcp"
34
+ Issues = "https://github.com/apriori3d/ico-mcp/issues"
35
+
36
+ [dependency-groups]
37
+ dev = [
38
+ "pytest>=9.1.1",
39
+ "ruff>=0.17.1",
40
+ ]
41
+
42
+ [tool.uv.sources]
43
+ # Development: the sibling ICO checkout, editable.
44
+ apriori-ico = { path = "../ico", editable = true }
45
+
46
+ [build-system]
47
+ requires = ["hatchling"]
48
+ build-backend = "hatchling.build"
49
+
50
+ [tool.hatch.build.targets.wheel]
51
+ packages = ["src/ico_mcp"]
52
+
53
+ [tool.hatch.build.targets.sdist]
54
+ include = ["/src/ico_mcp", "/README.md", "/LICENSE"]
55
+
56
+ # ───────────────────────────────────────────────
57
+ # Ruff (same settings as ico)
58
+ # ───────────────────────────────────────────────
59
+
60
+ [tool.ruff]
61
+ line-length = 88
62
+ target-version = "py311"
63
+ src = ["src", "tests"]
64
+
65
+ [tool.ruff.lint]
66
+ select = ["E", "F", "B", "I", "UP", "SIM"]
67
+ ignore = ["E501"]
68
+
69
+ [tool.ruff.format]
70
+ quote-style = "double"
71
+ indent-style = "space"
72
+
73
+ [tool.ruff.lint.per-file-ignores]
74
+ "__init__.py" = ["F401"]
75
+
76
+ # ───────────────────────────────────────────────
77
+ # pytest
78
+ # ───────────────────────────────────────────────
79
+
80
+ [tool.pytest.ini_options]
81
+ testpaths = ["tests"]
82
+ addopts = "-v"
@@ -0,0 +1,6 @@
1
+ """ico-mcp: a universal MCP server on top of the ICO framework.
2
+
3
+ See ``docs/design/ico-mcp.md`` for the design.
4
+ """
5
+
6
+ __version__ = "0.1.0"
@@ -0,0 +1,5 @@
1
+ """``python -m ico_mcp``: run the MCP server."""
2
+
3
+ from ico_mcp.server import main
4
+
5
+ main()