@speakquery/mycel 0.0.0-stage → 0.1.1
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.
- package/LICENSE +202 -0
- package/README.md +415 -2
- package/dashboard/index.html +1595 -0
- package/dist/a2a-client.d.ts +104 -0
- package/dist/a2a-client.js +108 -0
- package/dist/a2a-client.js.map +1 -0
- package/dist/a2a-server.d.ts +32 -0
- package/dist/a2a-server.js +218 -0
- package/dist/a2a-server.js.map +1 -0
- package/dist/adapter.d.ts +44 -0
- package/dist/adapter.js +61 -0
- package/dist/adapter.js.map +1 -0
- package/dist/bench.d.ts +40 -0
- package/dist/bench.js +208 -0
- package/dist/bench.js.map +1 -0
- package/dist/catalog.d.ts +69 -0
- package/dist/catalog.js +206 -0
- package/dist/catalog.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +365 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +290 -0
- package/dist/config.js +177 -0
- package/dist/config.js.map +1 -0
- package/dist/contracts.d.ts +26 -0
- package/dist/contracts.js +67 -0
- package/dist/contracts.js.map +1 -0
- package/dist/core.d.ts +210 -0
- package/dist/core.js +491 -0
- package/dist/core.js.map +1 -0
- package/dist/http.d.ts +22 -0
- package/dist/http.js +264 -0
- package/dist/http.js.map +1 -0
- package/dist/importer.d.ts +31 -0
- package/dist/importer.js +116 -0
- package/dist/importer.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/jobs.d.ts +97 -0
- package/dist/jobs.js +263 -0
- package/dist/jobs.js.map +1 -0
- package/dist/meta.d.ts +13 -0
- package/dist/meta.js +120 -0
- package/dist/meta.js.map +1 -0
- package/dist/models.d.ts +38 -0
- package/dist/models.js +75 -0
- package/dist/models.js.map +1 -0
- package/dist/oauth.d.ts +69 -0
- package/dist/oauth.js +160 -0
- package/dist/oauth.js.map +1 -0
- package/dist/policy.d.ts +90 -0
- package/dist/policy.js +205 -0
- package/dist/policy.js.map +1 -0
- package/dist/recorder.d.ts +88 -0
- package/dist/recorder.js +194 -0
- package/dist/recorder.js.map +1 -0
- package/dist/refs.d.ts +128 -0
- package/dist/refs.js +455 -0
- package/dist/refs.js.map +1 -0
- package/dist/sandbox.d.ts +30 -0
- package/dist/sandbox.js +176 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/secrets.d.ts +20 -0
- package/dist/secrets.js +81 -0
- package/dist/secrets.js.map +1 -0
- package/dist/server.d.ts +13 -0
- package/dist/server.js +100 -0
- package/dist/server.js.map +1 -0
- package/dist/tokens.d.ts +45 -0
- package/dist/tokens.js +84 -0
- package/dist/tokens.js.map +1 -0
- package/dist/upstream.d.ts +90 -0
- package/dist/upstream.js +149 -0
- package/dist/upstream.js.map +1 -0
- package/package.json +61 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
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 The Mycel Authors
|
|
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.
|
|
202
|
+
|
package/README.md
CHANGED
|
@@ -1,3 +1,416 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<a href="https://mycel.speakquery.ai/#film"><img src="media/mycel-launch-preview.gif" alt="Mycel launch film — click to watch the full 90-second video" width="860"></a>
|
|
4
|
+
|
|
5
|
+
# Mycel
|
|
6
|
+
|
|
7
|
+
### One layer between your agents and everything they touch.
|
|
8
|
+
|
|
9
|
+
**A drop-in MCP gateway + agent-to-agent mesh.**
|
|
10
|
+
Your existing MCP setup — minus the context bloat, the round-trip storms and the blind trust.
|
|
11
|
+
|
|
12
|
+
[](LICENSE)
|
|
13
|
+
[](package.json)
|
|
14
|
+
[](https://modelcontextprotocol.io)
|
|
15
|
+
[](https://a2a-protocol.org)
|
|
16
|
+
[](tests)
|
|
17
|
+
|
|
18
|
+
[**▶ Watch the 90-second film**](https://mycel.speakquery.ai/#film) · [Quickstart](#-quickstart) · [Benchmark](#-the-numbers) · [How it works](#-how-it-works) · [All 20 features](#-features) · [Docs](docs/)
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
mycel init # finds your Claude / Cursor / VS Code / Windsurf MCP servers and imports them
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
<sub>Install first: `npm install -g @speakquery/mycel` (macOS, Linux, Windows, Node 20+). The command is `mycel`.</sub>
|
|
29
|
+
|
|
30
|
+
> **Is Mycel a new protocol?** No — and that's the point. Mycel speaks plain **MCP** to your client and plain **MCP** to your servers, so nothing has to change on either side. It also speaks **A2A** so other agents can use your tools under the same rules. Think of it as the missing middle layer both protocols assumed someone else would build.
|
|
31
|
+
|
|
32
|
+
## 😩 The problem
|
|
33
|
+
|
|
34
|
+
Connect an agent to a dozen MCP servers and you get:
|
|
35
|
+
|
|
36
|
+
| | Pain | What it costs you |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| 🧠 | **Context bloat** — every tool schema is loaded up front | ~35k tokens gone before the first word; worse tool choice |
|
|
39
|
+
| 🚚 | **Everything flows through the model** | 10,000 rows from tool A to tool B = 10,000 rows in the prompt |
|
|
40
|
+
| 🔁 | **Round-trip storms** | a 20-step task = 20 inference turns |
|
|
41
|
+
| 🎭 | **Prompt injection & rug pulls** | a web page can tell your agent to email your keys; a server can silently rewrite a tool description |
|
|
42
|
+
| 🎬 | **Long-running AI work has no home** | video, renders and batch jobs time out mid-call |
|
|
43
|
+
| 🔑 | **Sub-agents inherit every key** | delegation means "here's everything, please behave" |
|
|
44
|
+
| 🕳️ | **No black box** | nobody can see what the agent did, why, or what it cost |
|
|
45
|
+
|
|
46
|
+
## 📊 The numbers
|
|
47
|
+
|
|
48
|
+
Measured by `mycel bench` — a reproducible in-process benchmark with 12 realistic servers (GitHub, Slack, Gmail, Calendar, Notion, Linear, Postgres, filesystem, browser, Drive, an AI media studio, Stripe test mode). Token counts use the same estimator (≈ 4 chars/token) on both sides.
|
|
49
|
+
|
|
50
|
+
| Scenario | Direct MCP | Through Mycel | Saved |
|
|
51
|
+
|---|---:|---:|---:|
|
|
52
|
+
| Tool definitions in context (167 tools) | **34.8k** tokens | **1.1k** tokens | **96.7%** |
|
|
53
|
+
| *"Label every stale issue"* (20 of 40) | 21 round trips · 6,071 tokens | **1 round trip** · 77 tokens | **98.7%** |
|
|
54
|
+
| 5,000-row SQL result | 29.7k tokens | 156 tokens (digest + ref) | **99.5%** |
|
|
55
|
+
| 8 s 720p video (3.1 MB) | 1,068k tokens as base64 (won't fit) | 117 tokens (metadata + 3 keyframe refs) | **>99.9%** |
|
|
56
|
+
| Tool search, offline BM25 (20 queries) | — | top-1 **18/20** · top-3 **20/20** | — |
|
|
57
|
+
|
|
58
|
+
<sub>Methodology & caveats: [`src/bench.ts`](src/bench.ts). "Direct" counts only what the model must read; it ignores prompt caching, which lowers cost (not context size) for the direct case.</sub>
|
|
59
|
+
|
|
60
|
+
## 💰 What you actually save — worked examples
|
|
61
|
+
|
|
62
|
+
Short version: **with 1–2 servers you save nothing; with 8 you save ~94%; with a big setup you save ~99%.** Direct MCP re-sends every tool definition on every turn, Mycel stays flat at ~1k tokens. All numbers below are measured (see [Do you need Mycel?](#-do-you-need-mycel) and the [field test](#-field-test-8-real-mcp-servers)), except the dollar line, which is an illustrative assumption.
|
|
63
|
+
|
|
64
|
+
| | Scenario | Direct MCP | Through Mycel | Saved |
|
|
65
|
+
|---|---|---:|---:|---:|
|
|
66
|
+
| 🖱️ | 8 servers, 30-turn session (definitions only) | 534k tokens | ~31k | **~94%** |
|
|
67
|
+
| 🧰 | All 15 servers / 414 tools, per turn | ~204k tokens | ~1.2k | **99.4%** |
|
|
68
|
+
| 📄 | Read a 20,000-row CSV | 131k tokens | 187 | **>99.8%** |
|
|
69
|
+
| 🔁 | "Find stale notes and save a report" | 17 round trips | 1 | **16 fewer** |
|
|
70
|
+
|
|
71
|
+
### 🖱️ Example 1: Cursor with 8 MCP servers, 30-turn session
|
|
72
|
+
|
|
73
|
+
You connect 8 servers (80 tools). Direct MCP sends all 80 definitions (**17.8k tokens**) with every turn, so a 30-turn session spends **17.8k × 30 = 534k tokens** on definitions alone. Through Mycel the model sees ~1.0k tokens per turn: **1.0k × 30 ≈ 31k**.
|
|
74
|
+
|
|
75
|
+
<p align="center"><img src="media/chart-conversation.svg" alt="Cumulative tokens over a 30-turn conversation with 8 servers: 534k direct versus 31k through Mycel" width="860"></p>
|
|
76
|
+
|
|
77
|
+
> 💵 *Illustrative assumption, not a measurement:* at $3 per million input tokens, before caching, that is about **$1.60 vs $0.09 per session**. Prompt caching lowers the price of the repeated definitions, but not the space they take in your context window.
|
|
78
|
+
|
|
79
|
+
### 🧰 Example 2: All 15 servers, 414 tools
|
|
80
|
+
|
|
81
|
+
Add Canva (44 tools) and Higgsfield (241 tools) to the others and direct MCP needs **~204k tokens of definitions**. That is more than a 200k context window **before you type the first message**. Mycel: **~1.2k**. At 9 servers with Canva (126 tools) it is already 44.5k vs 1.05k (−97.6%).
|
|
82
|
+
|
|
83
|
+
<p align="center"><img src="media/chart-fullscale.svg" alt="Horizontal bars: 8 servers 17.8k vs 1.0k, 9 servers with Canva 44.5k vs 1.05k, 15 servers with 414 tools about 204k vs 1.2k, with a 200k context window line" width="860"></p>
|
|
84
|
+
|
|
85
|
+
### 📄 Example 3: Reading a 20,000-row CSV
|
|
86
|
+
|
|
87
|
+
Direct: the whole file flows through the model, **131k tokens**. Through Mycel the model gets a reference plus a digest (row count, columns, a sample): **187 tokens**. It can still ask for specific rows or pass the ref to another tool without ever reading the file.
|
|
88
|
+
|
|
89
|
+
### 🔁 Example 4: A 17-step chore
|
|
90
|
+
|
|
91
|
+
"Find stale notes and save a report" takes **17 round trips** when the model drives every call. With Code Mode the model writes one small script and Mycel runs it: **1 round trip**. Per-call overhead of the gateway: **+0.4 ms** median. And the safe default holds: an untrusted web page trying to trigger `write_file` is **blocked and needs approval**.
|
|
92
|
+
|
|
93
|
+
**Where it does *not* help:** with 1–2 servers Mycel is break-even or slightly worse (−4% / −3%). Skip it there, unless you want the safety layer, refs or Code Mode.
|
|
94
|
+
|
|
95
|
+
## 🤔 Do you need Mycel?
|
|
96
|
+
|
|
97
|
+
Honest answer: **it depends on how many MCP servers your agent uses.** Measured with 8 real open-source servers ([field test](examples/field-test)), adding them one at a time:
|
|
98
|
+
|
|
99
|
+
<p align="center"><img src="media/chart-scaling.svg" alt="Line chart: direct MCP tool definitions grow from 1.1k to 17.8k tokens across 1 to 8 servers while Mycel stays near 1k; break-even is around 3 servers" width="860"></p>
|
|
100
|
+
|
|
101
|
+
| MCP servers | Tools | Tool definitions, direct | Through Mycel | Context saved |
|
|
102
|
+
|---:|---:|---:|---:|---:|
|
|
103
|
+
| 1 | 3 | 1.1k tokens | 1.1k | **−4%** (small overhead) |
|
|
104
|
+
| 2 | 4 | 1.5k | 1.5k | −3% |
|
|
105
|
+
| 3 | 18 | 4.7k | 3.8k | 19% |
|
|
106
|
+
| **4** | **32** | **6.7k** | **0.9k** | **86%** |
|
|
107
|
+
| 6 | 42 | 10.6k | 1.0k | 91% |
|
|
108
|
+
| 8 | 80 | 17.8k | 1.0k | **94%** |
|
|
109
|
+
|
|
110
|
+
Mycel's own footprint stays flat at ~1k tokens. Direct MCP grows with every server you add, and on *every* turn the model re-reads all of those definitions.
|
|
111
|
+
|
|
112
|
+
**You'll feel it if…**
|
|
113
|
+
- you use **4+ MCP servers**, or one big one (Playwright, GitHub, Notion: 20–90 tools each);
|
|
114
|
+
- your tools return **big results**: files, tables, logs, page snapshots, images, video. A 20,000-row CSV is 131k tokens direct and 187 through Mycel;
|
|
115
|
+
- your agent does **many small steps** (read 15 files, decide, write): Code Mode does it in 1 round trip instead of 17;
|
|
116
|
+
- your agent reads **untrusted content** (web, email, tickets) *and* can write, send or delete;
|
|
117
|
+
- you need to **see and cap** what agents do: approvals, budgets, an audit trail, or other agents (A2A) calling your tools.
|
|
118
|
+
|
|
119
|
+
**You probably don't need it if…** you run 1–2 small servers and only make short, read-only calls. Your client is fine on its own, and Mycel's `auto` mode would just show those tools directly anyway.
|
|
120
|
+
|
|
121
|
+
**Your client matters too.** Claude Code already loads tool definitions on demand, so there you'd use Mycel mainly for Code Mode, refs, the safety layer and A2A. Cursor, Claude Desktop, VS Code, Windsurf and most agent frameworks send every definition on every turn, so there the context savings above apply in full.
|
|
122
|
+
|
|
123
|
+
## 🔬 Field test: 8 real MCP servers
|
|
124
|
+
|
|
125
|
+
`cd examples/field-test && npm install && npm run setup && npm test` runs these checks on your own machine (macOS, Linux or Windows):
|
|
126
|
+
|
|
127
|
+
| # | Check | Result |
|
|
128
|
+
|---|---|---|
|
|
129
|
+
| S1 | Tool definitions in context (80 tools) | 17.8k → **1.0k** tokens (−94%) |
|
|
130
|
+
| S2 | Startup until tools are listed | about the same as direct (≈0.5–1.5 s) |
|
|
131
|
+
| S3 | Offline tool search, 16 natural-language queries | top-3 **16/16**, top-1 10/16 |
|
|
132
|
+
| S4 | Per-call overhead (median of 15) | **+0.4 ms** |
|
|
133
|
+
| S5 | 20,000-row CSV through `read_text_file` | 131k → **187** tokens (ref + table digest, grep-able) |
|
|
134
|
+
| S6 | "Find stale notes, save a report" (17 calls) | 17 round trips → **1** (Code Mode) |
|
|
135
|
+
| S7 | Web page (untrusted) → `write_file` | **blocked**, approval required |
|
|
136
|
+
| S8 | Browser automation (Playwright) | works, no needless prompts |
|
|
137
|
+
| S9 | Images, progress notifications | image → ref, 4/4 progress events forwarded |
|
|
138
|
+
| S10 | Risk classes for Playwright's 25 tools | 7 read · 13 external · 5 destructive |
|
|
139
|
+
|
|
140
|
+
**Plus a real remote server with OAuth:** after `mycel login canva`, Canva's 44 tools work through Mycel, and the tokens refresh automatically. With Canva added, the lab holds 126 tools: **44.5k tokens of definitions direct, 1.05k through Mycel (−97.6%)**.
|
|
141
|
+
|
|
142
|
+
**At full scale:** 15 servers including Canva and Higgsfield (241 tools on its own), 414 tools in all. The tool definitions cost about **204k tokens direct and 1.2k through Mycel (−99.4%)**. Direct, that would fill most of a model's context window before the first message.
|
|
143
|
+
|
|
144
|
+
The field test found four real bugs before launch. All are fixed and covered by tests:
|
|
145
|
+
- Playwright marks even `hover` as destructive. Mycel now cross-checks that label against the tool's name (`annotations: strict` opts out).
|
|
146
|
+
- A big text result that came wrapped in JSON lost its table digest.
|
|
147
|
+
- grep on a single very long line returned the whole line.
|
|
148
|
+
- A few search synonyms were missing.
|
|
149
|
+
|
|
150
|
+
## 🚀 Quickstart
|
|
151
|
+
|
|
152
|
+
Works on **macOS, Linux and Windows** (Node 20+). `ffmpeg` is optional (video/audio digests). The servers you bring decide the rest. For example, Python-based servers need [`uv`](https://docs.astral.sh/uv/).
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Install (the command is `mycel`)
|
|
156
|
+
npm install -g @speakquery/mycel
|
|
157
|
+
|
|
158
|
+
# 1. Import the MCP servers you already use (secrets become {{secret:NAME}} placeholders)
|
|
159
|
+
mycel init
|
|
160
|
+
|
|
161
|
+
# 2. Check everything connects and see your own savings
|
|
162
|
+
mycel doctor
|
|
163
|
+
mycel bench
|
|
164
|
+
|
|
165
|
+
# 3. Remote servers with a sign-in (Canva, Notion, Linear, …): once per server
|
|
166
|
+
mycel login canva
|
|
167
|
+
|
|
168
|
+
# 4. Point your client at Mycel instead of N servers
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
<table>
|
|
172
|
+
<tr><th>Claude Code</th><th>Claude Desktop / Cursor / Windsurf / VS Code (<code>mcpServers</code>)</th></tr>
|
|
173
|
+
<tr><td>
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
claude mcp add mycel -- mycel serve
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
</td><td>
|
|
180
|
+
|
|
181
|
+
```json
|
|
182
|
+
{ "mcpServers": { "mycel": { "command": "mycel", "args": ["serve"] } } }
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
</td></tr>
|
|
186
|
+
</table>
|
|
187
|
+
|
|
188
|
+
Open **http://localhost:4747** for the live dashboard. Want the guided tour with real output? → [`examples/demo`](examples/demo).
|
|
189
|
+
|
|
190
|
+
## 🧬 How it works
|
|
191
|
+
|
|
192
|
+
```mermaid
|
|
193
|
+
flowchart TB
|
|
194
|
+
subgraph Clients["Any MCP client · any A2A agent"]
|
|
195
|
+
C1[Claude] --- C2[Cursor] --- C3[VS Code] --- C4[Local LLM] --- C5[Other agents]
|
|
196
|
+
end
|
|
197
|
+
Clients -- "MCP (stdio / HTTP) · A2A JSON-RPC" --> M
|
|
198
|
+
subgraph M["MYCEL"]
|
|
199
|
+
direction TB
|
|
200
|
+
MT["8 meta-tools: search · describe · call · run · ref · job · delegate · ask"]
|
|
201
|
+
subgraph Engine[" "]
|
|
202
|
+
R[Smart Router] --- CM[Code Mode sandbox] --- RS[Ref Store] --- J[Job Queue] --- MR[Model Router]
|
|
203
|
+
end
|
|
204
|
+
subgraph Trust["Trust layer"]
|
|
205
|
+
P[Policy firewall] --- T[Provenance / taint] --- S[Secret vault] --- PN[Manifest pinning] --- CT[Capability tokens]
|
|
206
|
+
end
|
|
207
|
+
FR["Flight recorder → dashboard · OpenTelemetry"]
|
|
208
|
+
MT --> Engine --> Trust --> FR
|
|
209
|
+
end
|
|
210
|
+
M -- MCP --> S1[GitHub] & S2[Video model] & S3[Database] & S4[…any server]
|
|
211
|
+
M -- A2A --> A1[Remote agents]
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
The model sees **eight small meta-tools** instead of hundreds of schemas. A typical turn:
|
|
215
|
+
|
|
216
|
+
```text
|
|
217
|
+
mycel_search {"query": "make a video from a prompt"}
|
|
218
|
+
→ [{"tool":"studio.generate_video","effect":"external","async":true,"costUsd":0.4,…}]
|
|
219
|
+
mycel_call {"tool":"studio.generate_video","args":{"prompt":"a fox in neon rain"}}
|
|
220
|
+
→ {"status":"job","job":{"id":"job_3f9…","status":"running","progress":42,"total":100}}
|
|
221
|
+
mycel_job {"action":"wait","id":"job_3f9…"}
|
|
222
|
+
→ {"status":"succeeded","result":{"ref":"ref://9c1e…","mime":"video/mp4","size":"48.2 MB",
|
|
223
|
+
"digest":{"kind":"video","durationSec":8,"width":1920,"height":1080,"keyframes":["ref://…","ref://…","ref://…"]}}}
|
|
224
|
+
mycel_call {"tool":"studio.upscale_video","args":{"video":{"$ref":"ref://9c1e…","as":"path"}}}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
48 MB of video moved between two tools. The model read ~120 tokens.
|
|
228
|
+
|
|
229
|
+
## ✨ Features
|
|
230
|
+
|
|
231
|
+
All 20 ship in v1. Every one is opt-in beyond the defaults, and a 10-line config works.
|
|
232
|
+
|
|
233
|
+
### Speed & context
|
|
234
|
+
| Feature | What it does |
|
|
235
|
+
|---|---|
|
|
236
|
+
| **1 · Smart Tool Router** | BM25 search (names ×3, server ×2, descriptions, params, synonyms) over every connected tool. Schemas load only on demand. Modes: `auto` (default — small catalogs get every tool directly plus `run`/`ref`/`job`; past ~4k tokens of definitions it switches to `meta`), `meta`, `hybrid` (meta-tools + your top-N most-used tools directly), `passthrough`. |
|
|
237
|
+
| **2 · Code Mode** | The model writes one async JS script; it runs in a **QuickJS WebAssembly sandbox** (no fs, no network, no Node APIs, CPU/memory/call caps). Only the return value comes back. `Promise.all` works. |
|
|
238
|
+
| **3 · Ref Store** | Content-addressed (`ref://<sha256>`) storage for anything big or binary, with model-sized **digests**: JSON shape + sample, table columns + stats, text outline, image/video/audio metadata, video keyframes (ffmpeg). Pass refs straight into tool args as text, JSON, base64, data URL or file path. |
|
|
239
|
+
| **4 · Job Queue** | Slow tools become jobs: progress, cancel, retry with backoff, **provider fallback chains**, resume after restart (idempotent jobs only — nothing runs twice by surprise). |
|
|
240
|
+
| **5 · Cost & Budget** | Per-tool cost/latency contracts, `dryRun` estimates, per-task / per-day / per-token spend caps. |
|
|
241
|
+
| **15 · Model Router** | `mycel_ask` hands self-contained sub-tasks (summarise, extract, classify) to a `fast`/`balanced`/`deep` tier — any OpenAI-compatible endpoint (Ollama, vLLM, LM Studio, OpenRouter…) or Anthropic. Refs in the prompt are expanded for the sub-model, not your main context. |
|
|
242
|
+
|
|
243
|
+
### Trust
|
|
244
|
+
| Feature | What it does |
|
|
245
|
+
|---|---|
|
|
246
|
+
| **6 · Tool Contracts** | Every tool gets an effect class — `read` · `write` · `external` · `destructive` — plus idempotency, cost, latency, async. Inferred from MCP annotations and names (cautiously), overridable in config. |
|
|
247
|
+
| **7 · Policy Firewall** | Ordered YAML rules: `allow` / `deny` / `approve` by tool glob, server, effect or taint. Safe defaults: destructive → approve; tainted + side-effect → approve. |
|
|
248
|
+
| **8 · Provenance & Taint** | Output from `trust: untrusted` servers is labelled and **taint follows the data** — through refs and through code-mode scripts. A script that read a hostile web page can't quietly send email. |
|
|
249
|
+
| **9 · Secret Vault** | The model only ever sees `{{secret:GITHUB_TOKEN}}`. Real values are injected at call time and scrubbed from every output, error and trace. |
|
|
250
|
+
| **10 · Manifest Pinning** | Tool definitions are hashed into `mycel.lock`. If a server silently changes a tool's description or schema (a "rug pull"), the tool is blocked until a human runs `mycel pin --accept`. |
|
|
251
|
+
| **14 · Capability Tokens** | Macaroon-style, attenuable, expiring delegation tokens (`myc1.…`). A sub-agent can narrow its token — fewer tools, lower effect ceiling, smaller budget, shorter expiry — and hand it on, but can **never** widen it. No secret needed to attenuate. |
|
|
252
|
+
| **Approvals** | Inline via MCP **elicitation** when the client supports it; otherwise an approval id the human grants with `mycel approve <id>` or one click in the dashboard. Approvals are one-shot and bound to the exact arguments. |
|
|
253
|
+
|
|
254
|
+
### Visibility
|
|
255
|
+
| Feature | What it does |
|
|
256
|
+
|---|---|
|
|
257
|
+
| **11 · Flight Recorder** | Every search, call, script, job, approval and policy decision is a span: timing, tokens saved, bytes offloaded, cost, taint. JSONL on disk + **OpenTelemetry (OTLP/HTTP)** export. `mycel replay <trace>`. |
|
|
258
|
+
| **12 · Live Dashboard** | Local web UI: savings, live activity, trace waterfalls, approvals, jobs, servers, drift, refs. Token-protected and DNS-rebinding-safe. |
|
|
259
|
+
|
|
260
|
+
### Mesh & integration
|
|
261
|
+
| Feature | What it does |
|
|
262
|
+
|---|---|
|
|
263
|
+
| **13 · A2A Bridge** | Mycel *is* an A2A agent (Agent Card at `/.well-known/agent-card.json`, `message/send`, `tasks/get`, `tasks/cancel`) **and** an A2A client (`mycel_delegate` to your peers). Same policy, budget, taint and recording for agents as for MCP clients. |
|
|
264
|
+
| **16 · Universal import** | `mycel init` reads Claude Desktop, Claude Code (incl. per-project), Cursor, VS Code, Windsurf and Gemini CLI configs. |
|
|
265
|
+
| **17 · Both transports** | Serve over stdio (desktop clients) or Streamable HTTP (`/mcp`, teams/remote). Upstreams over stdio or HTTP. |
|
|
266
|
+
| **18 · Python client** | `pip install "git+https://github.com/SpeakQuery/mycel#subdirectory=python"` — zero dependencies. |
|
|
267
|
+
| **19 · Benchmark** | `mycel bench` — the numbers above, reproducible on your machine. |
|
|
268
|
+
| **20 · Adapter SDK** | `defineAdapter({...})` turns ~50 lines into a provider (a new video model, an internal API) that works in-process *and* as a standalone MCP server. |
|
|
269
|
+
|
|
270
|
+
## ⚙️ Configuration
|
|
271
|
+
|
|
272
|
+
`mycel.yaml` (generated by `mycel init`):
|
|
273
|
+
|
|
274
|
+
```yaml
|
|
275
|
+
servers:
|
|
276
|
+
github:
|
|
277
|
+
command: npx
|
|
278
|
+
args: ["-y", "@modelcontextprotocol/server-github"]
|
|
279
|
+
env: { GITHUB_TOKEN: "{{secret:GITHUB_TOKEN}}" }
|
|
280
|
+
canva:
|
|
281
|
+
url: https://mcp.canva.com/mcp # OAuth: run `mycel login canva` once; tokens refresh automatically
|
|
282
|
+
studio:
|
|
283
|
+
url: https://studio.example.com/mcp
|
|
284
|
+
headers: { Authorization: "Bearer {{secret:STUDIO_KEY}}" }
|
|
285
|
+
tools: # contract overrides
|
|
286
|
+
generate_video: { async: true, costUsd: 0.40, fallback: ["backup.generate_video"], retries: 1 }
|
|
287
|
+
web:
|
|
288
|
+
command: node
|
|
289
|
+
args: ["./web-server.mjs"]
|
|
290
|
+
trust: untrusted # its output is labelled and taints downstream calls
|
|
291
|
+
|
|
292
|
+
router: { mode: auto } # auto | meta | hybrid | passthrough
|
|
293
|
+
policy:
|
|
294
|
+
- match: { tool: "github.*delete*" }
|
|
295
|
+
action: deny
|
|
296
|
+
- match: { effect: destructive }
|
|
297
|
+
action: approve
|
|
298
|
+
- match: { tainted: true, effect: external }
|
|
299
|
+
action: approve
|
|
300
|
+
reason: Untrusted content is trying to send something out.
|
|
301
|
+
budget: { perTaskUsd: 5, perDayUsd: 50 }
|
|
302
|
+
refs: { inlineLimitBytes: 8000 }
|
|
303
|
+
sandbox: { timeoutMs: 30000, memoryMb: 64, maxToolCalls: 200 }
|
|
304
|
+
jobs: { asyncThresholdMs: 20000, concurrency: 4 }
|
|
305
|
+
recorder: { otlpEndpoint: http://localhost:4318 } # optional
|
|
306
|
+
models: # optional, enables mycel_ask
|
|
307
|
+
fast: { provider: openai, baseUrl: http://localhost:11434/v1, model: llama3.2 }
|
|
308
|
+
balanced: { provider: anthropic, model: claude-haiku-5-5, apiKey: "{{secret:ANTHROPIC_API_KEY}}" }
|
|
309
|
+
a2a: # optional
|
|
310
|
+
tokenSecret: "{{secret:MYCEL_TOKEN_SECRET}}"
|
|
311
|
+
peers:
|
|
312
|
+
researcher: { url: https://research.example.com, token: "{{secret:RESEARCHER_TOKEN}}" }
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Full reference: [`docs/configuration.md`](docs/configuration.md).
|
|
316
|
+
|
|
317
|
+
## 🧪 Code Mode
|
|
318
|
+
|
|
319
|
+
```js
|
|
320
|
+
// mycel_run — one round trip instead of 21
|
|
321
|
+
const issues = await tools.call("github.list_issues", { repo: "acme/web", state: "open" });
|
|
322
|
+
const stale = issues.filter(i => daysSince(i.updated_at) > 30);
|
|
323
|
+
await Promise.all(stale.map(i => tools.call("github.add_label", { repo: "acme/web", issue: i.number, label: "stale" })));
|
|
324
|
+
return { labelled: stale.length };
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
Sandbox API: `tools.call(id, args)`, `tools.search(q)`, `refs.read(ref, {path, rows, grep, offset, length})`, `refs.put(value)`, `jobs.run(tool, args)`, `jobs.submit / wait`, `ask(prompt, {tier})`, `console.log`, `sleep`, `daysSince`, `chunk`, `pick`. Every `tools.call` goes through the same policy, budget, taint and recording as a direct call.
|
|
328
|
+
|
|
329
|
+
## 🤝 Agent to agent
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
export MYCEL_TOKEN_SECRET=$(mycel token secret)
|
|
333
|
+
mycel serve --http --port 4747 # MCP at /mcp, A2A at /a2a
|
|
334
|
+
|
|
335
|
+
# Give a research agent read-only GitHub access for 2 hours, max $1
|
|
336
|
+
TOKEN=$(mycel token mint --tools 'github.*' --max-effect read --budget 1 --ttl 2h --sub researcher)
|
|
337
|
+
# …which it can narrow further for its own sub-agent — but never widen
|
|
338
|
+
mycel token attenuate "$TOKEN" --tools 'github.list_*' --ttl 10m --sub summarizer
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
curl -s localhost:4747/a2a -H "authorization: Bearer $TOKEN" -H 'content-type: application/json' -d '{
|
|
343
|
+
"jsonrpc":"2.0","id":1,"method":"message/send",
|
|
344
|
+
"params":{"message":{"kind":"message","role":"user","messageId":"1",
|
|
345
|
+
"parts":[{"kind":"data","data":{"tool":"github.list_issues","args":{"repo":"acme/web"}}}]}}}'
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
A destructive request comes back as `input-required` with an approval id; after a human approves, the agent resumes the same task. See [`examples/a2a`](examples/a2a).
|
|
349
|
+
|
|
350
|
+
## 🐍 Python
|
|
351
|
+
|
|
352
|
+
```python
|
|
353
|
+
from mycel_client import Mycel, ApprovalRequired
|
|
354
|
+
|
|
355
|
+
m = Mycel("http://127.0.0.1:4747")
|
|
356
|
+
print(m.search("make a video"))
|
|
357
|
+
issues = m.call("github.list_issues", {"repo": "acme/web"})
|
|
358
|
+
print(m.run("return (await tools.call('github.list_issues', {})).length"))
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
## 🔌 Write an adapter
|
|
362
|
+
|
|
363
|
+
```js
|
|
364
|
+
import { defineAdapter, file } from "mycel";
|
|
365
|
+
|
|
366
|
+
export default defineAdapter({
|
|
367
|
+
name: "my-video-model",
|
|
368
|
+
tools: [{
|
|
369
|
+
name: "generate_video",
|
|
370
|
+
description: "Generate a video from a prompt",
|
|
371
|
+
input: { type: "object", properties: { prompt: { type: "string" } }, required: ["prompt"] },
|
|
372
|
+
effect: "external", async: true, costUsd: 0.4,
|
|
373
|
+
async run({ prompt }, { progress }) {
|
|
374
|
+
const id = await startRender(prompt);
|
|
375
|
+
for (let p; (p = await poll(id)).status !== "done"; ) progress(p.percent, 100);
|
|
376
|
+
return file(await download(id), "video/mp4", "out.mp4"); // becomes a ref:// with keyframes
|
|
377
|
+
},
|
|
378
|
+
}],
|
|
379
|
+
}).serve(); // a standalone MCP server, too
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
## 🖥️ CLI
|
|
383
|
+
|
|
384
|
+
| Command | |
|
|
385
|
+
|---|---|
|
|
386
|
+
| `mycel init` | import client configs → `mycel.yaml` |
|
|
387
|
+
| `mycel serve [--http]` | run the gateway (stdio, or HTTP with `/mcp` + `/a2a`) |
|
|
388
|
+
| `mycel dashboard` | open the local dashboard |
|
|
389
|
+
| `mycel doctor` · `mycel bench` | check setup · measure savings |
|
|
390
|
+
| `mycel login <server>` | sign in to a remote MCP server that uses OAuth (Canva, Notion, Linear, …) |
|
|
391
|
+
| `mycel search <q>` · `mycel call <tool> [json]` · `mycel run <file>` | use tools from the terminal, same rules as agents |
|
|
392
|
+
| `mycel approvals` · `approve <id>` · `deny <id>` | human-in-the-loop |
|
|
393
|
+
| `mycel pin [--accept]` | review / accept tool-definition drift |
|
|
394
|
+
| `mycel token secret / mint / attenuate / inspect` | capability tokens |
|
|
395
|
+
| `mycel traces` · `mycel replay <id>` | flight recorder |
|
|
396
|
+
| `mycel refs [--gc 7d]` | ref store |
|
|
397
|
+
|
|
398
|
+
## 🛡️ Security model — honestly
|
|
399
|
+
|
|
400
|
+
Mycel **reduces and exposes** risk; it does not "solve" prompt injection. What it guarantees: secrets never enter the model's context; destructive and tainted side-effects need a human by default; changed tool definitions are blocked; delegated agents can't exceed their token; everything is recorded. What it can't guarantee: that a trusted server is actually trustworthy, or that a model never misreads data as instructions. Code Mode runs in QuickJS/WASM with no ambient capabilities, but treat it as defence in depth, not a security boundary for hostile code. Report issues: [SECURITY.md](SECURITY.md).
|
|
401
|
+
|
|
402
|
+
## 🗺️ Roadmap
|
|
403
|
+
|
|
404
|
+
- Streaming refs for realtime audio/video agents
|
|
405
|
+
- Embedding-based search as an optional plug-in (BM25 stays the offline default)
|
|
406
|
+
- A2A streaming (`message/stream`) and push notifications
|
|
407
|
+
- Signed tool manifests from server publishers
|
|
408
|
+
- Team mode: shared policy, approvals routed to Slack/Teams
|
|
409
|
+
|
|
410
|
+
## Contributing
|
|
411
|
+
|
|
412
|
+
PRs welcome — see [CONTRIBUTING.md](CONTRIBUTING.md). `npm install && npm test` runs the full suite (47 tests) in a few seconds.
|
|
413
|
+
|
|
414
|
+
## License
|
|
415
|
+
|
|
416
|
+
[Apache-2.0](LICENSE) © The Mycel Authors
|