memory-hive-mcp 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Memory Hive
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.4
2
+ Name: memory-hive-mcp
3
+ Version: 0.1.0
4
+ Summary: Local-first personal memory for your AI agents — an MCP stdio bridge to the Hive running on your own machine.
5
+ Author: Memory Hive
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://apps.apple.com/app/id6806992983
8
+ Project-URL: Repository, https://github.com/330899935/memory-hive-ios
9
+ Project-URL: Source, https://github.com/330899935/memory-hive-ios
10
+ Keywords: mcp,model-context-protocol,memory,local-first,privacy,ai-agents
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: MacOS
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
+ Requires-Python: >=3.8
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Dynamic: license-file
20
+
21
+ # memory-hive-mcp
22
+
23
+ **Local-first personal memory for your AI agents — an MCP stdio bridge to the Hive running on your own machine.**
24
+
25
+ `memory-hive-mcp` is a thin [Model Context Protocol](https://modelcontextprotocol.io) bridge.
26
+ It lets any MCP-capable host (Claude Desktop, Cursor, and friends) read and write
27
+ *your* memory — stored on *your* computer, by *your* Hive, and never uploaded anywhere.
28
+
29
+ > **This package contains no memory engine.** It only relays MCP protocol traffic to the
30
+ > Hive app already running on your machine (`127.0.0.1:8768`). Your data never passes
31
+ > through this bridge as stored state, and nothing leaves your computer.
32
+
33
+ ## Install
34
+
35
+ ```bash
36
+ pip install memory-hive-mcp
37
+ ```
38
+
39
+ Requires Python 3.8+. No third-party dependencies.
40
+
41
+ This installs the command **`memory-hive-mcp`**.
42
+ (Note: an unrelated project also owns the plain `hive-mcp` name on PyPI — that is not us.)
43
+
44
+ ## Prerequisite: a running Hive
45
+
46
+ `memory-hive-mcp` talks to the Hive on your own machine. Get it from the Mac App Store:
47
+
48
+ **https://apps.apple.com/app/id6806992983**
49
+
50
+ Then register an agent inside the Hive (`POST /api/agent/register`) to obtain an
51
+ `agent_id` and `access_token`.
52
+
53
+ ## Configure your MCP host
54
+
55
+ Add the server to your host's MCP config. For Claude Desktop
56
+ (`~/Library/Application Support/Claude/claude_desktop_config.json`):
57
+
58
+ ```json
59
+ {
60
+ "mcpServers": {
61
+ "hive-memory": {
62
+ "command": "memory-hive-mcp",
63
+ "env": {
64
+ "HIVE_AGENT_ID": "your-agent-id",
65
+ "HIVE_AGENT_TOKEN": "your-access-token"
66
+ }
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ ### Environment variables
73
+
74
+ | Name | Required | Description |
75
+ | --- | --- | --- |
76
+ | `HIVE_AGENT_ID` | yes | Agent id issued by your own Hive. |
77
+ | `HIVE_AGENT_TOKEN` | yes | Access token issued when the agent was registered. Keep it secret. |
78
+ | `HIVE_MCP_URL` | no | Hive MCP endpoint. Defaults to `http://127.0.0.1:8768/mcp`. |
79
+
80
+ ## Why a bridge, not a bundle
81
+
82
+ Your memory should have exactly one writer: the Hive on your machine. This bridge
83
+ therefore speaks protocol and nothing else — no data files are opened, no state is
84
+ cached, no engine is duplicated. That keeps your memory single-sourced, local, and
85
+ under your control.
86
+
87
+ ## License
88
+
89
+ MIT
@@ -0,0 +1,69 @@
1
+ # memory-hive-mcp
2
+
3
+ **Local-first personal memory for your AI agents — an MCP stdio bridge to the Hive running on your own machine.**
4
+
5
+ `memory-hive-mcp` is a thin [Model Context Protocol](https://modelcontextprotocol.io) bridge.
6
+ It lets any MCP-capable host (Claude Desktop, Cursor, and friends) read and write
7
+ *your* memory — stored on *your* computer, by *your* Hive, and never uploaded anywhere.
8
+
9
+ > **This package contains no memory engine.** It only relays MCP protocol traffic to the
10
+ > Hive app already running on your machine (`127.0.0.1:8768`). Your data never passes
11
+ > through this bridge as stored state, and nothing leaves your computer.
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ pip install memory-hive-mcp
17
+ ```
18
+
19
+ Requires Python 3.8+. No third-party dependencies.
20
+
21
+ This installs the command **`memory-hive-mcp`**.
22
+ (Note: an unrelated project also owns the plain `hive-mcp` name on PyPI — that is not us.)
23
+
24
+ ## Prerequisite: a running Hive
25
+
26
+ `memory-hive-mcp` talks to the Hive on your own machine. Get it from the Mac App Store:
27
+
28
+ **https://apps.apple.com/app/id6806992983**
29
+
30
+ Then register an agent inside the Hive (`POST /api/agent/register`) to obtain an
31
+ `agent_id` and `access_token`.
32
+
33
+ ## Configure your MCP host
34
+
35
+ Add the server to your host's MCP config. For Claude Desktop
36
+ (`~/Library/Application Support/Claude/claude_desktop_config.json`):
37
+
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "hive-memory": {
42
+ "command": "memory-hive-mcp",
43
+ "env": {
44
+ "HIVE_AGENT_ID": "your-agent-id",
45
+ "HIVE_AGENT_TOKEN": "your-access-token"
46
+ }
47
+ }
48
+ }
49
+ }
50
+ ```
51
+
52
+ ### Environment variables
53
+
54
+ | Name | Required | Description |
55
+ | --- | --- | --- |
56
+ | `HIVE_AGENT_ID` | yes | Agent id issued by your own Hive. |
57
+ | `HIVE_AGENT_TOKEN` | yes | Access token issued when the agent was registered. Keep it secret. |
58
+ | `HIVE_MCP_URL` | no | Hive MCP endpoint. Defaults to `http://127.0.0.1:8768/mcp`. |
59
+
60
+ ## Why a bridge, not a bundle
61
+
62
+ Your memory should have exactly one writer: the Hive on your machine. This bridge
63
+ therefore speaks protocol and nothing else — no data files are opened, no state is
64
+ cached, no engine is duplicated. That keeps your memory single-sourced, local, and
65
+ under your control.
66
+
67
+ ## License
68
+
69
+ MIT
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "memory-hive-mcp"
7
+ version = "0.1.0"
8
+ description = "Local-first personal memory for your AI agents — an MCP stdio bridge to the Hive running on your own machine."
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = "MIT"
12
+ authors = [{ name = "Memory Hive" }]
13
+ keywords = ["mcp", "model-context-protocol", "memory", "local-first", "privacy", "ai-agents"]
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Developers",
17
+ "Operating System :: MacOS",
18
+ "Programming Language :: Python :: 3",
19
+ "Topic :: Software Development :: Libraries :: Python Modules",
20
+ ]
21
+ dependencies = []
22
+
23
+ [project.urls]
24
+ Homepage = "https://apps.apple.com/app/id6806992983"
25
+ Repository = "https://github.com/330899935/memory-hive-ios"
26
+ Source = "https://github.com/330899935/memory-hive-ios"
27
+
28
+ [project.scripts]
29
+ memory-hive-mcp = "hive_mcp.stdio:main"
30
+
31
+ [tool.setuptools.packages.find]
32
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,5 @@
1
+ """hive_mcp — MCP stdio bridge for Memory Hive (local-first personal memory)."""
2
+
3
+ from .stdio import __version__, forward, main
4
+
5
+ __all__ = ["__version__", "forward", "main"]
@@ -0,0 +1,92 @@
1
+ """hive_mcp — stdio bridge to a Hive running on your own machine.
2
+
3
+ Reads MCP JSON-RPC messages line-by-line from stdin, forwards each to the local
4
+ Hive service's HTTP ``/mcp`` endpoint, and writes the response back to stdout.
5
+
6
+ This is a *thin bridge*. It does not read or write your data files, and it does
7
+ not embed a memory engine. The Hive app on your machine is the single writer;
8
+ this package only relays protocol traffic to it, so there is no cross-process
9
+ write contention and no working-directory dependency.
10
+
11
+ Credentials are injected via environment variables:
12
+
13
+ * ``HIVE_AGENT_ID`` — agent id issued by your own Hive
14
+ * ``HIVE_AGENT_TOKEN`` — access token issued by your own Hive
15
+ * ``HIVE_MCP_URL`` — Hive MCP endpoint (default http://127.0.0.1:8768/mcp)
16
+
17
+ Zero dependencies: standard library only.
18
+ """
19
+
20
+ import json
21
+ import os
22
+ import sys
23
+ import urllib.error
24
+ import urllib.request
25
+
26
+ __version__ = "0.1.0"
27
+
28
+ AGENT_ID = os.environ.get("HIVE_AGENT_ID", "")
29
+ AGENT_TOKEN = os.environ.get("HIVE_AGENT_TOKEN", "")
30
+ MCP_URL = os.environ.get("HIVE_MCP_URL", "http://127.0.0.1:8768/mcp")
31
+
32
+
33
+ def forward(payload):
34
+ body = json.dumps(payload, ensure_ascii=False).encode("utf-8")
35
+ req = urllib.request.Request(MCP_URL, data=body, method="POST")
36
+ req.add_header("Content-Type", "application/json")
37
+ if AGENT_ID:
38
+ req.add_header("X-Hive-Agent", AGENT_ID)
39
+ if AGENT_TOKEN:
40
+ req.add_header("X-Hive-Token", AGENT_TOKEN)
41
+ try:
42
+ with urllib.request.urlopen(req, timeout=30) as resp:
43
+ if resp.status == 202:
44
+ return None # notification: backend accepted, no response needed
45
+ raw = resp.read().decode("utf-8")
46
+ if not raw.strip():
47
+ return None # empty body: stay silent rather than emit a false error
48
+ return json.loads(raw)
49
+ except urllib.error.HTTPError as e:
50
+ if e.code == 202:
51
+ return None
52
+ try:
53
+ return json.loads(e.read().decode("utf-8"))
54
+ except Exception:
55
+ return {
56
+ "jsonrpc": "2.0",
57
+ "id": payload.get("id"),
58
+ "error": {"code": -32603, "message": f"HTTP {e.code}"},
59
+ }
60
+ except Exception as e:
61
+ return {
62
+ "jsonrpc": "2.0",
63
+ "id": payload.get("id"),
64
+ "error": {"code": -32603, "message": f"forward failed: {e}"},
65
+ }
66
+
67
+
68
+ def main():
69
+ for line in sys.stdin:
70
+ line = line.strip()
71
+ if not line:
72
+ continue
73
+ try:
74
+ payload = json.loads(line)
75
+ except Exception:
76
+ err = {
77
+ "jsonrpc": "2.0",
78
+ "id": None,
79
+ "error": {"code": -32700, "message": "Parse error"},
80
+ }
81
+ sys.stdout.write(json.dumps(err) + "\n")
82
+ sys.stdout.flush()
83
+ continue
84
+ resp = forward(payload)
85
+ if resp is None:
86
+ continue # nothing to send back for notifications
87
+ sys.stdout.write(json.dumps(resp, ensure_ascii=False) + "\n")
88
+ sys.stdout.flush()
89
+
90
+
91
+ if __name__ == "__main__":
92
+ main()
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.4
2
+ Name: memory-hive-mcp
3
+ Version: 0.1.0
4
+ Summary: Local-first personal memory for your AI agents — an MCP stdio bridge to the Hive running on your own machine.
5
+ Author: Memory Hive
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://apps.apple.com/app/id6806992983
8
+ Project-URL: Repository, https://github.com/330899935/memory-hive-ios
9
+ Project-URL: Source, https://github.com/330899935/memory-hive-ios
10
+ Keywords: mcp,model-context-protocol,memory,local-first,privacy,ai-agents
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: MacOS
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
+ Requires-Python: >=3.8
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Dynamic: license-file
20
+
21
+ # memory-hive-mcp
22
+
23
+ **Local-first personal memory for your AI agents — an MCP stdio bridge to the Hive running on your own machine.**
24
+
25
+ `memory-hive-mcp` is a thin [Model Context Protocol](https://modelcontextprotocol.io) bridge.
26
+ It lets any MCP-capable host (Claude Desktop, Cursor, and friends) read and write
27
+ *your* memory — stored on *your* computer, by *your* Hive, and never uploaded anywhere.
28
+
29
+ > **This package contains no memory engine.** It only relays MCP protocol traffic to the
30
+ > Hive app already running on your machine (`127.0.0.1:8768`). Your data never passes
31
+ > through this bridge as stored state, and nothing leaves your computer.
32
+
33
+ ## Install
34
+
35
+ ```bash
36
+ pip install memory-hive-mcp
37
+ ```
38
+
39
+ Requires Python 3.8+. No third-party dependencies.
40
+
41
+ This installs the command **`memory-hive-mcp`**.
42
+ (Note: an unrelated project also owns the plain `hive-mcp` name on PyPI — that is not us.)
43
+
44
+ ## Prerequisite: a running Hive
45
+
46
+ `memory-hive-mcp` talks to the Hive on your own machine. Get it from the Mac App Store:
47
+
48
+ **https://apps.apple.com/app/id6806992983**
49
+
50
+ Then register an agent inside the Hive (`POST /api/agent/register`) to obtain an
51
+ `agent_id` and `access_token`.
52
+
53
+ ## Configure your MCP host
54
+
55
+ Add the server to your host's MCP config. For Claude Desktop
56
+ (`~/Library/Application Support/Claude/claude_desktop_config.json`):
57
+
58
+ ```json
59
+ {
60
+ "mcpServers": {
61
+ "hive-memory": {
62
+ "command": "memory-hive-mcp",
63
+ "env": {
64
+ "HIVE_AGENT_ID": "your-agent-id",
65
+ "HIVE_AGENT_TOKEN": "your-access-token"
66
+ }
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ ### Environment variables
73
+
74
+ | Name | Required | Description |
75
+ | --- | --- | --- |
76
+ | `HIVE_AGENT_ID` | yes | Agent id issued by your own Hive. |
77
+ | `HIVE_AGENT_TOKEN` | yes | Access token issued when the agent was registered. Keep it secret. |
78
+ | `HIVE_MCP_URL` | no | Hive MCP endpoint. Defaults to `http://127.0.0.1:8768/mcp`. |
79
+
80
+ ## Why a bridge, not a bundle
81
+
82
+ Your memory should have exactly one writer: the Hive on your machine. This bridge
83
+ therefore speaks protocol and nothing else — no data files are opened, no state is
84
+ cached, no engine is duplicated. That keeps your memory single-sourced, local, and
85
+ under your control.
86
+
87
+ ## License
88
+
89
+ MIT
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/hive_mcp/__init__.py
5
+ src/hive_mcp/stdio.py
6
+ src/memory_hive_mcp.egg-info/PKG-INFO
7
+ src/memory_hive_mcp.egg-info/SOURCES.txt
8
+ src/memory_hive_mcp.egg-info/dependency_links.txt
9
+ src/memory_hive_mcp.egg-info/entry_points.txt
10
+ src/memory_hive_mcp.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ memory-hive-mcp = hive_mcp.stdio:main