Local Memory MCP Server for OpenCode
Project description
Memory MCP
Local Memory MCP Server for OpenCode - A persistent memory layer for AI coding agents.
Features
- Local-only memory storage (no external services except embeddings)
- FAISS vector search for semantic memory retrieval
- SQLite for metadata persistence
- MCP protocol for integration with OpenCode
- Concurrent access via file locking
Quick Start
# Set environment variables
export MEMORY_USER_ID=your_user_id
export EMBEDDING_PROVIDER=openai # or ollama, huggingface
export EMBEDDING_API_KEY=your_api_key
# Run the server
python -m memory_mcp.server
OpenCode Configuration
Add to your OpenCode MCP configuration file:
{
"mcp": {
"memory": {
"type": "local",
"enabled": true,
"command": ["uv", "run", "python", "-m", "memory_mcp.server"],
"environment": {
"MEMORY_USER_ID": "your_user_id",
"MEMORY_DATA_DIR": "/path/to/data",
"EMBEDDING_PROVIDER": "openai",
"EMBEDDING_API_KEY": "your_api_key"
}
}
}
}
Or after installing via pip:
uvx opencode-memory
#!/bin/bash
export MEMORY_USER_ID=your_user_id
export MEMORY_DATA_DIR=./data
export EMBEDDING_PROVIDER=openai
export EMBEDDING_API_KEY=your_api_key
exec python -m memory_mcp.server
Environment Variables
| Variable | Required | Description |
|---|---|---|
MEMORY_USER_ID |
Yes | User/entity ID for operations |
MEMORY_DATA_DIR |
No | Base directory for data (default: ./data) |
EMBEDDING_PROVIDER |
Yes | openai, ollama, or huggingface |
EMBEDDING_API_KEY |
No | API key for embedding service |
EMBEDDING_BASE_URL |
No | Custom endpoint for Ollama/HF |
EMBEDDING_MODEL |
No | Model name |
EMBEDDING_DIMENSION |
No | Vector dimension (default: 1536) |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opencode_memory-0.1.0.tar.gz.
File metadata
- Download URL: opencode_memory-0.1.0.tar.gz
- Upload date:
- Size: 111.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
439652fddc4dba89976c068c8fcfee7467e006b7c0681eea705d0d366dc73a2e
|
|
| MD5 |
d4f1ee9aa1bc3b7c05fe1488711af2c4
|
|
| BLAKE2b-256 |
ea56744a74097fa3953854cccc430e523b7e1c3326fb5b18172d88074f8cf782
|
Provenance
The following attestation bundles were made for opencode_memory-0.1.0.tar.gz:
Publisher:
release.yml on Mickael-Roger/memory-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opencode_memory-0.1.0.tar.gz -
Subject digest:
439652fddc4dba89976c068c8fcfee7467e006b7c0681eea705d0d366dc73a2e - Sigstore transparency entry: 1205444180
- Sigstore integration time:
-
Permalink:
Mickael-Roger/memory-mcp@627569ee98386a7d716ead71cd8ba875a467ce22 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/Mickael-Roger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@627569ee98386a7d716ead71cd8ba875a467ce22 -
Trigger Event:
push
-
Statement type:
File details
Details for the file opencode_memory-0.1.0-py3-none-any.whl.
File metadata
- Download URL: opencode_memory-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e78d17defe3b400f7a9087534c436c7bfdb6f18f48b57fc8d802ee6fdb0e841b
|
|
| MD5 |
7b5d22ce83602fecc7498b3ba65abc08
|
|
| BLAKE2b-256 |
fe3a7f2297139d39715e0f5eb74daab0824ec6291be887dc929554cdce6bfdad
|
Provenance
The following attestation bundles were made for opencode_memory-0.1.0-py3-none-any.whl:
Publisher:
release.yml on Mickael-Roger/memory-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opencode_memory-0.1.0-py3-none-any.whl -
Subject digest:
e78d17defe3b400f7a9087534c436c7bfdb6f18f48b57fc8d802ee6fdb0e841b - Sigstore transparency entry: 1205444193
- Sigstore integration time:
-
Permalink:
Mickael-Roger/memory-mcp@627569ee98386a7d716ead71cd8ba875a467ce22 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/Mickael-Roger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@627569ee98386a7d716ead71cd8ba875a467ce22 -
Trigger Event:
push
-
Statement type: