# Synapse Layer MCP server

> Provides persistent, AES-256-GCM encrypted memory infrastructure for AI agents to enable cross-session and cross-agent context recall.

- Repository: https://github.com/SynapseLayer/synapse-layer
- Page: https://hostedmcp.org/servers/synapselayer/synapse-secure-memory
- Transport: stdio
- Stars: 13
- License: Apache-2.0
- Latest version: 1.0.7

## Install

### Claude Code

```sh
claude mcp add --env 'SYNAPSE_ENCRYPTION_KEY=<YOUR_SYNAPSE_ENCRYPTION_KEY>' synapse-secure-memory -- uvx synapse-layer
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "synapse-secure-memory": {
      "command": "uvx",
      "args": [
        "synapse-layer"
      ],
      "env": {
        "SYNAPSE_ENCRYPTION_KEY": "<YOUR_SYNAPSE_ENCRYPTION_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "synapse-secure-memory": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "synapse-layer"
      ],
      "env": {
        "SYNAPSE_ENCRYPTION_KEY": "<YOUR_SYNAPSE_ENCRYPTION_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"synapse-secure-memory","type":"stdio","command":"uvx","args":["synapse-layer"],"env":{"SYNAPSE_ENCRYPTION_KEY":"<YOUR_SYNAPSE_ENCRYPTION_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "synapse-secure-memory": {
      "command": "uvx",
      "args": [
        "synapse-layer"
      ],
      "env": {
        "SYNAPSE_ENCRYPTION_KEY": "<YOUR_SYNAPSE_ENCRYPTION_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add synapse-secure-memory --env 'SYNAPSE_ENCRYPTION_KEY=<YOUR_SYNAPSE_ENCRYPTION_KEY>' -- uvx synapse-layer
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.synapse-secure-memory]
command = "uvx"
args = ["synapse-layer"]

[mcp_servers.synapse-secure-memory.env]
SYNAPSE_ENCRYPTION_KEY = "<YOUR_SYNAPSE_ENCRYPTION_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'SYNAPSE_ENCRYPTION_KEY=<YOUR_SYNAPSE_ENCRYPTION_KEY>' synapse-secure-memory uvx -- synapse-layer
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "synapse-secure-memory": {
      "command": "uvx",
      "args": [
        "synapse-layer"
      ],
      "env": {
        "SYNAPSE_ENCRYPTION_KEY": "<YOUR_SYNAPSE_ENCRYPTION_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `SYNAPSE_ENCRYPTION_KEY` | no | yes | AES-256-GCM encryption key for at-rest memory encryption. Auto-generated if not provided. |
| `LOG_LEVEL` | no | no | Logging verbosity: DEBUG, INFO, WARNING, ERROR. Default: INFO. |
| `SYNAPSE_AGENT_ID` | no | no | Identifier for the agent using the memory layer (e.g., claude-desktop, my-agent). |
| `SYNAPSE_PRIVACY_EPSILON` | no | no | Differential privacy epsilon parameter. Lower values = stronger privacy. Range: 0.1–2.0. |

## Tools (13)

- `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`

## FAQ

### How is the memory secured?

Memories are encrypted at rest using AES-256-GCM with per-operation random IV and HMAC-SHA-256 integrity.

### How do I integrate this with Claude Desktop?

You can add it to your claude_desktop_config.json using the npx mcp-remote command with your specific connect token in the header.

### What tools are available through the MCP interface?

The server registers 13 tools including recall, save_to_synapse, process_text, search, and neural_handover.
