The Problem

AI agents need persistent memory that survives across sessions, with semantic search, knowledge graph visualization, and cloud synchronization capabilities. The repository provides this as an MCP server, but the codebase shows significant structural debt that increases the risk and cost of modifications.

What This Does

Memora is a lightweight MCP server for semantic memory storage, knowledge graphs, and cross-session context. The Python core (memora/) handles storage backends, memory operations, and cloud sync via Cloudflare D1, S3, and R2. The TypeScript frontend (memora-graph/) provides a React-based visualization server with graph routes and Cloudflare Workers integration. The claude-plugin hooks (claude-plugin/) integrate memory operations into Claude Code workflows. Execution starts at memora/server.py:1704 (main), which routes through 134 functions; memora/graph/server.py:120 (api_graph) reaches 87 functions for graph data; and memora/graph/server.py:130 (api_memory) reaches 41 functions for memory operations. The import graph contains 2 modules in circular dependencies (memora/backends.py ↔ memora/storage.py), and memora/storage.py (87 functions) is the most connected data hub, called from 5 other files and performing database reads/writes, file operations, and model inference.

How It Is Wired

Control flows from entry points through the call graph. main in memora/server.py reaches compute_content_hash (crypto via hashlib.md5) and ultimately performs database writes via add_memory → conn.execute. api_graph routes to connect (sqlite3.connect) and get_graph_data. memory_create flows through _create_memory → add_memory. An outbound request in memora/graph/server.py has no timeout, so a slow peer can hold workers indefinitely. The circular import between memora/backends.py (62 functions, 9 classes) and memora/storage.py (87 functions) means either module cannot load without the other, increasing blast radius for changes. memora/graph/data.py and memora/graph/server.py both define _get_memora_version, indicating duplicated version-detection logic. Six functions make outbound network calls (R2, D1, CloudSQLiteBackend), and three call models for inference (embedding operations).

How To Use It

Setup:

pip install git+https://github.com/agentic-mcp-tools/memora.git
# Or for local embeddings:
pip install "memora[local]" @ git+https://github.com/agentic-mcp-tools/memora.git

Configuration: Required environment variables belong in .mcp.json project root:

  • MEMORA_DB_PATH for local SQLite
  • MEMORA_STORAGE_URI (d1://<account-id>/<database-id>) for Cloud Cloudflare D1
  • CLOUDFLARE_API_TOKEN for cloud auth
  • MEMORA_ALLOW_ANY_TAG to permit unrestricted tagging

Running it:

# Stdio mode (default MCP)
memora-server

# Graph visualization server
memora-server --graph-port 8765

# HTTP transport
memora-server --transport streamable-http --host 127.0.0.1 --port 8080

Real-World Use

In a multi-session Claude Code workflow, a user extracts research notes in one session and later resumes context in another. The server stores memories with vector embeddings (TF-IDF or OpenAI), auto-links cross-references based on similarity, and preserves tag hierarchies. When the graph visualization is enabled (--graph-port), an interactive Mermaid render appears at the configured port, showing clusters and edges. Cloud sync via D1 allows the same memories to be shared across deployed workers without manual DB migration.

Code Health & Issues

  • [HIGH] Commit a lockfile beside the manifest - pyproject.toml has no generated lockfile, so tested and shipped artifacts can differ.
  • [HIGH] Add a workflow that builds and tests this repository - 24 source files, no CI configuration; every merge runs untested.
  • [HIGH] Replace the wildcard CORS origin - memora-graph/worker/src/index.ts has Access-Control-Allow-Origin: "*; paired with credentials this allows any site to perform authenticated requests.
  • [MEDIUM] Enable Dependabot or Renovate - 2 manifest(s), no update bot configured; published advisories remain unpatched indefinitely.
  • [MEDIUM] Give the outbound request a timeout - memora/graph/server.py has 1 outbound call with no timeout; requests has no default, so a slow peer hangs workers.
  • [LOW] Add repository convention files - missing .editorconfig, .gitattributes, and formatter config.

The Bottom Line

The repository delivers a functional MCP server with semantic memory, graph visualization, and cloud sync out of the box, making it immediately useful for agents needing persistent cross-session context. However, the circular import between backends and storage, absent CI/CD, wildcard CORS, and missing lockfile represent real risks for production use and long-term maintenance. Teams that can tolerate the current code health gaps and add their own CI/tooling will find value quickly; others should budget refactoring time for the import cycle and cognitive-load hotspots before relying on this in critical paths.