Skip to main content
Glama
README.md
# dek-mcp

Local MCP server exposing the `dek-memory` hybrid memory engine over stdio. It is deliberately local-only by default: no Chrome, account, API key, or network is required.

When configured with a Chrome profile, it also provides **conditional ChatGPT tools** for interacting with the signed-in ChatGPT account.

## Usage

```bash
DEK_MEMORY_STORE=$HOME/.dek-memory npx dek-mcp
```

### Configuration

| Variable | Description | Default |
|---|---|---|
| `DEK_MEMORY_STORE` | Path to the SQLite memory store directory | `.dek-memory` |
| `DEK_MCP_READ_ONLY` | Set to `1` to disable write and maintenance tools | `0` |
| `DEK_CHATGPT_PROFILE` | Path to a dedicated Chrome profile directory for ChatGPT tools | None (disabled) |

### Tools

**Local Memory Tools** (always available):
- `memory_remember`: Store durable information.
- `memory_recall`: List stored memories.
- `memory_search`: Search by keywords.
- `memory_update`: Update existing memory.
- `memory_forget`: Remove a memory.
- `memory_stats`: Diagnostic counts.
- `memory_maintain`: Prune stale memories.
- `memory_graph_query`: Search with entity relationships.
- `memory_graph_why`: Explain memory reachability.

**ChatGPT Tools** (requires `DEK_CHATGPT_PROFILE`):
- `chatgpt_ask`: Ask ChatGPT through the browser.
- `chatgpt_memory_read`: Read Saved Memory from account.
- `chatgpt_memory_write`: Write to Saved Memory.
- `chatgpt_memory_forget`: Request account memory removal.
- `memory_sync`: Sync account memories to local store.

## Development

Build with `npm install && npm run build`. Requires Node 24+.

```bash
npm run typecheck  # Check for TypeScript errors
npm test           # Run vitest
```

## Security

-   **Local-only**: No network listeners; communicates only via stdio.
-   **Read-only mode**: `DEK_MCP_READ_ONLY=1` disables all write operations.
-   **Verification**: ChatGPT memory writes are verified before reporting success.

## License

MIT