memro-mcp 0.2.1__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.
- memro_mcp-0.2.1/LICENSE +75 -0
- memro_mcp-0.2.1/PKG-INFO +84 -0
- memro_mcp-0.2.1/README.md +64 -0
- memro_mcp-0.2.1/pyproject.toml +35 -0
- memro_mcp-0.2.1/setup.cfg +4 -0
- memro_mcp-0.2.1/src/memro_mcp/__init__.py +4 -0
- memro_mcp-0.2.1/src/memro_mcp/sdk.py +88 -0
- memro_mcp-0.2.1/src/memro_mcp/server.py +792 -0
- memro_mcp-0.2.1/src/memro_mcp/supermemory_tools.py +183 -0
- memro_mcp-0.2.1/src/memro_mcp.egg-info/PKG-INFO +84 -0
- memro_mcp-0.2.1/src/memro_mcp.egg-info/SOURCES.txt +18 -0
- memro_mcp-0.2.1/src/memro_mcp.egg-info/dependency_links.txt +1 -0
- memro_mcp-0.2.1/src/memro_mcp.egg-info/entry_points.txt +2 -0
- memro_mcp-0.2.1/src/memro_mcp.egg-info/requires.txt +8 -0
- memro_mcp-0.2.1/src/memro_mcp.egg-info/top_level.txt +1 -0
- memro_mcp-0.2.1/tests/test_auth.py +112 -0
- memro_mcp-0.2.1/tests/test_coordination.py +333 -0
- memro_mcp-0.2.1/tests/test_instructions.py +35 -0
- memro_mcp-0.2.1/tests/test_memory_types.py +54 -0
- memro_mcp-0.2.1/tests/test_tools_live.py +89 -0
memro_mcp-0.2.1/LICENSE
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
Required Notice: Copyright 2026 Memro (https://memro.co)
|
|
2
|
+
|
|
3
|
+
# PolyForm Noncommercial License 1.0.0
|
|
4
|
+
|
|
5
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
14
|
+
|
|
15
|
+
## Distribution License
|
|
16
|
+
|
|
17
|
+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
18
|
+
|
|
19
|
+
## Notices
|
|
20
|
+
|
|
21
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
22
|
+
|
|
23
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
24
|
+
|
|
25
|
+
## Changes and New Works License
|
|
26
|
+
|
|
27
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
28
|
+
|
|
29
|
+
## Patent License
|
|
30
|
+
|
|
31
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
32
|
+
|
|
33
|
+
## Noncommercial Purposes
|
|
34
|
+
|
|
35
|
+
Any noncommercial purpose is a permitted purpose.
|
|
36
|
+
|
|
37
|
+
## Personal Uses
|
|
38
|
+
|
|
39
|
+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
40
|
+
|
|
41
|
+
## Noncommercial Organizations
|
|
42
|
+
|
|
43
|
+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
44
|
+
|
|
45
|
+
## Fair Use
|
|
46
|
+
|
|
47
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
48
|
+
|
|
49
|
+
## No Other Rights
|
|
50
|
+
|
|
51
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
52
|
+
|
|
53
|
+
## Patent Defense
|
|
54
|
+
|
|
55
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
56
|
+
|
|
57
|
+
## Violations
|
|
58
|
+
|
|
59
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
60
|
+
|
|
61
|
+
## No Liability
|
|
62
|
+
|
|
63
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
64
|
+
|
|
65
|
+
## Definitions
|
|
66
|
+
|
|
67
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
68
|
+
|
|
69
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
70
|
+
|
|
71
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
72
|
+
|
|
73
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
74
|
+
|
|
75
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
memro_mcp-0.2.1/PKG-INFO
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: memro-mcp
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Memro — verified memory infrastructure for AI agents
|
|
5
|
+
Author-email: memro Team <sdk@memro.co>
|
|
6
|
+
License: LicenseRef-PolyForm-Noncommercial-1.0.0
|
|
7
|
+
Project-URL: Homepage, https://memro.co
|
|
8
|
+
Project-URL: Repository, https://github.com/memrohq/memro
|
|
9
|
+
Keywords: ai-agents,agent-memory,mcp,llm
|
|
10
|
+
Requires-Python: >=3.10
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: mcp<2,>=1.9
|
|
14
|
+
Requires-Dist: memro<0.3,>=0.2
|
|
15
|
+
Requires-Dist: python-dotenv<2,>=1
|
|
16
|
+
Requires-Dist: starlette<2,>=0.40
|
|
17
|
+
Requires-Dist: uvicorn<1,>=0.30
|
|
18
|
+
Requires-Dist: uvloop>=0.19; sys_platform != "win32"
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
# Memro MCP Server
|
|
22
|
+
|
|
23
|
+
Verified memory infrastructure for AI agents. Gives any Model Context Protocol (MCP) compatible AI tool (Claude Code, Cursor, Codex, Zed, Claude Desktop) persistent memory across sessions.
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# PyPI (once published via CI):
|
|
29
|
+
pip install memro-mcp
|
|
30
|
+
|
|
31
|
+
# Or install from source:
|
|
32
|
+
pip install .
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Quick Example (MCP Config)
|
|
36
|
+
|
|
37
|
+
Add to your MCP client config (e.g., `~/.claude/claude_desktop_config.json` or `.cursor/mcp.json`):
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"mcpServers": {
|
|
42
|
+
"memro": {
|
|
43
|
+
"command": "memro-mcp",
|
|
44
|
+
"env": {
|
|
45
|
+
"MEMRO_API_KEY": "memro_sk_..."
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Or connect with a single command via the CLI:
|
|
53
|
+
```bash
|
|
54
|
+
npx memro-cli connect
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Available MCP Tools
|
|
58
|
+
|
|
59
|
+
Once connected, agents have direct access to:
|
|
60
|
+
|
|
61
|
+
| Tool | Description |
|
|
62
|
+
|------|-------------|
|
|
63
|
+
| `remember` | Store a new memory (`semantic`, `episodic`, `procedural`, or `profile`) |
|
|
64
|
+
| `recall` | Hybrid semantic + keyword retrieval across stored memories |
|
|
65
|
+
| `get_recent_memories` | Retrieve recent memories chronologically |
|
|
66
|
+
| `delete_memory` | Delete a specific memory by ID |
|
|
67
|
+
| `export_memories` | Export agent memory state |
|
|
68
|
+
| `search_temporal` | Query memories with explicit time-range weighting |
|
|
69
|
+
|
|
70
|
+
## Environment Variables
|
|
71
|
+
|
|
72
|
+
| Variable | Default | Description |
|
|
73
|
+
|----------|---------|-------------|
|
|
74
|
+
| `MEMRO_API_KEY` | — | Memro API key (`memro_sk_...`) |
|
|
75
|
+
| `MEMRO_BASE_URL` | `http://localhost:8081` | Memro backend URL (default for local self-hosting) |
|
|
76
|
+
| `MEMRO_AGENT_ID` | auto | Sovereign agent Ed25519 public key |
|
|
77
|
+
| `MEMRO_PRIVATE_KEY` | auto | Sovereign agent Ed25519 private key |
|
|
78
|
+
| `MCP_TRANSPORT` | `stdio` | `stdio` for local CLI tools, or `sse` for HTTP SSE transport |
|
|
79
|
+
| `MCP_LOG_LEVEL` | `INFO` | Logging level (`DEBUG`, `INFO`, `WARNING`, `ERROR`) |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
Repository: [github.com/memrohq/memro](https://github.com/memrohq/memro) · Documentation: [https://memro.co](https://memro.co)
|
|
84
|
+
License: Source available under [PolyForm Noncommercial 1.0.0](https://polyformproject.org/licenses/noncommercial/1.0.0). Free for non-commercial use; commercial use through Memro Cloud or a commercial license.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Memro MCP Server
|
|
2
|
+
|
|
3
|
+
Verified memory infrastructure for AI agents. Gives any Model Context Protocol (MCP) compatible AI tool (Claude Code, Cursor, Codex, Zed, Claude Desktop) persistent memory across sessions.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# PyPI (once published via CI):
|
|
9
|
+
pip install memro-mcp
|
|
10
|
+
|
|
11
|
+
# Or install from source:
|
|
12
|
+
pip install .
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Example (MCP Config)
|
|
16
|
+
|
|
17
|
+
Add to your MCP client config (e.g., `~/.claude/claude_desktop_config.json` or `.cursor/mcp.json`):
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"memro": {
|
|
23
|
+
"command": "memro-mcp",
|
|
24
|
+
"env": {
|
|
25
|
+
"MEMRO_API_KEY": "memro_sk_..."
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or connect with a single command via the CLI:
|
|
33
|
+
```bash
|
|
34
|
+
npx memro-cli connect
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Available MCP Tools
|
|
38
|
+
|
|
39
|
+
Once connected, agents have direct access to:
|
|
40
|
+
|
|
41
|
+
| Tool | Description |
|
|
42
|
+
|------|-------------|
|
|
43
|
+
| `remember` | Store a new memory (`semantic`, `episodic`, `procedural`, or `profile`) |
|
|
44
|
+
| `recall` | Hybrid semantic + keyword retrieval across stored memories |
|
|
45
|
+
| `get_recent_memories` | Retrieve recent memories chronologically |
|
|
46
|
+
| `delete_memory` | Delete a specific memory by ID |
|
|
47
|
+
| `export_memories` | Export agent memory state |
|
|
48
|
+
| `search_temporal` | Query memories with explicit time-range weighting |
|
|
49
|
+
|
|
50
|
+
## Environment Variables
|
|
51
|
+
|
|
52
|
+
| Variable | Default | Description |
|
|
53
|
+
|----------|---------|-------------|
|
|
54
|
+
| `MEMRO_API_KEY` | — | Memro API key (`memro_sk_...`) |
|
|
55
|
+
| `MEMRO_BASE_URL` | `http://localhost:8081` | Memro backend URL (default for local self-hosting) |
|
|
56
|
+
| `MEMRO_AGENT_ID` | auto | Sovereign agent Ed25519 public key |
|
|
57
|
+
| `MEMRO_PRIVATE_KEY` | auto | Sovereign agent Ed25519 private key |
|
|
58
|
+
| `MCP_TRANSPORT` | `stdio` | `stdio` for local CLI tools, or `sse` for HTTP SSE transport |
|
|
59
|
+
| `MCP_LOG_LEVEL` | `INFO` | Logging level (`DEBUG`, `INFO`, `WARNING`, `ERROR`) |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
Repository: [github.com/memrohq/memro](https://github.com/memrohq/memro) · Documentation: [https://memro.co](https://memro.co)
|
|
64
|
+
License: Source available under [PolyForm Noncommercial 1.0.0](https://polyformproject.org/licenses/noncommercial/1.0.0). Free for non-commercial use; commercial use through Memro Cloud or a commercial license.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "memro-mcp"
|
|
7
|
+
version = "0.2.1"
|
|
8
|
+
description = "Memro — verified memory infrastructure for AI agents"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = {text = "LicenseRef-PolyForm-Noncommercial-1.0.0"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "memro Team", email = "sdk@memro.co"}
|
|
14
|
+
]
|
|
15
|
+
keywords = ["ai-agents", "agent-memory", "mcp", "llm"]
|
|
16
|
+
|
|
17
|
+
dependencies = [
|
|
18
|
+
"mcp>=1.9,<2",
|
|
19
|
+
"memro>=0.2,<0.3",
|
|
20
|
+
"python-dotenv>=1,<2",
|
|
21
|
+
"starlette>=0.40,<2",
|
|
22
|
+
"uvicorn>=0.30,<1",
|
|
23
|
+
# uvloop does not build on Windows; the server falls back to asyncio.
|
|
24
|
+
"uvloop>=0.19; sys_platform != 'win32'",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.scripts]
|
|
28
|
+
memro-mcp = "memro_mcp:main"
|
|
29
|
+
|
|
30
|
+
[tool.setuptools.packages.find]
|
|
31
|
+
where = ["src"]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
Homepage = "https://memro.co"
|
|
35
|
+
Repository = "https://github.com/memrohq/memro"
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import httpx
|
|
2
|
+
import asyncio
|
|
3
|
+
from typing import List, Optional, Dict, Any
|
|
4
|
+
|
|
5
|
+
class MemroSDK:
|
|
6
|
+
"""
|
|
7
|
+
Simplified Developer SDK for Memro: The Active Knowledge Layer for AI Agents.
|
|
8
|
+
|
|
9
|
+
This SDK abstracts away the complexity of the MEE (Memory Evolution Engine)
|
|
10
|
+
and providing a human-first interface for AI agent memory.
|
|
11
|
+
"""
|
|
12
|
+
def __init__(self, agent_id: str, token: str, base_url: str = "http://localhost:8081"):
|
|
13
|
+
self.agent_id = agent_id
|
|
14
|
+
self.token = token
|
|
15
|
+
self.base_url = base_url
|
|
16
|
+
self.headers = {
|
|
17
|
+
"Authorization": f"Bearer {token}",
|
|
18
|
+
"X-Agent-Id": agent_id,
|
|
19
|
+
"Content-Type": "application/json"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async def remember(self, content: str, memory_type: str = "episodic", metadata: Dict[str, Any] = None):
|
|
23
|
+
"""
|
|
24
|
+
Store a new memory for the agent.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
content: The text content of the memory.
|
|
28
|
+
memory_type: 'episodic' (event) or 'semantic' (fact). Defaults to 'episodic'.
|
|
29
|
+
metadata: Optional dictionary of additional context.
|
|
30
|
+
"""
|
|
31
|
+
async with httpx.AsyncClient() as client:
|
|
32
|
+
response = await client.post(
|
|
33
|
+
f"{self.base_url}/memories",
|
|
34
|
+
json={"content": content, "memory_type": memory_type, "metadata": metadata or {}},
|
|
35
|
+
headers=self.headers
|
|
36
|
+
)
|
|
37
|
+
response.raise_for_status()
|
|
38
|
+
return response.json()
|
|
39
|
+
|
|
40
|
+
async def recall(self, query: str, limit: int = 5):
|
|
41
|
+
"""
|
|
42
|
+
Retrieve the most relevant memories based on semantic similarity.
|
|
43
|
+
|
|
44
|
+
Args:
|
|
45
|
+
query: The search string.
|
|
46
|
+
limit: Maximum number of memories to return.
|
|
47
|
+
"""
|
|
48
|
+
async with httpx.AsyncClient() as client:
|
|
49
|
+
response = await client.post(
|
|
50
|
+
f"{self.base_url}/search",
|
|
51
|
+
json={"query": query, "limit": limit},
|
|
52
|
+
headers=self.headers
|
|
53
|
+
)
|
|
54
|
+
response.raise_for_status()
|
|
55
|
+
return response.json()
|
|
56
|
+
|
|
57
|
+
async def reason(self, query: str, complex: bool = False):
|
|
58
|
+
"""
|
|
59
|
+
Ask the Memory Evolution Engine (MEE) to reason over stored knowledge.
|
|
60
|
+
|
|
61
|
+
Args:
|
|
62
|
+
query: The question or reasoning prompt.
|
|
63
|
+
complex: If True, uses the 'Deep Path' (causal analysis). Defaults to False (Fast Path).
|
|
64
|
+
"""
|
|
65
|
+
endpoint = "/mee/reason"
|
|
66
|
+
# The engine uses heuristics to decide between Fast and Deep paths based on query keywords,
|
|
67
|
+
# but the SDK can eventually support explicit mode selection.
|
|
68
|
+
async with httpx.AsyncClient() as client:
|
|
69
|
+
response = await client.post(
|
|
70
|
+
f"{self.base_url}{endpoint}",
|
|
71
|
+
json={"query": query},
|
|
72
|
+
headers=self.headers
|
|
73
|
+
)
|
|
74
|
+
response.raise_for_status()
|
|
75
|
+
return response.json()
|
|
76
|
+
|
|
77
|
+
async def get_usage(self):
|
|
78
|
+
"""
|
|
79
|
+
Fetch real-time usage metrics for the current agent.
|
|
80
|
+
Includes reasoning call counts and graph statistics.
|
|
81
|
+
"""
|
|
82
|
+
async with httpx.AsyncClient() as client:
|
|
83
|
+
response = await client.get(
|
|
84
|
+
f"{self.base_url}/usage",
|
|
85
|
+
headers=self.headers
|
|
86
|
+
)
|
|
87
|
+
response.raise_for_status()
|
|
88
|
+
return response.json()
|