Skip to main content

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": ["uvx", "--from", "opencode-memory", "memory-mcp", "--stdio"],
      "environment": {
        "MEMORY_USER_ID": "user_name",
        "MEMORY_DATA_DIR": "{env:HOME}/.memory",
        "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)

Metadata

Release files for opencode-memory 0.4.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opencode-memory 0.4.4
File Size Uploaded Provenance Actions
opencode_memory-0.4.4.tar.gz 112.4 kB With provenance Details for opencode_memory-0.4.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opencode-memory 0.4.4
File Interpreter ABI Platform Actions
opencode_memory-0.4.4-py3-none-any.whl Python 3 none any Details for opencode_memory-0.4.4-py3-none-any.whl

Total release size: 124.8 kB

Release files / opencode_memory-0.4.4.tar.gz

Download URL opencode_memory-0.4.4.tar.gz
Size 112.4 kB
Tags Source
SHA-256 checksum
How to use checksums
95518514b5b4c2c93669a1afc6e8eafbb5f545de1ad547946275bfa8f287d1b2
BLAKE2b-256 checksum
How to use checksums
db11c64be9635dab743a7d545a9d998f30fde6f5f6d71cb841ea9c29976d054c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.

Transparency log

Release files / opencode_memory-0.4.4-py3-none-any.whl

Download URL opencode_memory-0.4.4-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
025c72449c02a236b76b3bd820f3e34a853cbea56bffa5e0fab31311fd5d0fb9
BLAKE2b-256 checksum
How to use checksums
8baa32ebb07c64f353c79a9890481234a34e890a8940c6c4d9ff230f01a0bd62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.

Transparency log

Security for opencode-memory 0.4.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for opencode_memory-0.4.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page