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

Uploaded Python 3

File details

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

File metadata

  • Download URL: opencode_memory-0.4.1.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.1.tar.gz
Algorithm Hash digest
SHA256 dfa61f93cd9bda67e3e33cf75e58c593618d6c5f7a66d85acbdcf5d1c81f4af3
MD5 9ea5168c3ea0fbfa61aca403e5de0da1
BLAKE2b-256 737ff831718621ea668ef4fbd67292e3accb29314014d5adbdeaaf58f81c21f7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for opencode_memory-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2fa1c0e4226cebbacdcccef1fb268c99d9d71439ec610186ddb7e53ff31cb94e
MD5 9da0c07a7541ab543455e4800f3bcce9
BLAKE2b-256 70c5c19969e07c1d77170567077699b2a4d57a8a03fe65b847401231f1d27a84

See more details on using hashes here.

Provenance

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