Skip to main content
Glama
README.md
<!-- mcp-name: io.github.SynapseLayer/synapse-layer -->
<div align="center">

# ๐Ÿง  Synapse Layer

### RAG retrieves. Synapse remembers.

**Persistent memory infrastructure for AI agents โ€” AES-256-GCM encrypted at rest, semantic search, MCP-native.**

Synapse Layer is open-source persistent memory infrastructure for AI agents and assistants. Memories are encrypted at rest with AES-256-GCM, indexed via pgvector HNSW for semantic recall, and exposed through MCP JSON-RPC for native integration with Claude, GPT, Gemini, and any MCP-compatible client. Apache 2.0 licensed.

[![PyPI](https://img.shields.io/pypi/v/synapse-layer)](https://pypi.org/project/synapse-layer/)
[![Python](https://img.shields.io/pypi/pyversions/synapse-layer)](https://pypi.org/project/synapse-layer/)
[![Downloads](https://img.shields.io/pypi/dm/synapse-layer)](https://pypi.org/project/synapse-layer/)
[![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-6B4FBB)](https://modelcontextprotocol.io)
[![Official MCP Registry](https://img.shields.io/badge/MCP_Registry-Published-00C853)](https://registry.modelcontextprotocol.io)
[![CI](https://github.com/SynapseLayer/synapse-layer/actions/workflows/ci.yml/badge.svg)](https://github.com/SynapseLayer/synapse-layer/actions/workflows/ci.yml)
[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)
[![Smithery](https://img.shields.io/badge/Smithery-Add%20to%20MCP-800080?logo=smithery)](https://smithery.ai/servers/synapselayer/synapselayer)

[Website](https://synapselayer.org) ยท [Docs](https://forge.synapselayer.org/docs) ยท [PyPI](https://pypi.org/project/synapse-layer/) ยท [Forge](https://forge.synapselayer.org)

</div>

---

## โšก 30-Second Quickstart

Get your Connect Token at [forge.synapselayer.org](https://forge.synapselayer.org) โ†’ Connect, then install into any MCP client:

```bash
curl -fsSL https://forge.synapselayer.org/install/smithery | bash
```

On the [Forge dashboard](https://forge.synapselayer.org/dashboard/connect) the **Smithery** card already copies the command with your token embedded (`โ€ฆ | bash -s -- sk_connect_โ€ฆ`) โ€” a single paste in your terminal is enough.

Or use the Python SDK:

```python
from synapse_layer import Synapse

s = Synapse(token="sk_connect_YOUR_TOKEN")

s.store("user likes coffee")
print(s.recall("what does user like?"))
```

Get your token at [forge.synapselayer.org](https://forge.synapselayer.org) โ†’ Dashboard โ†’ Connect

---

## What is Synapse Layer?

The **persistent memory layer for AI agents** โ€” the missing piece between stateless LLMs and real continuity of context.

Your AI agents forget everything between sessions. Synapse Layer fixes that.

| Feature | Description |
|---------|-------------|
| ๐Ÿ” **Encrypted at rest** | AES-256-GCM with per-operation random IV and HMAC-SHA-256 integrity |
| ๐Ÿงฉ **One-click connect** | Claude Desktop, Cursor, LangChain, CrewAI, n8n |
| ๐ŸŒ **Cross-agent memory** | Save in ChatGPT, recall in Claude |
| โšก **MCP-native** | Any MCP-compatible agent |
| ๐Ÿ”’ **Header-first auth** | Tokens never in URLs or logs |
| ๐ŸŽฏ **Trust Quotient** | Deterministic recall โ€” memories ranked by confidence, not recency alone |

---

## Why Synapse Layer?

> Your AI agents forget everything between sessions. Synapse Layer fixes that โ€” in one line.

| Without Synapse Layer | With Synapse Layer |
|---|---|
| Agent forgets context every session | Persistent memory across all sessions |
| Memory locked to one model | Cross-agent: save in ChatGPT, recall in Claude |
| No audit trail | Trust Quotient scoring on every memory |
| Complex integration | `pip install synapse-layer` + 3 lines of code |
| Plaintext stored on servers | AES-256-GCM encrypted at rest |

---

## Use Cases

- **Long-term assistant memory** โ€” persist user preferences, facts, and prior decisions across sessions.
- **Cross-agent continuity** โ€” save context in one agent and recall it in another.
- **Secure memory for MCP clients** โ€” connect Claude Desktop, Cursor, and other MCP-compatible tools to a governed memory layer.
- **Operational memory for teams** โ€” maintain structured context, trust scoring, and searchable recall for production agents.

---

## Install

```bash
pip install synapse-layer
```

## Quick Start

### Python Script

```python
from synapse_layer import Synapse

client = Synapse(token="sk_connect_YOUR_TOKEN")

# Store
client.store("User prefers dark mode and concise answers")

# Recall
results = client.recall("user preferences")
for r in results:
    print(r["content"], r["trust_quotient"])
```

### With Context Manager

```python
from synapse_layer import Synapse

with Synapse(token="sk_connect_YOUR_TOKEN") as client:
    client.store("User prefers dark mode and concise answers")
    results = client.recall("user preferences")
    for r in results:
        print(r["content"])
```

Get your token at [forge.synapselayer.org](https://forge.synapselayer.org) โ†’ Dashboard โ†’ Connect

---

## 13 MCP Tools at a Glance

Synapse Layer currently exposes 13 MCP tools for persistent memory workflows:

- `recall`
- `save_to_synapse`
- `process_text`
- `search`
- `health_check`
- `initialize_context`
- `save_memory`
- `store_memory`
- `recall_memory`
- `list_memories`
- `memory_feedback`
- `neural_handover`
- `slo_report`

These tools cover memory capture, semantic recall, structured storage, feedback loops, agent handoff, and operational observability.

---

## Deployment Modes

### Python Script Mode
Use the SDK when you want direct Python access to Forge memory from your application.

Best for:
- prototypes and scripts
- Python-native workflows
- fast integration into existing apps

### Cloud / Forge API
Use Forge when you need persistent, cross-session, and cross-agent memory with managed access tokens.

Best for:
- production assistants
- multi-agent systems
- MCP-based integrations
- shared memory across tools and sessions

---

## MCP Integration (Claude Desktop / Cursor)

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "synapse-layer": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://forge.synapselayer.org/api/mcp",
        "--header",
        "x-connect-token: sk_connect_YOUR_TOKEN"
      ]
    }
  }
}
```

Config file location:
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
- Linux: `~/.config/Claude/claude_desktop_config.json`

---

## API โ€” Header-First Auth

```bash
# Health check
curl -H "x-connect-token: sk_connect_YOUR_TOKEN" \
  https://forge.synapselayer.org/api/connect/health

# Save memory
curl -X POST \
  -H "x-connect-token: sk_connect_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content": "User is a Python developer"}' \
  https://forge.synapselayer.org/api/v1/capture
```

---

## Security

| Feature | Implementation |
|---------|---------------|
| Encryption | AES-256-GCM at rest with per-operation random IV |
| Integrity | HMAC-SHA-256 on content |
| Auth | Header-first (`x-connect-token`) โ€” tokens never in URLs or logs |
| Privacy | Content sanitization + tenant-scoped encrypted storage |
| Isolation | 1 user = 1 tenant = 1 private mind |

See [SECURITY.md](SECURITY.md) for vulnerability reporting.

---

## Related Projects

| Project | Description |
|---------|-------------|
| [synapse-sdk-python](https://github.com/SynapseLayer/synapse-sdk-python) | Python SDK โ€” LangChain, CrewAI, and A2A protocol adapters |
| [synapse-layer-skill](https://github.com/SynapseLayer/synapse-layer-skill) | MCP skill configuration for Claude Desktop, Cursor, Windsurf |
| [synapse-layer-langgraph](https://github.com/SynapseLayer/synapse-layer-langgraph) | LangGraph checkpoint saver with encrypted state persistence |

---

## Governance

- All public claims follow the [Public Claims Matrix](docs/PUBLIC_CLAIMS_MATRIX.md).
- Architecture details that reveal benefits are public; mechanisms that enable them are private.
- Claim = Reality. If it's not implemented, it's not in the README.

---

## License

Apache-2.0 ยฉ Synapse Layer

TDQS

B3.4/5.0

Scored across 13 tools

Disambiguation3/5

There is overlap between `save_memory` and `save_to_synapse` (aliases), and `recall_memory` and `recall` (aliases), which creates ambiguity. `save_to_synapse` and `store_memory` also have very similar purposes, potentially causing misselection.

Naming Consistency3/5

Most tools use a verb_noun pattern (e.g., list_memories, save_memory, recall_memory), but `neural_handover` breaks this pattern by using an adjective_noun. `slo_report` is a contraction that doesn't follow the strict verb_noun structure, introducing inconsistency.

Tool Count4/5

With 13 tools, the count is within the well-scoped range (3-15). The presence of aliases inflates the number slightly, but otherwise, each non-alias tool serves a distinct purpose, making the count appropriate.

Completeness4/5

The tool surface covers core CRUD operations (save, recall, list, search) and lifecycle operations (initialize, feedback, handover). Minor gaps exist, such as missing explicit update or delete tools for memories, but the domain coverage is generally strong.

Maintenance

ActivityMaintained
ResponsivenessWithin a week