Neuron - "Synapse"
β¨ What is Neuron?
Neuron is a local-first MCP server that gives large language models long-term, associative memory. Point any MCP client at it (Claude, Cursor, OpenCode, VS Code, ChatGPT via a bridge, and more) and across every conversation Neuron builds a concept graph:
every meaningful turn stores keywords with 384-dim vector embeddings and typed semantic links, organized into topic contexts with inheritance from parents;
retrieval is associative, not just keyword matching β spreading activation, salience & recency ranking, and cross-context "drift" surface the right memory even without an exact hit;
it runs local-first (one
.dbfile, no daemon, no network) and can optionally back a shared team memory on Turso Cloud where several people write into the same brain at once.
In one line: stop re-explaining context to your AI every session. Neuron remembers.
π Highlights
Feature | What it means for you | |
π§© | Associative memory | Hebbian link reinforcement, spreading activation, salience/recency ranking β memories that fire together wire together. |
π | Any MCP client | Claude Desktop/Code, Cursor, OpenCode, VS Code, Windsurf, Zed, Cline/Roocode, Continue, Cody, Amazon Q β plus ChatGPT via an HTTP bridge. |
πΎ | Local-first, zero setup | Embedded libSQL with native |
π₯ | Shared team brain (optional) | Flip on Turso Cloud and everyone writes into one graph β atomic, concurrent, no one's save clobbers another's. |
π― | Quality at the door | A curation gate drops filler, folds duplicates and canonicalizes links, so the graph stays clean instead of bloating. |
π | Episodic facts | Nodes carry short "what actually happened" facts, surfaced back into context on the next turn. |
π°οΈ | Time-travel visualizer | A self-contained interactive HTML graph β replay your memory growing turn by turn, filter by domain, inspect every node & link. |
π©Ί | Batteries-included tooling | Cross-platform CLI ( |
π§ How it works
Neuron runs a simple two-step loop around every substantial turn:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 1. pre_turn(topic, keywords) β
β β loads the relevant slice of memory BEFORE you reply β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β the model answers, now informed
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 2. store_turn(keywords, links, factsβ¦) β
β β saves what's NEW as concepts + typed links β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββUnder the hood each concept is a node (keyword + embedding + salience + domain), each
relationship a typed link (cause-effect, analogy, evolution, contrast,
deepening, instance-of). Links that keep co-activating get reinforced; idle tangential
ones get pruned; concepts you stop touching fade to dormant. Retrieval blends vector
similarity, graph traversal and salience β so the model recalls what matters, not only what
literally matches.
β‘ Quickstart
Option A β One-click installer (recommended)
The installer sets up Gray Matter + Neuron in a single venv, registers the gateway in your MCP clients, and creates a Desktop shortcut to the control center.
Platform | Action |
Windows | Double-click |
macOS | Double-click |
Linux |
|
No Python? The installer bootstraps it (winget on Windows, brew/apt on Linux/macOS).
Pre-built pyturso wheels are bundled β no C/Rust compiler needed.
Option B β pip (source checkout)
git clone https://github.com/recla93/Neuron.git
cd Neuron
pip install -e ".[dev]" # editable install with test deps
pip install "neuron[cloud]" # optional: Turso Cloud supportOption C β Standalone MCP (no gateway)
If you prefer Neuron without Gray Matter:
// ~/.config/opencode/opencode.json (or your client's MCP config)
{
"mcp": {
"neuron": { "command": ["python", "-m", "neuron"], "type": "local" }
}
}Or register across all clients at once:
neuron register # registers in Claude Desktop, Cursor, VS Code, etc.
neuron doctor # verify registrations, fix stale entriesπ Full instructions, the manual path and troubleshooting live in INSTALL.md.
π Mounting in an MCP client
π§ Recommended: the Gray Matter gateway. Neuron ships alongside Gray Matter, an orchestrator that registers one server in your clients and runs Neuron (and NeuRAG) as warm managed workers β plus a combined
gray_matter_pulse, context cache and cross-store bridges. One command does everything (register, hooks, plugins, manifest):gray-matter install. AI agents: followINSTALL-AI.md. The table below is the standalone path.
Neuron is a local stdio MCP server β your client launches it as a subprocess. "Mounting" just means registering that launch command; on Windows the installer can do it for you.
Client | How to mount | Notes |
Claude Desktop, Cursor, OpenCode | auto-registered by | restart the client |
Claude Code, VS Code, Zed, Windsurf, Cline/Roocode, Continue, Cody, Amazon Q | add the launch command ( | local stdio |
ChatGPT / OpenAI | via an HTTP bridge β see the Bridge guide | Developer Mode, paid plans |
Ready-made JSON snippets for every client live in clients/. Example β OpenCode
(~/.config/opencode/opencode.json):
{
"mcp": {
"neuron": { "command": ["python", "-m", "neuron"], "type": "local" }
}
}πΎ Storage: local, or shared on Turso Cloud
Neuron resolves its storage tier automatically, in this order:
Turso Cloud β when
TURSO_DATABASE_URL+TURSO_AUTH_TOKENare set. Memory is shared across machines and people;vector_distance_cos()runs server-side.Local pyturso β embedded libSQL, native vector search, one local file (the default).
stdlib sqlite3 β last-resort fallback, Python-side cosine similarity.
One connection layer serves all three, so working solo vs. as a team is just a connection string β no code changes. Turn on the cloud in one step:
pip install "neuron[cloud]"
python scripts/connect_turso.py # prompts, live-tests the connection, saves to .envπ₯ Running a whole team on one brain? See the Team guide.
π°οΈ Graph Visualizer
Neuron ships an interactive, self-contained HTML visualizer β launch it from
neuron manage (option 4, Graph visualizer) or python scripts/generate_graph_html.py. It reads through
Neuron's own engine (so it sees the cloud too) and gives you:
salience-sized, domain-colored nodes Β· Hebbian-thickened edges Β· drift-link styling Β· dormant fading Β· neighborhood highlight Β· search Β· domain/type filters Β· an insights panel (hubs, most-salient, dormant, strongest synapses, cross-context bridges) Β· a Replay slider that animates your memory growing turn by turn Β· and an Obsidian-style π¨ appearance editor.
π§° MCP tools
Tool | Description |
| PRE shortcut β status + compact context in one call |
| Save a turn: keywords, links, entities, tags, an episodic fact |
| Boost salience of nodes that influenced the response |
| Related nodes/links; |
Tool | Description |
| Graph state Β· top nodes and recent links |
| Semantic vector search (no link traversal) |
| Find similar existing keywords before storing (dedup) |
| Absorb duplicate nodes into one |
| Standalone extraction Β· extract-and-save in one call |
| Switch / list domain contexts (e.g. |
| Concepts idle for N turns Β· force-prune expired links |
| Export the graph as JSON Β· clear it |
ποΈ Architecture
neuron/
βββ src/neuron/
β βββ server.py # MCP server: ~22 tools, handshakes, skill delivery
β βββ models.py # Dataclasses: Node, Link, Graph
β βββ db.py # 3-tier DB: Turso Cloud β pyturso β sqlite3
β βββ registry.py # Multi-context graph registry (java/spring, python/django)
β βββ extraction.py # SemanticExtractor: keyword/topic/domain (0 LLM tokens)
β βββ search.py # Hybrid vector search (cosine + salience + recency)
β βββ stimulus.py # Spreading activation, flash, auto-link
β βββ curation.py # Quality gate: drops verbs, paths, phrases at write time
β βββ funnel.py # Skill delivery: signpost + packaged skill files
β βββ clients.py # MCP client registration (7 clients, TOML/JSON/JSONC)
β βββ connect.py # Turso Cloud onboarding (connect β probe β save)
β βββ config.py # Centralized paths & slug (SSOT, no circular imports)
β βββ console.py # Dev Console: one-shot or watch mode graph snapshot
β βββ skills/ # Packaged skill files (playbook, curated memory)
βββ tests/ # Test suite (unit tests, mocked β no network)
βββ knowledge/ # Seed knowledge DB (base_knowledge.db)Key design decisions:
Multi-context graph: contexts form a tree (
javaβjava/spring) with inheritance.Curation gate: bad keywords (verbs, paths, phrases) are dropped or remapped at write time.
3-tier DB: Turso Cloud β pyturso (native vector SQL) β sqlite3 (stdlib fallback).
0-token extraction: keyword/topic/domain extraction via regex + heuristics, no LLM calls.
Spreading activation: BFS on the graph to propagate importance from seed nodes.
π οΈ Development
pip install -e ".[dev]"
python -m pytest tests/ -v # unit tests (fastembed/mcp/turso mocked β no network)
python -m build # wheel + sdist (CI verifies this on every push)Self-checks (no install needed):
python -c "from neuron.embedder import demo; demo()"; echo "OK" # embedder routing
python scripts/neuron_console.py # graph health snapshot
python scripts/neuron_console.py --watch # live monitoringEnvironment tuning (for dev/experiments):
NS_GRAPHS_DIR=/tmp/neuron-test python -m neuron # isolated store
NEURON_SLUG=neuron5 python -m neuron # side-by-side with another installArchitecture, the DB layer, per-client config and cloud/bridge internals are documented in docs/DEVELOPER.md; release & CI mechanics in docs/RELEASE_PLAN.md. Requires Python 3.10β3.14.
πΊοΈ Documentation map
Doc | What's in it |
Every install path (Windows one-click β manual β source) + troubleshooting | |
Automated install+register instructions for AI agents (EN Β· IT) | |
Architecture, memory dynamics, DB layer, per-client config | |
Running a shared team brain on Turso Cloud | |
Exposing Neuron over HTTP for ChatGPT / remote connectors | |
Core audit: module boundaries, hot paths, what the graph costs | |
The full v5 "Synapse" story, release by release | |
Complete tool documentation with real code examples |
π€ Author
Neuron is designed and built by Claudio Costantino.
Found Neuron useful? A β on the repo genuinely helps.
π§© Part of the Gray Matter suite
Three MCP servers that work alone and work better together. Install any one of them and it can pull in the others; the gateway then serves all three through a single connector, so your client registers once.
Project | What it does |
π§ Neuron β you are here | Semantic memory β concepts, links, salience. It learns. |
π NeuRAG | Hierarchical knowledge vault β nodes, chunks, triggers. It keeps. |
β‘ Gray Matter | MCP gateway β one connector, warm workers, cross-store bridges. |
Whoever is installed first owns the session handshake: the gateway when it is present, otherwise the standalone tool β so the model is never told to call tools that are not there.
π License
PolyForm Noncommercial License 1.0.0 β free for noncommercial use. See LICENSE.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/recla93/Neuron'
If you have feedback or need assistance with the MCP directory API, please join our Discord server