Local-first AST-based code context engine exposed over MCP.
Project description
Synapse MCP
Local-first AST code context for AI agents — without uploading source code to external services.
Quickstart
- Use Python >=3.12.
- Install Synapse as a managed CLI tool:
uv tool install locker-room-tools-synapse-mcp. - Connect it globally to your agent:
synapse install codex - Restart the agent once.
Replace codex with claude-code or opencode. No repository files are created. On the first
code-navigation request, the global instruction calls synapse_ensure_workspace, which
initializes the local index and daemon automatically.
See Installation and lifecycle for upgrades, custom scopes, troubleshooting, and uninstall instructions. See MCP tools for tool contracts and recommended agent flows.
Development
Create a virtual environment and install the repository with development dependencies:
uv venv && uv pip install -e ".[dev]". Then run synapse grammars install once.
Grammar installation is an explicit network operation. Indexing, watching, querying, and MCP serving only use the local grammar cache and never download parsers implicitly.
Available MCP tools
Synapse exposes 17 deterministic MCP tools for initialization, symbol lookup, definitions, references, structural context, dependency navigation, project maps, indexing, and daemon health. The complete parameter and response reference is in docs/tools.md.
Configuration
Synapse reads configuration from three layers, unioned together:
| Layer | Location | Written by |
|---|---|---|
| built-in defaults | packaged with Synapse | not editable |
| global user config | ~/.config/synapse/config.json |
synapse config ignored-dirs ... --scope global |
| project config | <workspace>/.synapse/config.json |
agents over MCP, or synapse config ignored-dirs ... |
ignored_directories accepts a bare name matched at any depth (node_modules), a
root-anchored name (/build), or a workspace-relative path (src/generated). Globs,
absolute paths, and .. segments are rejected.
Agents configure Synapse through synapse_get_config, synapse_add_ignored_directories, and
synapse_remove_ignored_directories, which always write the project layer. .synapse/config.json
is meant to be committed so the whole team indexes the same tree.
A change needs no reindex: the next watch sweep purges newly-ignored files and picks up restored ones.
Watch daemon
Synapse requires a healthy dependency-free polling daemon before query tools can read an
index. synapse_ensure_workspace starts or repairs it lazily, and the MCP entry point restores
it for initialized workspaces after a reboot. Logs are written under the workspace data
directory at logs/watch.log, and status is written to watch.json in the same data directory.
Use synapse watch status --workspace . --json to inspect running, backend, pending, PID,
timestamps, errors, and staleness_seconds. Stop a detached daemon with
synapse watch stop --workspace .. For a bounded smoke check that performs one reconciliation
sweep and exits, run synapse watch start --workspace . --foreground --once.
The shipped backend is currently polling-only. Its interval defaults to the user config
watch.poll_interval_s; native OS event watching is intentionally deferred behind the core
WatchBackend protocol.
Agent setup helpers
synapse install <claude-code|codex|opencode> [--dry-run] [--offline] [--no-skill]synapse init --path <path> [--dry-run] [--offline]synapse status --path <path> [--json]synapse uninstall <client> --globalsynapse setup <client> --path <path>for advanced project-scoped integrationsynapse mcp install <client> --workspace <path> [--scope project|user] [--print]synapse uninstall <client> --path <path> [--scope project|user]synapse doctor --path <path> [--agent <client>] [--scope project|user]
Project setup, mcp install, manual indexing, serve, and foreground watch mode remain
available for advanced integration and diagnostics.
Read docs/architecture.md before changing the project structure.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file locker_room_tools_synapse_mcp-0.4.0.tar.gz.
File metadata
- Download URL: locker_room_tools_synapse_mcp-0.4.0.tar.gz
- Upload date:
- Size: 204.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca3c59a02a06ab38278f223954df7c90d29027700c18a8744589fb568f94b79b
|
|
| MD5 |
ae3fde89654863e4fd6ab4bf91c353fa
|
|
| BLAKE2b-256 |
5de4d9bb0151a89d505fc7fcc3dfed5274e6a979a23a9ad08ebdcdb903eaf25d
|
Provenance
The following attestation bundles were made for locker_room_tools_synapse_mcp-0.4.0.tar.gz:
Publisher:
release.yml on Locker-Room-Tools/synapse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
locker_room_tools_synapse_mcp-0.4.0.tar.gz -
Subject digest:
ca3c59a02a06ab38278f223954df7c90d29027700c18a8744589fb568f94b79b - Sigstore transparency entry: 2276012361
- Sigstore integration time:
-
Permalink:
Locker-Room-Tools/synapse@6d3096ec24d76d92af55a18da3e8c6e535614727 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/Locker-Room-Tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6d3096ec24d76d92af55a18da3e8c6e535614727 -
Trigger Event:
push
-
Statement type:
File details
Details for the file locker_room_tools_synapse_mcp-0.4.0-py3-none-any.whl.
File metadata
- Download URL: locker_room_tools_synapse_mcp-0.4.0-py3-none-any.whl
- Upload date:
- Size: 123.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9706b354654e52bfbf1a9c92b2a4c5cce560e830cff5c362bcee8a1d8e8e563c
|
|
| MD5 |
bbaf07a61de6c911a484b35443527092
|
|
| BLAKE2b-256 |
0d9934fccc5083c912dd0b1c35d382aa7586dd9418926d2fc6a1200068c26111
|
Provenance
The following attestation bundles were made for locker_room_tools_synapse_mcp-0.4.0-py3-none-any.whl:
Publisher:
release.yml on Locker-Room-Tools/synapse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
locker_room_tools_synapse_mcp-0.4.0-py3-none-any.whl -
Subject digest:
9706b354654e52bfbf1a9c92b2a4c5cce560e830cff5c362bcee8a1d8e8e563c - Sigstore transparency entry: 2276012402
- Sigstore integration time:
-
Permalink:
Locker-Room-Tools/synapse@6d3096ec24d76d92af55a18da3e8c6e535614727 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/Locker-Room-Tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6d3096ec24d76d92af55a18da3e8c6e535614727 -
Trigger Event:
push
-
Statement type: