# opencode-mem MCP server

> Provides persistent memory infrastructure for AI coding agents using PostgreSQL with hybrid search and hierarchical summaries.

- Repository: https://github.com/Stranmor/opencode-mem
- Page: https://hostedmcp.org/servers/stranmor/opencode-mem
- Transport: —
- Stars: 3
- License: MIT

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `DATABASE_URL` | no | no |  |
| `OPENCODE_MEM_API_KEY` | no | no |  |
| `OPENCODE_MEM_API_URL` | no | no |  |

## Tools (17)

- `search`
- `timeline`
- `get_observations`
- `memory_get`
- `memory_recent`
- `memory_hybrid_search`
- `memory_semantic_search`
- `save_memory`
- `knowledge_search`
- `knowledge_save`
- `knowledge_get`
- `knowledge_list`
- `knowledge_delete`
- `infinite_expand`
- `infinite_time_range`
- `infinite_drill_hour`
- `infinite_drill_minute`

## FAQ

### What is the primary storage for opencode-mem?

PostgreSQL serves as the canonical store for the server.

### What are the different search methods available?

The server supports full-text, keyword, semantic, and hybrid search paths.

### How can I run the server as an MCP server for IDE integration?

You can run the MCP stdio server using the command: opencode-mem-cli mcp.

### Does it support vector embeddings?

Yes, it uses pgvector for vector retrieval and supports embeddings via fastembed BGE-M3.
