flywire-coding-cortex
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@flywire-coding-cortexsense urgent failing auth bug and show the resulting coding drives"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FlyWire Coding Cortex
Pip-installable connector for AI coding agents: install once, then every Cursor / OpenClaw / Claude session can run FlyWire-derived neurons (leaky integrate-and-fire on real synapse edges) and map population rates into coding drives (implement, stop, reverse, steer, groom).
Code license | MIT |
Circuit data | FlyWire-derived, CC BY-NC 4.0 |
Anatomy browser | |
Default seed | 668 neurons · ~19k signed edges (FAFB v783 escape/steering subgraph) |
Honesty bar: Wiring and contact counts come from public FlyWire data. Membrane dynamics, task→current encoding, and the rate→coding map are models. This does not claim biologically calibrated coding skill or that a fruit fly “understands” your codebase.
Why this exists
Most agent “skills” are markdown instructions. This package is a pip-installable tool plus an ambient skill/MCP connector so agents can call a real runtime every session—without cloning a folder into every project.
coding task
│
▼
sense (risk / tests / urgency → currents)
│
▼
LIF on FlyWire-derived circuit.json
│
▼
population rates (gf, dnp09, mdn, loom, …)
│
▼
CodingSignals (primary drive + clamps)
│
▼
agent acts ──verify──► Hebbian coding memoryRelated MCP server: ASTRA — Unified Research Lab + MCP Server
Quick start
# From this repository
pip install -e .
# Optional (needed for --profile full):
# pip install -e ".[full]"
flywire-cortex fetch --profile seed
flywire-cortex install
flywire-cortex statusSmoke test:
flywire-cortex reset
flywire-cortex sense --text "urgent failing auth bug"
flywire-cortex step --ms 50
flywire-cortex signalsExample: giant-fiber stop drive
flywire-cortex reset
flywire-cortex stimulate gf --strength 0.5 --ms 80
flywire-cortex step --ms 10
flywire-cortex signals
# → primary: "gf", escape: true, stop: trueIf pip install fails (SSL / corporate proxy), you can still run from source:
$env:PYTHONPATH = "C:\path\to\flywire-coding-cortex\src"
python -m flywire_coding_cortex.cli statusInstall
1. Package
pip install flywire-coding-cortex # when published to PyPI
# or
pip install -e . # from a clone
# or
uv tool install .pip install does not download connectome dumps. Data is opt-in via fetch.
2. Circuit profile
flywire-cortex fetch --list-profiles
flywire-cortex fetch --profile seed # default, offline after copy3. Wire agents
flywire-cortex install
# or subset:
flywire-cortex install --targets cursor openclawCopies skill/ into:
Target | Path |
Cursor |
|
OpenClaw |
|
Claude |
|
Also writes ~/.flywire-coding-cortex/mcp.snippet.json.
4. Optional MCP connector (Cursor)
Add to your Cursor MCP config:
{
"mcpServers": {
"flywire-coding-cortex": {
"command": "flywire-cortex",
"args": ["mcp"]
}
}
}Then restart the agent session. Tools exposed:
Tool | Purpose |
| Active profile + neuron/edge counts |
| Task text → sensory currents |
| Advance LIF ( |
| Stim a role group ( |
| Clamped coding drives JSON |
| Query / strengthen / weaken memory |
Download profiles
Choose (and later change) how much FlyWire data to pull. Profiles are cached
side-by-side under ~/.flywire-coding-cortex/profiles/<name>/. status /
step always use the active profile.
Profile | Approx size | Command | What you get |
| ~0.3–5 MB |
| Bundled curated subgraph (668 cells by default) |
| ~60–300 MB |
| Public Codex gzipped CSVs + ETL rebuild |
| ~10.6 GB |
| Zenodo Feathers + ETL (explicit confirm) |
flywire-cortex fetch --list-profiles
flywire-cortex fetch --profile seed --force # re-copy / switch back
flywire-cortex fetch --profile full --yes
flywire-cortex fetch --profile full --yes --include-synapses # also ~9.5 GB synapse table
flywire-cortex statusRules:
Agents must never auto-run
full. Ask the human first.fullrequires--yesandpip install 'flywire-coding-cortex[full]'(pandas + pyarrow).URLs live in
data/manifest.jsonso mirrors can be edited without code changes.
Codex dump base (FAFB v783):
https://storage.googleapis.com/flywire-data/codex/data/fafb/783
Every coding turn (agent loop)
The bundled skill instructs agents to run this loop (CLI or MCP):
status— ensure a circuit exists (fetch --profile seedif missing)sense --text "…"— encode the task into currents (risk, test-red, urgency, ambiguity)step --ms 50— run LIF on real edgessignals— readprimarydrive and clampsAct only under that primary drive (see Roles)
Apply practices
After verify:
remember strengthen|weaken
LIF voltage/rates persist across separate CLI invocations in
~/.flywire-coding-cortex/state/lif_state.json. Use flywire-cortex reset to
clear between unrelated tasks.
CLI reference
flywire-cortex <command> …Command | Description |
| Download / activate a profile ( |
| Home path, active profile, neuron/edge/role counts |
| Encode task text (or |
| Advance simulation ( |
| Stim a group: |
| Emit coding drives JSON ( |
| Clear persisted LIF state |
|
|
| Copy skills + print MCP snippet ( |
| Run MCP stdio server |
remember examples
flywire-cortex remember query --text "auth middleware"
flywire-cortex remember strengthen --pre concept:tests --post role:dnp09 --why "ci green"
flywire-cortex remember weaken --pre concept:migration --post role:dnp09 --why "broke prod"
flywire-cortex remember add-node --pre concept:oauth --label "OAuth flow"
flywire-cortex remember add-edge --pre concept:oauth --post role:lc4 --why "auth is high risk"Roles → coding drives
FlyWire-style role names are coding lenses. Rates come from the live sim; the bridge picks a winner-take-most primary.
Role | Drive | Agent should |
| Risk / loom | Scan blast radius, security, regressions |
| Escape / stop | Do not ship; halt feature work; unblocker |
| Forward | Implement the requested change |
| Reverse | Revert / undo a bad direction |
| Steer | Write L vs R tradeoff, then choose |
| Groom | Cleanup, rename, lint-only |
| Effort under pressure | Polish without scope creep |
| Proprioception | Read local conventions before inventing |
| External constraint | Honor ticket / failing test / user text |
Example signals payload:
{
"primary": "dnp09",
"escape": false,
"stop": false,
"reverse": false,
"walk_drive": 0.42,
"nervous": 0.12,
"support": ["lc4"],
"rationale": "primary=dnp09 walk=0.42 nervous=0.12 mdn=0.0 gf=False"
}Thinking practices
Applied on top of rates (see skill/practices.md):
Winner-take-most — one primary drive per turn
Inhibition delay — high risk → list blast radius before edits
Recurrent working set — ≤5 active files/APIs
Hebbian writeback — strengthen only after verify; weaken on failure
Sparse coding — smallest change that satisfies the drive
Bilateral steer — design forks get an explicit L/R paragraph
Proprioception first — read neighbors before new patterns
Refractory — after
gf/mdn, no new feature drive that turnPopulation scores — prefer CLI sense scores over vibes
Consolidate — end of session: 3 new + 1 weakened memory edges
Architecture
flywire-coding-cortex/
pyproject.toml
README.md ← you are here
INSTALL.md
LICENSE ← MIT (code)
data/
circuit.seed.json ← curated FlyWire subgraph (CC BY-NC)
manifest.json ← profile URLs / sizes
DATA_LICENSE.md
memory/
seed-graph.json ← starter coding-memory ontology
skill/
SKILL.md ← Cursor / OpenClaw / Claude skill
roles.md
practices.md
src/flywire_coding_cortex/
cli.py ← entrypoint
lif.py ← LIF on CSR adjacency
sense.py ← task → currents
bridge.py ← rates → CodingSignals
memory.py ← Hebbian graph
paths.py ← FLYWIRE_CORTEX_HOME helpers
mcp_server.py
install_skills.py
assets/ ← copies shipped in the wheel
etl/
download.py ← fetch profiles
build_circuit.py ← Codex / Feather → circuit.jsonRuntime home (FLYWIRE_CORTEX_HOME)
Default: ~/.flywire-coding-cortex/
Path | Contents |
| Active profile name |
| Active wiring |
| Downloaded dumps (gitignored) |
| Persisted voltages / rates / stims |
| Coding synapses (not FlyWire edges) |
| MCP config helper |
Override:
# bash
export FLYWIRE_CORTEX_HOME=/path/to/cortex-home
# PowerShell
$env:FLYWIRE_CORTEX_HOME = "D:\cortex-home"What is real vs modeled
Real (measured / extracted) | Modeled |
Neuron IDs, sides, types, roles in the subgraph | LIF τ, threshold, noise, weight scale |
Signed synapse counts from Codex NT types | Task text → current injection |
Graph adjacency used for spike propagation | Rate → coding-drive clamps |
Hebbian coding-memory edges |
Environment & dependencies
Python ≥ 3.10 (3.10+ recommended; annotations use modern syntax)
Required:
numpyOptional
[full]:pandas,pyarrow(Zenodo Feather profile)
pip install -e ".[full]"Limitations (v1)
Does not simulate the full ~139k-neuron brain every turn
Does not call live Codex apps (sign-in wall); uses static public files
Does not depend on DesktopFly or any overlay app
fulldownloads are large; confirm disk and network before--yesMCP server is a minimal JSON-RPC subset (
initialize,tools/list,tools/call)
Troubleshooting
Symptom | Fix |
|
|
| Run |
Rates always zero across commands | Call |
| Pass |
Skill not picked up | Re-run |
SSL errors on | Fix certs / use a venv; interim: |
Citation & attribution
Please cite FlyWire when using or redistributing circuit extracts:
Dorkenwald, S. et al. Neuronal wiring diagram of an adult brain. Nature 634, 124–138 (2024). https://doi.org/10.1038/s41586-024-07558-y
Schlegel, P. et al. Whole-brain annotation and multi-connectome cell typing of Drosophila. Nature 634, 139–152 (2024). https://doi.org/10.1038/s41586-024-07686-5
Project sites: flywire.ai · codex.flywire.ai
Code in this repository is MIT. Derived JSON and downloaded dumps remain under FlyWire’s CC BY-NC 4.0 terms — see data/DATA_LICENSE.md.
Contributing / publishing
git clone <this-repo>
cd flywire-coding-cortex
pip install -e ".[full]"
flywire-cortex fetch --profile seed
flywire-cortex installTo rebuild the shipped seed from Codex dumps:
flywire-cortex fetch --profile codex --force
# copies rebuilt circuit into data/circuit.seed.json and package assetsWhen ready for GitHub/PyPI: tag a release, ensure circuit.seed.json is
committed, and document the CC BY-NC split in the release notes.
This server cannot be deployed
Maintenance
Related MCP Connectors
NeuralBrain MCP Server - RAG, Vector Memory, LLM Routing, Agent Identity, x402 Payments
Real-time planetary signal engine and Model Context Protocol (MCP) server for autonomous AI agents.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
Related MCP Servers
- AlicenseCqualityDmaintenanceExposes a bio-hybrid neuromorphic simulation pipeline (SNN, consciousness proxies, FinalSpark NeuroPlatform) as MCP tools, resources, and prompts for AI assistants like Claude, Cursor, and VS Code.49MIT
- AlicenseCqualityDmaintenanceExposes a bio-hybrid neuromorphic simulation pipeline (SNN, consciousness proxies, wetware integration) as MCP tools, resources, and prompts for AI assistants.50MIT
- AlicenseCqualityDmaintenanceMCP server for ASTRA bio-hybrid neuromorphic simulation pipeline, exposing SNN, consciousness proxies, and living neural organoid control tools to AI assistants.50MIT
- AlicenseCqualityDmaintenanceExposes a bio-hybrid neuromorphic simulation pipeline (SNN LIF+STDP, consciousness proxy, bio-platform telemetry, ethics monitor) to AI assistants via MCP tools, resources, and prompts.501MIT