Direct MCP
- 180tool schemas loaded up front
- 38ktokens of tool definitions
- 10inference round trips
Open source · Apache-2.0 · Node ≥ 20
MCP-compatible gateway + agent-to-agent mesh. Drop-in. Local-first. Open source.
npx -y github:SpeakQuery/mycel init
Imports your existing Claude, Cursor, VS Code and Windsurf MCP configs. No account. No telemetry.
Launch video coming soon.
In the meantime, read the code on GitHub.
The problem
Connect a dozen servers and your agent pays for it on every turn. Eight pains we kept hitting:
Every server dumps its full tool schemas up front. Thirty servers cost tens of thousands of tokens before the first word.
Moving 10k rows from tool A to tool B means 10k rows in the context window.
A 10-step task becomes 10 inference turns, each one slow and billed.
Tool output can smuggle instructions, descriptions can change silently (rug pulls), and API keys sit in prompts.
No latency, no price, no hint whether a call can be undone.
Video, render and training calls simply time out.
Sub-agents inherit full credentials, with no way to narrow them.
Nobody can see what an agent did, or why.
Before / after
Measured with mycel bench: the same catalog of 12 servers, called directly over MCP and through Mycel.
Reproduce it yourself: npx -y github:SpeakQuery/mycel bench. Numbers vary with your catalog and task.
Architecture
Clients speak plain MCP to Mycel. Remote agents speak A2A. Behind it, every upstream server and agent is reached through one trust layer and one recorder.
Features
A 10-line config works. Every advanced feature is opt-in.
The model sees 8 meta-tools instead of 300. BM25 search over the catalog; schemas load on demand.
mycel_search · mycel_describe · mycel_callThe model writes a short JS script that chains many calls in a QuickJS WebAssembly sandbox. Only the result returns.
mycel_runLarge or binary results are stored content-addressed and replaced by a model-sized digest. Refs pass straight between tools.
ref://sha256…Long calls become jobs with progress, cancel, resume, retries and provider fallback.
mycel_jobPer-tool cost and latency contracts, estimates before running, per-task and per-day caps.
dryRunEvery tool gets an effect class (read, write, destructive, external), idempotency, cost and latency.
mycel_describeYAML rules allow, deny or require approval by tool glob or effect. Approve via MCP elicitation or the CLI.
mycel approve <id>Content from web, email or unknown servers is labelled. Destructive actions with tainted inputs need approval.
automaticThe model only sees a placeholder. Real values are injected at call time and scrubbed from outputs.
{{secret:GITHUB_TOKEN}}Tool definitions are hashed. Silent changes are detected and blocked until re-approved.
mycel.lockMacaroon-style delegation tokens. A sub-agent can only narrow tools, effects, budget and expiry, never widen them.
mycel token attenuateEvery call traced: timing, tokens saved, cost, policy decisions. JSONL and OTLP export. Replay any task.
mycel replayA local web UI for the timeline, token savings, cost, jobs and approvals.
localhost:4747Reproducible: the same catalog, direct MCP vs Mycel, counting context tokens and round trips.
mycel benchMycel is an A2A agent with an Agent Card, and calls remote A2A agents as tools. MCP and A2A in one layer.
mycel_delegateTiered routing (fast, balanced, deep) to any OpenAI-compatible or Anthropic endpoint for sub-tasks and digests.
mycel_askReads Claude Desktop, Claude Code, Cursor, VS Code and Windsurf configs.
mycel initServe over stdio for desktop clients or Streamable HTTP for teams. Upstreams over either.
mycel serve --httpCall tools, refs, jobs and A2A agents from Python.
pip install mycel-clientA provider adapter, for example a new video model, is about 50 lines.
examples/How it works
One file. Secrets stay placeholders; unknown servers are marked untrusted; large results become refs.
servers:
github: { command: npx, args: ["-y", "@modelcontextprotocol/server-github"], env: { GITHUB_TOKEN: "{{secret:GITHUB_TOKEN}}" } }
studio: { url: "https://studio.example.com/mcp", trust: untrusted }
policy:
- match: { effect: destructive }
action: approve
- match: { tool: "github.*delete*" }
action: deny
budget: { perTaskUsd: 5, perDayUsd: 50 }
refs: { inlineLimitBytes: 8000 }
Via mycel_run, the script runs in a QuickJS sandbox. Intermediate data never enters the context; only the return value does.
const issues = await tools.call("github.list_issues", { repo: "acme/web", state: "open" });
const stale = issues.filter(i => daysSince(i.updated_at) > 30);
for (const i of stale) await tools.call("github.add_label", { repo: "acme/web", issue: i.number, label: "stale" });
return { labelled: stale.length };
Rules match by effect or tool glob. A destructive call pauses for approval; a forbidden one never reaches the server.
policy:
# reads flow freely
- match: { effect: read }
action: allow
# anything destructive waits for a human
- match: { effect: destructive }
action: approve
# and some things are simply off-limits
- match: { tool: "github.*delete*" }
action: deny
Where it fits
MCP and A2A are protocols. Mycel is a layer that speaks both and adds what they leave to implementers.
| Capability | MCP | A2A | Mycel |
|---|---|---|---|
| What it is | Protocol: agent ↔ tools | Protocol: agent ↔ agent | Gateway + mesh implementing both |
| Tool discovery | All schemas listed up front | Skills on an Agent Card | Search, schemas on demand |
| Multi-step chaining | One model turn per call | Per task | Code Mode: one turn |
| Large results | Inline in context | Artifacts | Content-addressed refs + digests |
| Long-running work | Progress notifications | Task lifecycle | Job queue with resume, retries, fallback |
| Policy & approvals | Left to the client | Left to the agent | YAML firewall + elicitation |
| Secrets | Left to the server | Auth schemes declared | Vault, injected and scrubbed |
| Rug-pull detection | Not specified | Not specified | Manifest pinning |
| Scoped delegation | Not specified | Not specified | Attenuable capability tokens |
| Observability | Not specified | Not specified | Flight recorder, OTLP, replay |
| Client changes needed | n/a | n/a | None |
Quickstart
Finds your existing MCP configs and writes mycel.yaml.
npx -y github:SpeakQuery/mycel initReplace your server list with one entry. stdio for desktop, --http for teams.
npx -y github:SpeakQuery/mycel serveTimeline, savings, cost and approvals at localhost:4747.
npx -y github:SpeakQuery/mycel dashboardFAQ
No. Mycel is a drop-in layer. To your client it is a standard MCP server; to other agents it is a standard A2A agent. Your existing MCP servers and clients keep working with zero changes.
No. Mycel is local-first: no account, no cloud, no telemetry. Traces stay on your machine as JSONL unless you configure your own OpenTelemetry endpoint. The only network traffic is to the servers, agents and models you configure.
No, and we'd be wary of anyone who says they do. Mycel reduces and exposes the risk: untrusted content is tainted, destructive actions with tainted inputs require approval, secrets never reach the model, tool manifests are pinned, and every decision is recorded. That makes attacks harder and visible, not impossible.
Any MCP client: Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, ChatGPT connectors and local LLM hosts, over stdio or Streamable HTTP.
Nothing. Mycel is open source under the Apache-2.0 license. Budgets in the config cap what your tools and models spend.
Star the repo, open an issue, or write an adapter in 50 lines.
npx -y github:SpeakQuery/mycel init