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.4.3.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.4.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file opencode_memory-0.4.3.tar.gz.

File metadata

  • Download URL: opencode_memory-0.4.3.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.4.3.tar.gz
Algorithm Hash digest
SHA256 5bd108aae83c27859b7b634b94b1394752dea124a33f11fb76545e4596e80be2
MD5 906f680119bde7980a76ed5d017d0f4a
BLAKE2b-256 6eb9d0e65f5395d66dcb334ab24ee848f6a09bdffcd423637b9d047bee9dcc80

See more details on using hashes here.

Provenance

The following attestation bundles were made for opencode_memory-0.4.3.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.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for opencode_memory-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e3e7ac676b2928930429071b82bdc5ddf65a79c458c8444206fd79c72d4220f7
MD5 5c937c8edeb086ee85bd450f88de4331
BLAKE2b-256 92e853d1d671cac480b15d1dcaa82223a84225a522e8304654f8b3b957464673

See more details on using hashes here.

Provenance

The following attestation bundles were made for opencode_memory-0.4.3-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