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": ["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)

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.4.tar.gz (112.4 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.4-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: opencode_memory-0.4.4.tar.gz
  • Upload date:
  • Size: 112.4 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.4.tar.gz
Algorithm Hash digest
SHA256 95518514b5b4c2c93669a1afc6e8eafbb5f545de1ad547946275bfa8f287d1b2
MD5 49faee14da8d7c5c95d9c40b2dda59e4
BLAKE2b-256 db11c64be9635dab743a7d545a9d998f30fde6f5f6d71cb841ea9c29976d054c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for opencode_memory-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 025c72449c02a236b76b3bd820f3e34a853cbea56bffa5e0fab31311fd5d0fb9
MD5 577a84941130ed54c1524c79f94f8283
BLAKE2b-256 8baa32ebb07c64f353c79a9890481234a34e890a8940c6c4d9ff230f01a0bd62

See more details on using hashes here.

Provenance

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