mem-brain-mcp 1.0.0__tar.gz → 1.0.2__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.
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/.gitignore +1 -0
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/PKG-INFO +50 -18
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/README.md +49 -17
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/aws/DEPLOYMENT.md +1 -1
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/pyproject.toml +1 -1
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/src/mem_brain_mcp/__init__.py +1 -1
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/src/mem_brain_mcp/config.py +7 -2
- mem_brain_mcp-1.0.2/src/mem_brain_mcp/server.py +1488 -0
- mem_brain_mcp-1.0.0/src/mem_brain_mcp/server.py +0 -939
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/.dockerignore +0 -0
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/.env +0 -0
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/TROUBLESHOOTING.md +0 -0
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/USAGE.md +0 -0
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/aws/alb-target-group.json +0 -0
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/aws/deploy.sh +0 -0
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/aws/ecs-service-config.json +0 -0
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/aws/ecs-task-definition.json +0 -0
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/aws/security-groups.md +0 -0
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/docker/Dockerfile +0 -0
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/src/mem_brain_mcp/__main__.py +0 -0
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/src/mem_brain_mcp/client.py +0 -0
- {mem_brain_mcp-1.0.0 → mem_brain_mcp-1.0.2}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mem-brain-mcp
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: MCP Server for Mem-Brain API - Exposes memory operations as MCP tools
|
|
5
5
|
Keywords: ai,claude,cursor,llm,mcp,memory,model-context-protocol
|
|
6
6
|
Classifier: Development Status :: 4 - Beta
|
|
@@ -38,21 +38,40 @@ MCP (Model Context Protocol) server that exposes Mem-Brain API functionality as
|
|
|
38
38
|
- **HTTP/SSE Transport**: Run independently, accessible remotely
|
|
39
39
|
- **CLI Interface**: Packaged for easy global execution
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
### From PyPI (Recommended)
|
|
44
|
+
|
|
45
|
+
Install from PyPI using `pip` or `uv`:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Using pip
|
|
49
|
+
pip install mem-brain-mcp
|
|
50
|
+
|
|
51
|
+
# Using uv
|
|
52
|
+
uv pip install mem-brain-mcp
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Then run globally:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
mem-brain-mcp
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Instant Execution with uvx
|
|
42
62
|
|
|
43
|
-
You can run the MCP server instantly without manual installation using `
|
|
63
|
+
You can run the MCP server instantly without manual installation using `uvx`:
|
|
44
64
|
|
|
45
65
|
```bash
|
|
46
|
-
# Run using uvx (
|
|
66
|
+
# Run using uvx (uses default API URL)
|
|
47
67
|
uvx mem-brain-mcp
|
|
48
68
|
|
|
49
|
-
#
|
|
50
|
-
export API_BASE_URL=http://your-api-
|
|
69
|
+
# Override API URL or set JWT token if needed
|
|
70
|
+
export API_BASE_URL=http://your-custom-api-url.com
|
|
71
|
+
export MEMBRAIN_API_KEY=your-jwt-token-here
|
|
51
72
|
uvx mem-brain-mcp
|
|
52
73
|
```
|
|
53
74
|
|
|
54
|
-
## Installation
|
|
55
|
-
|
|
56
75
|
### From Source
|
|
57
76
|
|
|
58
77
|
1. Install using `uv` (recommended) or `pip`:
|
|
@@ -70,13 +89,14 @@ mem-brain-mcp
|
|
|
70
89
|
|
|
71
90
|
## Configuration
|
|
72
91
|
|
|
73
|
-
The server reads configuration from environment variables or a `.env` file in the current working directory:
|
|
92
|
+
The server reads configuration from environment variables or a `.env` file in the current working directory. Most settings have sensible defaults:
|
|
74
93
|
|
|
75
94
|
```env
|
|
76
|
-
# API Configuration
|
|
77
|
-
API_BASE_URL=http://
|
|
78
|
-
# NOTE:
|
|
79
|
-
|
|
95
|
+
# API Configuration (optional - defaults to production API)
|
|
96
|
+
API_BASE_URL=http://membrain-api-alb-1094729422.ap-south-1.elb.amazonaws.com
|
|
97
|
+
# NOTE: MEMBRAIN_API_KEY is actually a JWT access token (from login/signup)
|
|
98
|
+
# Per-user JWT tokens are typically configured in MCP clients via headers
|
|
99
|
+
MEMBRAIN_API_KEY=your_jwt_token_here # Optional: fallback for single-user scenarios
|
|
80
100
|
|
|
81
101
|
# MCP Server Configuration
|
|
82
102
|
MCP_SERVER_HOST=0.0.0.0
|
|
@@ -86,9 +106,11 @@ MCP_SERVER_PORT=8100
|
|
|
86
106
|
LOG_LEVEL=INFO
|
|
87
107
|
```
|
|
88
108
|
|
|
89
|
-
|
|
109
|
+
**Note**: The `API_BASE_URL` defaults to the production Mem-Brain API endpoint, so you typically don't need to set it unless you're using a custom API instance.
|
|
110
|
+
|
|
111
|
+
## Per-User JWT Token Configuration
|
|
90
112
|
|
|
91
|
-
Each user must configure their own
|
|
113
|
+
Each user must configure their own JWT access token in their MCP client for proper user isolation. The server extracts tokens from request headers. Get your JWT token by logging in or signing up to the Mem-Brain API.
|
|
92
114
|
|
|
93
115
|
### Cursor IDE (`~/.cursor/mcp.json`)
|
|
94
116
|
|
|
@@ -129,10 +151,20 @@ Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/
|
|
|
129
151
|
"mcpServers": {
|
|
130
152
|
"mem-brain": {
|
|
131
153
|
"command": "uvx",
|
|
132
|
-
"args": ["mem-brain-mcp"]
|
|
154
|
+
"args": ["mem-brain-mcp"]
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Note**: After installing from PyPI, you can also use `mem-brain-mcp` directly. The API URL is set by default, but you can override it if needed:
|
|
161
|
+
```json
|
|
162
|
+
{
|
|
163
|
+
"mcpServers": {
|
|
164
|
+
"mem-brain": {
|
|
165
|
+
"command": "mem-brain-mcp",
|
|
133
166
|
"env": {
|
|
134
|
-
"API_BASE_URL": "http://your-
|
|
135
|
-
"JWT_SECRET_KEY": "your-secret"
|
|
167
|
+
"API_BASE_URL": "http://your-custom-api-url"
|
|
136
168
|
}
|
|
137
169
|
}
|
|
138
170
|
}
|
|
@@ -12,21 +12,40 @@ MCP (Model Context Protocol) server that exposes Mem-Brain API functionality as
|
|
|
12
12
|
- **HTTP/SSE Transport**: Run independently, accessible remotely
|
|
13
13
|
- **CLI Interface**: Packaged for easy global execution
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
### From PyPI (Recommended)
|
|
18
|
+
|
|
19
|
+
Install from PyPI using `pip` or `uv`:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Using pip
|
|
23
|
+
pip install mem-brain-mcp
|
|
24
|
+
|
|
25
|
+
# Using uv
|
|
26
|
+
uv pip install mem-brain-mcp
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Then run globally:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
mem-brain-mcp
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Instant Execution with uvx
|
|
16
36
|
|
|
17
|
-
You can run the MCP server instantly without manual installation using `
|
|
37
|
+
You can run the MCP server instantly without manual installation using `uvx`:
|
|
18
38
|
|
|
19
39
|
```bash
|
|
20
|
-
# Run using uvx (
|
|
40
|
+
# Run using uvx (uses default API URL)
|
|
21
41
|
uvx mem-brain-mcp
|
|
22
42
|
|
|
23
|
-
#
|
|
24
|
-
export API_BASE_URL=http://your-api-
|
|
43
|
+
# Override API URL or set JWT token if needed
|
|
44
|
+
export API_BASE_URL=http://your-custom-api-url.com
|
|
45
|
+
export MEMBRAIN_API_KEY=your-jwt-token-here
|
|
25
46
|
uvx mem-brain-mcp
|
|
26
47
|
```
|
|
27
48
|
|
|
28
|
-
## Installation
|
|
29
|
-
|
|
30
49
|
### From Source
|
|
31
50
|
|
|
32
51
|
1. Install using `uv` (recommended) or `pip`:
|
|
@@ -44,13 +63,14 @@ mem-brain-mcp
|
|
|
44
63
|
|
|
45
64
|
## Configuration
|
|
46
65
|
|
|
47
|
-
The server reads configuration from environment variables or a `.env` file in the current working directory:
|
|
66
|
+
The server reads configuration from environment variables or a `.env` file in the current working directory. Most settings have sensible defaults:
|
|
48
67
|
|
|
49
68
|
```env
|
|
50
|
-
# API Configuration
|
|
51
|
-
API_BASE_URL=http://
|
|
52
|
-
# NOTE:
|
|
53
|
-
|
|
69
|
+
# API Configuration (optional - defaults to production API)
|
|
70
|
+
API_BASE_URL=http://membrain-api-alb-1094729422.ap-south-1.elb.amazonaws.com
|
|
71
|
+
# NOTE: MEMBRAIN_API_KEY is actually a JWT access token (from login/signup)
|
|
72
|
+
# Per-user JWT tokens are typically configured in MCP clients via headers
|
|
73
|
+
MEMBRAIN_API_KEY=your_jwt_token_here # Optional: fallback for single-user scenarios
|
|
54
74
|
|
|
55
75
|
# MCP Server Configuration
|
|
56
76
|
MCP_SERVER_HOST=0.0.0.0
|
|
@@ -60,9 +80,11 @@ MCP_SERVER_PORT=8100
|
|
|
60
80
|
LOG_LEVEL=INFO
|
|
61
81
|
```
|
|
62
82
|
|
|
63
|
-
|
|
83
|
+
**Note**: The `API_BASE_URL` defaults to the production Mem-Brain API endpoint, so you typically don't need to set it unless you're using a custom API instance.
|
|
84
|
+
|
|
85
|
+
## Per-User JWT Token Configuration
|
|
64
86
|
|
|
65
|
-
Each user must configure their own
|
|
87
|
+
Each user must configure their own JWT access token in their MCP client for proper user isolation. The server extracts tokens from request headers. Get your JWT token by logging in or signing up to the Mem-Brain API.
|
|
66
88
|
|
|
67
89
|
### Cursor IDE (`~/.cursor/mcp.json`)
|
|
68
90
|
|
|
@@ -103,10 +125,20 @@ Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/
|
|
|
103
125
|
"mcpServers": {
|
|
104
126
|
"mem-brain": {
|
|
105
127
|
"command": "uvx",
|
|
106
|
-
"args": ["mem-brain-mcp"]
|
|
128
|
+
"args": ["mem-brain-mcp"]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Note**: After installing from PyPI, you can also use `mem-brain-mcp` directly. The API URL is set by default, but you can override it if needed:
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"mcpServers": {
|
|
138
|
+
"mem-brain": {
|
|
139
|
+
"command": "mem-brain-mcp",
|
|
107
140
|
"env": {
|
|
108
|
-
"API_BASE_URL": "http://your-
|
|
109
|
-
"JWT_SECRET_KEY": "your-secret"
|
|
141
|
+
"API_BASE_URL": "http://your-custom-api-url"
|
|
110
142
|
}
|
|
111
143
|
}
|
|
112
144
|
}
|
|
@@ -336,7 +336,7 @@ The MCP server requires the following environment variables (set in the task def
|
|
|
336
336
|
- `MCP_SERVER_PORT`: Server port (default: `8100`)
|
|
337
337
|
- `LOG_LEVEL`: Logging level (default: `INFO`)
|
|
338
338
|
|
|
339
|
-
**Note**: `
|
|
339
|
+
**Note**: `MEMBRAIN_API_KEY` is optional in the server configuration. Per-user JWT tokens are configured in MCP clients (Cursor, Claude Desktop, etc.) via request headers.
|
|
340
340
|
|
|
341
341
|
## Updating the Deployment
|
|
342
342
|
|
|
@@ -16,11 +16,16 @@ class Settings(BaseSettings):
|
|
|
16
16
|
)
|
|
17
17
|
|
|
18
18
|
# API Configuration
|
|
19
|
-
api_base_url: str = "http://
|
|
20
|
-
|
|
19
|
+
api_base_url: str = "http://membrain-api-alb-1094729422.ap-south-1.elb.amazonaws.com"
|
|
20
|
+
membrain_api_key: Optional[str] = None
|
|
21
21
|
# NOTE: default_user_id is deprecated and unused.
|
|
22
22
|
# Per-user API keys are extracted from request headers for proper isolation.
|
|
23
23
|
# Each MCP client should configure their own API key via headers.
|
|
24
|
+
|
|
25
|
+
@property
|
|
26
|
+
def api_key(self) -> Optional[str]:
|
|
27
|
+
"""Backward compatibility property for api_key."""
|
|
28
|
+
return self.membrain_api_key
|
|
24
29
|
|
|
25
30
|
# MCP Server Configuration
|
|
26
31
|
mcp_server_host: str = "0.0.0.0"
|