memocean-mcp — Local-first AI Memory MCP Server
A local MCP server for AI agents to search and manage knowledge stored in Obsidian vaults. Built for CJK (Chinese/Japanese/Korean) developers — 94.4% Hit@5 on Chinese queries with zero AI components required.
Core features:
- BM25/INSTR hybrid search — CJK-optimized, pure SQLite, no embeddings needed
- CLSC sonar compression — 92.5% token reduction (13x compression) on Obsidian notes
- Temporal knowledge graph — entity-relationship store with non-destructive invalidation
- Cross-agent memory sharing — multiple agents share one
memory.db - FATQ task queue — File-Atomic Task Queue for agent coordination
Quick Start
pip install memocean-mcp
Add to Claude Desktop / Claude Code .mcp.json:
{
"mcpServers": {
"memocean": {
"command": "memocean-mcp",
"env": {
"MEMOCEAN_VAULT_ROOT": "/path/to/your/obsidian/vault"
}
}
}
}
Or register with Claude Code CLI:
MEMOCEAN_VAULT_ROOT=/path/to/vault claude mcp add memocean memocean-mcp
Environment Variables
| Variable | Default | Description |
|---|---|---|
MEMOCEAN_VAULT_ROOT |
~/Documents/Obsidian Vault |
Root of your Obsidian vault |
MEMOCEAN_DATA_DIR |
~/.memocean |
Data directory (databases, task queue) |
MEMOCEAN_VAULT_PATH |
MEMOCEAN_VAULT_ROOT/Ocean |
Ocean subdirectory for full-text search |
MEMOCEAN_SKILLS_DIR |
MEMOCEAN_VAULT_ROOT/Ocean/Pearl/skills |
Skills markdown directory |
MEMOCEAN_USE_GBRAIN |
false |
Enable GBrain hybrid search delegate |
KNN_ENABLED |
false |
Enable BGE-m3 KNN vector search |
ENABLE_QUERY_EXPANSION |
unset | Enable Haiku query expansion (requires ANTHROPIC_API_KEY) |
ENABLE_HAIKU_RERANKER |
unset | Enable Haiku LLM reranker |
ANTHROPIC_API_KEY |
unset | Required only for AI-assisted features above |
Backward-compat: CHANNELLAB_BOTS_ROOT → MEMOCEAN_DATA_DIR, CHANNELLAB_OCEAN_VAULT_ROOT → MEMOCEAN_VAULT_ROOT.
Available Tools
| Tool | Description |
|---|---|
memocean_search |
Unified search across Radar (sonar index) + message history. Default entry point. |
memocean_radar_search |
Search CLSC sonar index — fast keyword search, ~13% of verbatim token cost. |
memocean_seabed_get |
Retrieve full content by slug (verbatim or sonar mode). |
memocean_ocean_search |
Full-text search over Ocean vault .md files via ripgrep. |
memocean_messages_search |
BM25 search over cross-agent message history. |
memocean_kg_query |
Query the temporal knowledge graph by entity name. |
memocean_skill_list |
List or retrieve approved skills from the skill library. |
memocean_task_create |
Create a task in the FATQ pending queue (agent coordination). |
memocean_ingest_file |
Ingest local file (PDF/DOCX/XLSX/HTML/CSV/JSON) into Radar via MarkItDown. |
memocean_report_store |
Store a verbatim markdown report into Ocean vault Reports folder. |
Search Architecture
Two-path retrieval, zero AI dependency by default:
CJK query → SQLite INSTR on radar.clsc → ranked by match_count
EN query → FTS5 BM25 → fallback to INSTR on miss
Benchmark (pure BM25/INSTR, no AI):
| Dataset | Language | Hit@5 |
|---|---|---|
| Internal corpus | Chinese (mixed) | 94.4% |
| DRCD | Traditional Chinese | 91.9% |
| CMRC | Simplified Chinese | 93.3% |
| BEIR SciFact | English | 70.7% |
CLSC Sonar Compression
CLSC (Closet Lossy Summary for Chinese) extracts each document into a compact single-line sonar entry. Format:
[SLUG|ENTITIES|topics|"key_quote"|WEIGHT|EMOTIONS|FLAGS]
Compression ratio: 1,716,211 raw tokens → 129,529 sonar tokens = 13x (92.5% reduction).
Requirements
- Python 3.11+
- SQLite 3.35+
- Optional:
markitdown[all]for file ingestion - Optional:
anthropicpackage for AI-assisted features (query expansion, reranking)
License
MIT — see LICENSE.
Acknowledgements
Built on MemPalace (dual-layer architecture, AAAK skeleton format) and inspired by GBrain (Compiled Truth + Dream Cycle design).
Metadata
Release files for memocean-mcp 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| memocean_mcp-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for memocean_mcp-0.5.0-py3-none-any.whl |
Release files / memocean_mcp-0.5.0-py3-none-any.whl
| Download URL | memocean_mcp-0.5.0-py3-none-any.whl |
|---|---|
| Size | 101.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3ff3b851339bf4b13c0376730e594b7ba672199270418e04eba5bd04e6491c4
|
|
BLAKE2b-256 checksum How to use checksums |
c9cd23abe703e777eeebb5a675b6717fa5f9ec782df0aaf7f297e21cd321b705
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Security for memocean-mcp 0.5.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.