Neural-Stimulus
An MCP server that provides persistent semantic memory for LLMs by building a concept graph with vector search. It enables storing, linking, and retrieving concepts across conversations using Turso vector search and 256-dimensional embeddings.
README
Neuron — Persistent semantic memory for AI
Neuron is an MCP server that gives LLMs long-term memory. Across conversations it builds a
concept graph: every exchange saves keywords with 384-dim vector embeddings and semantic
links, retrievable in later sessions — per topic context, with inheritance from parent
contexts. It runs local-first (a single .db file, no network) and can optionally back a
shared team memory on Turso Cloud, where several people write into the same knowledge at
once without stepping on each other.
- Local by default — embedded libSQL (pyturso) with native
vector_distance_cos(), or stdlib sqlite3 as a last resort. No daemon, no HTTP port. - Shared & concurrent (optional) — point everyone at one Turso Cloud DB. Writes are incremental and atomic: two people editing the same node both count, and no one's save wipes another's rows. See the Team guide.
- Any MCP client — Claude Desktop/Code, Cursor, OpenCode, VS Code, Windsurf, Zed, and more via local stdio; ChatGPT via an HTTP bridge.
Requires Python 3.10–3.14.
Install
Windows
The easy path: double-click Configuration.bat and choose
Install / Update Neuron → FULL. It handles everything (prerequisites →
PyTurso → Neuron + embedding model), can wire Neuron into your AI app, and every
run is logged under %LOCALAPPDATA%\Programs\neuron\logs\. Or run the installer
directly:
.\install.ps1
Neuron installs as a real Python package into a dedicated venv, using a pre-built pyturso
wheel from .\vendor (Python 3.10–3.14) so no C/Rust compiler is needed — it only falls back
to the minimal MSVC build tools if your Python is outside that prebuilt range. fastembed
(semantic embeddings) is mandatory. See INSTALL.md for the manual path and
troubleshooting.
Updating an existing install: pull the latest, then Configuration.bat →
Install / Update Neuron → FULL. It installs with pip --upgrade and refuses
to let an older bundled wheel shadow newer source, so you always land the newest
code. (To start completely clean, use Clean install / Uninstall Neuron first.)
Linux / macOS
pyturso has prebuilt wheels on PyPI for Linux/macOS, so a plain install works:
python3 -m venv .venv && source .venv/bin/activate
pip install neuron-<version>-py3-none-any.whl # from the GitHub release
# or, from a source checkout: pip install ".[dev]"
python -m neuron
Storage: local, or shared on Turso Cloud
Neuron resolves its storage tier automatically, in this order:
- Turso Cloud — when
TURSO_DATABASE_URLandTURSO_AUTH_TOKENare set. Memory is shared and survives across machines;vector_distance_cos()runs server-side. - Local pyturso — embedded libSQL, native vector search, one local file (the default).
- stdlib sqlite3 — last resort, Python-side cosine similarity.
Everything goes through one connection layer (neuron.db), so the tiers are interchangeable
with no code changes — the only difference between working solo and as a team is the
connection string.
Turn on the cloud (recommended flow)
pip install "neuron[cloud]" # adds libsql-client
python scripts/connect_turso.py # prompts for URL + token, TESTS the connection for real,
# then saves them to .env (the token is never printed)
connect_turso.py runs a live read + write probe before saving, and transparently falls back
from the libsql:// (WebSocket) URL to https:// if the endpoint rejects the WS handshake —
saving whichever scheme actually works. The server auto-loads .env at startup, so once
it's saved the cloud is used automatically (a real environment variable always wins; disable
with NEURON_NO_DOTENV=1). To validate end-to-end against your Turso DB:
python scripts/smoke_cloud.py.
For a whole team on one shared DB, see the Team guide.
Seed knowledge (optional — bring your own)
A seed is an optional pre-built knowledge base (your notes/docs turned into nodes + 384-dim vectors) that warm-starts cross-domain suggestions so the AI isn't blank on turn one.
Neuron ships without a seed — it works completely fine empty and learns from your
conversations. (We deliberately don't bundle one: a seed is personal, and a bad/placeholder DB
used to crash vector search. The loader now hard-guards against any seed that isn't a real
SQLite file ≥ 512 bytes.) In Configuration.bat, “Seed knowledge DB (what & how)” walks you
through building one. Manually:
export NEURON_VAULT=/path/to/vault # Windows: set NEURON_VAULT=C:\path\to\vault
python scripts/import_vault.py # -> ./knowledge/base_knowledge.db (local, with vectors)
To ship it as the default seed, copy the generated DB to src/neuron/data/base_knowledge.db —
only a real, populated SQLite file (never a truncated stub). See docs/DEVELOPER.md.
Mounting in an MCP client
Neuron is a local stdio MCP server: the client launches it as a subprocess
(python3 -m neuron, or run_mcp.bat on Windows). Mounting means registering that launch
command. On Windows, install.ps1 auto-registers OpenCode, Claude Desktop and
Cursor; everything else is a one-time manual entry.
| Client | How to mount | Notes |
|---|---|---|
| OpenCode, Claude Desktop, Cursor | auto-registered by install.ps1 |
restart the client |
| Claude Code, Cline/Roocode, VS Code, Windsurf, Zed, Continue.dev, Cody, Amazon Q | add the launch command | local stdio |
| Perplexity (macOS app) | Settings → Connectors → add local MCP (python3 -m neuron) |
macOS-only; needs the PerplexityXPC helper |
| ChatGPT / OpenAI | via an HTTP bridge — see the Bridge guide | Developer Mode, paid plans; no local stdio |
Per-client JSON snippets live in clients/ and the full walkthrough is in
docs/DEVELOPER.md. Example, OpenCode
(~/.config/opencode/opencode.json):
{
"mcp": {
"neuron": {
"command": ["cmd", "/c", "%LOCALAPPDATA%\\Programs\\neuron\\scripts\\run_mcp.bat"],
"type": "local"
}
},
"instructions": ["%LOCALAPPDATA%\\Programs\\neuron\\skills\\auto-context.md"]
}
The instructions field loads the auto-context skill, which tells the model to call
neuron_pre_turn at the start of each turn and neuron_store_turn after responding.
Context inheritance
When the active context has no results for a topic, neuron_get_context and neuron_pre_turn
automatically search parent contexts (e.g. default) and annotate the output with
(from:<parent>) — so nodes stored in default stay reachable from any context.
MCP tools
| Tool | Description |
|---|---|
neuron_pre_turn(topic, keywords) |
PRE shortcut — status + compact context in one call |
neuron_status |
Graph state (nodes, links, active context) |
neuron_get_context(topic, ...) |
Related nodes and links; format=compact for injection; inherits from parents |
neuron_store_turn |
Save a turn: keywords, links, entities, tags |
neuron_confirm(keywords) |
Boost salience of nodes that influenced the response |
neuron_auto(text) |
Heuristic extraction + save in one call (fallback for smaller models) |
neuron_extract(text) |
Standalone semantic extraction (no save) |
neuron_find_candidates(keywords) |
Find similar existing keywords before storing (dedup) |
neuron_merge(canonical, aliases) |
Absorb duplicate nodes into one canonical node |
neuron_vector_search(keywords) |
Semantic vector search (no link traversal) |
neuron_summary |
Top nodes and recent links overview |
neuron_forgotten |
Concepts not touched in N turns |
neuron_switch_context(context) / neuron_list_contexts |
Switch / list domain contexts (e.g. java/spring) |
neuron_prune |
Force pruning of expired tangential links |
neuron_flash / neuron_dedup |
Toggle semantic flash / dedup features |
neuron_export / neuron_reset |
Export the graph as JSON / clear it |
Development
pip install -e ".[dev]"
python -m pytest tests/ -v # unit tests (mock fastembed/mcp/turso — no network)
python -m build # wheel + sdist (CI verifies this on every push)
Architecture, per-client config, the DB layer, and the cloud/bridge details are in docs/DEVELOPER.md. Release/CI mechanics are in docs/RELEASE_PLAN.md.
Standalone chat (optional)
A CLI playground (scripts/run_interactive.py) can talk to cloud providers — it is not the
production path (the MCP server uses a 0-token heuristic by default). Provider keys:
OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY.
License
PolyForm Noncommercial 1.0.0 — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。