Memory Hive

Local-first memory your AI agents share over MCP. Agents propose; only you confirm.

AI & MLSwiftv0.1.1

Memory Hive

Your AIs all remember you — but each one only remembers a part, and none of it lives in your hands. Memory Hive is the memory your agents share: one local store, reached over the Model Context Protocol, running on your own machine.

PyPI License: MIT MCP


MCP server — start here if you use Claude Desktop, Cursor, or any MCP client

pip install memory-hive-mcp

Add the bridge to your host's MCP config. Claude Desktop example (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "hive-memory": {
      "command": "memory-hive-mcp",
      "env": {
        "HIVE_AGENT_ID": "your-agent-id",
        "HIVE_AGENT_TOKEN": "your-access-token"
      }
    }
  }
}

Python 3.8+, standard library only. This package is a thin bridge — it embeds no memory engine and opens no data files. It relays MCP traffic to the Hive app on your machine (127.0.0.1:8768 by default; override with HIVE_MCP_URL).

A Hive of your own is required. The bridge needs something to talk to: https://apps.apple.com/app/id6806992983. Register an agent inside it (POST /api/agent/register) to obtain an agent_id and access_token.

VariableRequired
HIVE_AGENT_IDyesAgent id issued by your own Hive
HIVE_AGENT_TOKENyesAccess token issued at registration — keep it secret
HIVE_MCP_URLnoHive MCP endpoint. Defaults to http://127.0.0.1:8768/mcp

The six tools

ToolDirectionWhat it does
recallreadSemantic search over your memory. {"query": "that project we discussed", "limit": 10, "compact": true} — optional vaults narrows the search, query_vector switches to embedding recall
proposewrite → pendingSubmits a memory for your approval. {"content": "..."} plus optional title, vault, tags, vector, and client_id as an idempotency key. Returns a conflict_warning when a near-duplicate already exists
manageadminRouted by action: list_pending / forget (soft delete) / restore / get_by_id / discard_pending
get_contextsession startPulls recent memory from your active threads and open tasks to seed a conversation. {"limit": 8}
saycollaborationPosts to the shared board. {"summary": "..."} plus optional to, kind, stage, task_id, refs, ttl
boardcollaborationReads the shared board with a cursor. {"limit": 20, "since": "<cursor>"} — roster: true also returns who is on duty

A typical session: get_context on open → recall mid-conversation → when you say "keep this", it proposes → you confirm in your Hive on the Mac.

A shared ledger, not just a shared store

say and board make the Hive something more than a memory table: a place where several agents and one human keep the same ledger.

An agent posts what it just finished (say); another picks it up on its own schedule (board with a cursor) — no push, no waking anyone up, no orchestrator in the middle. Identity comes from the credential, not from a field the caller can set, so one agent cannot speak as another, and the human sees every hand-off in the same thread.

Your agent can propose. It cannot decide.

This is the part that makes Memory Hive different from a memory cache.

An agent can propose a memory. It cannot confirm one. What it writes lands in a pending queue and stays there until you accept it in your own Hive. There is no self-confirm, no silent background write, no path by which a model quietly decides what is true about you.

Memory is partitioned into vaults, and the boundary is enforced by the Hive rather than promised by a prompt:

Agent typePublic vaultsPrivate vaults
Cloud agent (mcp / mobile)✅ open🔒 sealed
Local agent (non-cloud)✅ open✅ open

Agents missing from the registration table are sealed by default. Every one of these limits is checked on the Hive side — the side you control.

Why not just let the platform remember?

Because your AI's memory today is:

  1. An island. What you told Claude, Cursor doesn't know. What you worked out with one agent, the next one makes you re-explain from scratch.
  2. Not yours. It sits on a vendor's server, in a format you can't export, migrate, or verify.
  3. Governed by someone else. What gets kept, what gets forgotten, who may read it — those are product decisions, not yours.

If you use one AI, its built-in memory is probably enough — you don't need this. If you use three or more, you already know the cost of re-introducing yourself. Memory Hive is for you.

Other ways in

Bring your existing notes into a Hive (~1 minute)

tools/hive-import is a zero-dependency CLI in this repository. It takes a folder of notes you already have — Markdown, plain text, JSON — and converts them into what your own Hive accepts.

git clone https://github.com/330899935/memory-hive-ios
cd memory-hive-ios

# 1. See what would be imported, without writing anything
python3 tools/hive-import/hive-import.py convert ~/my-notes --dry-run

# 2. Produce the import file
python3 tools/hive-import/hive-import.py convert ~/my-notes -o hive_import.json

# 3. Feed it into your own Hive (key comes from your own machine)
export HIVE_MASTER_KEY=<your key>
python3 tools/hive-import/hive-import.py send hive_import.json

Python 3.8+, standard library only. Nothing is uploaded anywhere: the single network call is the final POST to the Hive address you pass in.

→ Full usage and conversion rules: tools/hive-import/README.md

The pocket client

Record a thought on your phone; it syncs home to your Hive when both are on the same network. The Mac app is the thing; the phone is a door into it. With no Hive of your own to sync to, the iOS app is a well-made notebook.

How the pieces fit together

PieceWhat it isWhere
A Hivethe memory store itself — your memories as files on your own disk, served locallyMac app — https://apps.apple.com/app/id6806992983
memory-hive-mcpthe MCP server that lets any agent read and write through itPyPI — https://pypi.org/project/memory-hive-mcp/
tools/hive-importbrings the notes you already have into a Hivethis repo
Pocket clientrecord a thought on your phone, sync it homeiOS app (free) — https://apps.apple.com/app/id6816318170
Sources/the iOS app's UI and utility layerthis repo

What is in this repository

▶ Runnable today — tools/hive-import A small Python CLI: notes → Hive ingest format → optionally send. No dependencies, no telemetry, your key is never written to disk.

🔌 The MCP server — memory-hive-mcp Published on PyPI and documented above. The source of the bridge is part of the closed MCP interface layer; the package itself is installed with pip.

📖 Reference code — Sources/ The iOS app's UI and utility layer: views and navigation, the design system (theme, icons, motion, haptics), media pickers, and Simplified Chinese / English localization. 22 Swift files.

⚠️ Honest note: Sources/ is a subset of modules, published to be read, not to be built. The Xcode project and the closed modules listed below are not part of this repository, so xcodebuild will not produce a runnable app from this tree alone. To run the real thing, use the App Store links above.

What is not in this repository

🔒 Closed source — the part that connects an agent to a Hive:

  • Device pairing (QR handshake and one-time pairing codes)
  • Credential storage and the on-device keychain wrapper
  • The authenticated handshake / authorization between an agent and your Hive
  • The memory engine itself — the store, the retrieval, the vault boundary

These modules implement the controlled-access design at the heart of Memory Hive. They stay closed so that the security boundary is not something anyone can fork and quietly weaken. Everything you need for the experience is here; everything that authorizes it is not.

License

Released under the MIT License — see LICENSE.

Contact

Questions and bug reports: please open an issue.

Installation

Source-derived launch command. Check the maintainer’s required arguments and credentials before running:

bash
uvx memory-hive-mcp

Set up in your AI client

Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.

json
{
  "mcpServers": {
    "io-github-330899935-hive-memory": {
      "command": "uvx",
      "args": [
        "memory-hive-mcp"
      ]
    }
  }
}

Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.

Claude Desktop setup reference

Package

memory-hive-mcppypi

Compatible MCP Clients

Memory Hive works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More