Skip to main content

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

opencode_memory-0.1.0.tar.gz (111.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opencode_memory-0.1.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

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

Hashes for opencode_memory-0.1.0.tar.gz
Algorithm Hash digest
SHA256 439652fddc4dba89976c068c8fcfee7467e006b7c0681eea705d0d366dc73a2e
MD5 d4f1ee9aa1bc3b7c05fe1488711af2c4
BLAKE2b-256 ea56744a74097fa3953854cccc430e523b7e1c3326fb5b18172d88074f8cf782

See more details on using hashes here.

Provenance

The following attestation bundles were made for opencode_memory-0.1.0.tar.gz:

Publisher: release.yml on Mickael-Roger/memory-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opencode_memory-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for opencode_memory-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e78d17defe3b400f7a9087534c436c7bfdb6f18f48b57fc8d802ee6fdb0e841b
MD5 7b5d22ce83602fecc7498b3ba65abc08
BLAKE2b-256 fe3a7f2297139d39715e0f5eb74daab0824ec6291be887dc929554cdce6bfdad

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page