# Engraphy MCP server

> Provides AI agents with associative memory using a typed knowledge graph stored on Postgres and pgvector.

- Repository: https://github.com/devon-clarkk/engraphy
- Page: https://hostedmcp.org/servers/devon-clarkk/engraphy
- Transport: remote
- Stars: 1
- Latest version: 0.3.0

## Install

### Claude Code

```sh
claude mcp add --env 'ENGRAPHY_DATABASE_URL=<YOUR_ENGRAPHY_DATABASE_URL>' engraphy -- docker run -i --rm ghcr.io/devon-clarkk/engraphy:0.3.0
```

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

```json
{
  "mcpServers": {
    "engraphy": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/devon-clarkk/engraphy:0.3.0"
      ],
      "env": {
        "ENGRAPHY_DATABASE_URL": "<YOUR_ENGRAPHY_DATABASE_URL>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "engraphy": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/devon-clarkk/engraphy:0.3.0"
      ],
      "env": {
        "ENGRAPHY_DATABASE_URL": "<YOUR_ENGRAPHY_DATABASE_URL>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"engraphy","type":"stdio","command":"docker","args":["run","-i","--rm","ghcr.io/devon-clarkk/engraphy:0.3.0"],"env":{"ENGRAPHY_DATABASE_URL":"<YOUR_ENGRAPHY_DATABASE_URL>"}}'
```

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

```json
{
  "mcpServers": {
    "engraphy": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/devon-clarkk/engraphy:0.3.0"
      ],
      "env": {
        "ENGRAPHY_DATABASE_URL": "<YOUR_ENGRAPHY_DATABASE_URL>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add engraphy --env 'ENGRAPHY_DATABASE_URL=<YOUR_ENGRAPHY_DATABASE_URL>' -- docker run -i --rm ghcr.io/devon-clarkk/engraphy:0.3.0
```

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

```toml
[mcp_servers.engraphy]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/devon-clarkk/engraphy:0.3.0"]

[mcp_servers.engraphy.env]
ENGRAPHY_DATABASE_URL = "<YOUR_ENGRAPHY_DATABASE_URL>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'ENGRAPHY_DATABASE_URL=<YOUR_ENGRAPHY_DATABASE_URL>' engraphy docker -- run -i --rm ghcr.io/devon-clarkk/engraphy:0.3.0
```

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

```json
{
  "mcpServers": {
    "engraphy": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/devon-clarkk/engraphy:0.3.0"
      ],
      "env": {
        "ENGRAPHY_DATABASE_URL": "<YOUR_ENGRAPHY_DATABASE_URL>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `ENGRAPHY_DATABASE_URL` | yes | yes | libpq connection string for a Postgres 16 database with the pgvector extension, reached as the non-superuser `engraphy_app` role. Required: the server refuses to start without it, and refuses to start if the schema is behind (run `engraphy-admin migrate` first). |
| `ENGRAPHY_BIND_HOST` | no | no | Interface the server binds. Containers reach their own loopback only, so a published container sets 0.0.0.0 and puts the boundary at the port publication and the reverse proxy. |
| `ENGRAPHY_BIND_PORT` | no | no | Port the server binds inside the container, matching the port in the transport URL. |

## FAQ

### How does Engraphy handle duplicate information?

Writes automatically deduplicate themselves by being embedded and compared against existing memory; near-verbatim restatements are merged, while new related facts are linked as new nodes.
