SimVault — graph RAG + semantic search on Simscape/Simulink .slx files (probably the first of its kind) #85
nightfury1802
started this conversation in
Show and tell
Replies: 1 comment
-
|
@derrick-mw Drawing your attention to this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I've been using the MATLAB MCP server heavily for agentic Simscape/Simulink modeling and ran into a recurring problem: every agent session rebuilt the same models from scratch and made the same wiring mistakes. Port names like
omega_rpm,w_shaft,SpeedPSare all the same signal — but no agent could know that without reading the.slxXML itself. Domain mismatches (Simscape physical port → Simulink signal line) caused silent errors that only appeared at simulation time.So I built SimVault — a companion MCP server that indexes your
.slxlibrary and gives agents the port-level ground truth they need before callingmodel_edit.What it does
SimVault indexes a directory of
.slxfiles into a combined vector + graph store with two layers:The agent workflow becomes:
The 6 MCP tools
simvault_searchsimvault_validate_wiresimvault_get_assembly_contextsimvault_smoke_testsimvault_kb_querysimvault_model_context_with_historyWire validation rules (applied before any
model_edit)Four rules, checked in order:
Port canonicalization
The canonicalizer maps 20+ raw naming variants to a fixed vocabulary so the graph can reason about compatibility:
omega,w_shaft,SpeedPS,wr,speed_ref→omega_shaft_radstorque,TPS,trq,tau,torque_ref→torque_shaft_Nmtemp,AirGap,winding_K→temperature_KSL2PS_*andPS2SL_*block names detected automaticallyKB memory with confidence decay
Each Claude Code session is automatically extracted (via a Stop hook) and added to the KB. Facts are tagged by tier:
workingepisodicsemanticproceduralSuperseded or expired facts score 0 in retrieval — agents don't get confused by stale context.
Installation
Register alongside the MATLAB MCP server in
claude_desktop_config.json:The Stop hook auto-updates the KB at the end of every session — the library compounds over time.
Repo
https://github.com/nightfury1802/SimVault
Python ≥ 3.11, MATLAB R2024a+ for extraction (Python pipeline runs without MATLAB if JSONs already exist).
Happy to answer questions or discuss integration patterns — especially interested in hearing from anyone building multi-agent Simulink workflows where model reuse across sessions is important.
Beta Was this translation helpful? Give feedback.
All reactions