mem-brain-mcp 1.0.0__py3-none-any.whl

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,176 @@
1
+ Metadata-Version: 2.4
2
+ Name: mem-brain-mcp
3
+ Version: 1.0.0
4
+ Summary: MCP Server for Mem-Brain API - Exposes memory operations as MCP tools
5
+ Keywords: ai,claude,cursor,llm,mcp,memory,model-context-protocol
6
+ Classifier: Development Status :: 4 - Beta
7
+ Classifier: Intended Audience :: Developers
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
13
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
14
+ Requires-Python: <3.14,>=3.10
15
+ Requires-Dist: fastmcp<3.0.0,>=2.0.0
16
+ Requires-Dist: httpx>=0.25.0
17
+ Requires-Dist: pydantic-settings>=2.0.0
18
+ Requires-Dist: pydantic>=2.0.0
19
+ Requires-Dist: uvicorn[standard]>=0.27.0
20
+ Provides-Extra: dev
21
+ Requires-Dist: black>=23.0.0; extra == 'dev'
22
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
23
+ Requires-Dist: pytest>=7.4.0; extra == 'dev'
24
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
25
+ Description-Content-Type: text/markdown
26
+
27
+ # Mem-Brain MCP Server
28
+
29
+ MCP (Model Context Protocol) server that exposes Mem-Brain API functionality as standardized tools for AI agents. Built with [FastMCP](https://gofastmcp.com) for production-ready HTTP/SSE transport.
30
+
31
+ ## Features
32
+
33
+ - **Memory Management**: Create, read, update, and delete memories
34
+ - **Semantic Search**: Search memories using vector similarity
35
+ - **Graph Operations**: Find paths and neighborhoods in the memory graph
36
+ - **Statistics**: Get insights about your memory system
37
+ - **Link Management**: Link and unlink memories
38
+ - **HTTP/SSE Transport**: Run independently, accessible remotely
39
+ - **CLI Interface**: Packaged for easy global execution
40
+
41
+ ## Instant Execution (Recommended)
42
+
43
+ You can run the MCP server instantly without manual installation using `uv`:
44
+
45
+ ```bash
46
+ # Run using uvx (loads environment from .env or shell)
47
+ uvx mem-brain-mcp
48
+
49
+ # Run with custom API URL
50
+ export API_BASE_URL=http://your-api-alb-url.com
51
+ uvx mem-brain-mcp
52
+ ```
53
+
54
+ ## Installation
55
+
56
+ ### From Source
57
+
58
+ 1. Install using `uv` (recommended) or `pip`:
59
+
60
+ ```bash
61
+ cd mem-brain-mcp
62
+ uv pip install .
63
+ ```
64
+
65
+ 2. Run globally:
66
+
67
+ ```bash
68
+ mem-brain-mcp
69
+ ```
70
+
71
+ ## Configuration
72
+
73
+ The server reads configuration from environment variables or a `.env` file in the current working directory:
74
+
75
+ ```env
76
+ # API Configuration
77
+ API_BASE_URL=http://localhost:8000
78
+ # NOTE: API_KEY is optional here - per-user API keys are configured in MCP clients
79
+ API_KEY=your_api_key_here # Optional: fallback for single-user scenarios
80
+
81
+ # MCP Server Configuration
82
+ MCP_SERVER_HOST=0.0.0.0
83
+ MCP_SERVER_PORT=8100
84
+
85
+ # Logging
86
+ LOG_LEVEL=INFO
87
+ ```
88
+
89
+ ## Per-User API Key Configuration
90
+
91
+ Each user must configure their own API key in their MCP client for proper user isolation. The server extracts tokens from request headers.
92
+
93
+ ### Cursor IDE (`~/.cursor/mcp.json`)
94
+
95
+ ```json
96
+ {
97
+ "mcpServers": {
98
+ "mem-brain": {
99
+ "url": "http://localhost:8100/mcp",
100
+ "headers": {
101
+ "Authorization": "Bearer your-jwt-token"
102
+ }
103
+ }
104
+ }
105
+ }
106
+ ```
107
+
108
+ ### Claude Desktop
109
+
110
+ #### Option 1: Native Remote (Pro/Team plans)
111
+ Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json`):
112
+
113
+ ```json
114
+ {
115
+ "mcpServers": {
116
+ "mem-brain": {
117
+ "url": "http://your-deployed-url/mcp",
118
+ "headers": {
119
+ "Authorization": "Bearer your-jwt-token"
120
+ }
121
+ }
122
+ }
123
+ }
124
+ ```
125
+
126
+ #### Option 2: via CLI (Any plan)
127
+ ```json
128
+ {
129
+ "mcpServers": {
130
+ "mem-brain": {
131
+ "command": "uvx",
132
+ "args": ["mem-brain-mcp"],
133
+ "env": {
134
+ "API_BASE_URL": "http://your-deployed-url",
135
+ "JWT_SECRET_KEY": "your-secret"
136
+ }
137
+ }
138
+ }
139
+ }
140
+ ```
141
+
142
+ ## AWS ECS Deployment
143
+
144
+ The MCP server can be deployed to AWS ECS (Fargate) with an Application Load Balancer.
145
+
146
+ ### Quick Start
147
+
148
+ 1. **Set up security groups** (see [aws/security-groups.md](./aws/security-groups.md))
149
+ 2. **Deploy using the script:**
150
+
151
+ ```bash
152
+ cd mem-brain-mcp/aws
153
+ ./deploy.sh ap-south-1 membrain-mcp membrain-cluster membrain-mcp
154
+ ```
155
+
156
+ For detailed instructions, see [aws/DEPLOYMENT.md](./aws/DEPLOYMENT.md).
157
+
158
+ ## Development
159
+
160
+ ### Running Tests
161
+ ```bash
162
+ pytest
163
+ ```
164
+
165
+ ### Build and Publish
166
+ ```bash
167
+ # Build the wheel
168
+ python3 -m build
169
+
170
+ # Upload to PyPI
171
+ twine upload dist/*
172
+ ```
173
+
174
+ ## License
175
+
176
+ Same as Mem-Brain API project.
@@ -0,0 +1,9 @@
1
+ mem_brain_mcp/__init__.py,sha256=DifX5h1zBo_ResWlU7kT_HFCeptgPaJouZ03wxBUSqc,89
2
+ mem_brain_mcp/__main__.py,sha256=H_mwoKm1FBmu4KzAcQcq-TXZqeNvlrAekAxB1s4F4hA,712
3
+ mem_brain_mcp/client.py,sha256=7KFGcLoPDaOOLiuG2lygQK7xH5Kio-YifDjuSpDoDJ8,6993
4
+ mem_brain_mcp/config.py,sha256=mu2HQPKkEjV_2QnlQ2gq7u0niXIvDCwpOgo7dRJjEcI,1055
5
+ mem_brain_mcp/server.py,sha256=mlbl3-D3OFb4HHP54daqiP3nMWEdiTv3upEdUFnlhAA,39604
6
+ mem_brain_mcp-1.0.0.dist-info/METADATA,sha256=xeGMlWratQ-1jPrI3A8E3hc_AdrxI9VLOBPZStgWmWk,4327
7
+ mem_brain_mcp-1.0.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
8
+ mem_brain_mcp-1.0.0.dist-info/entry_points.txt,sha256=NH6QYQ-Sd8eJn5crpe_DL1PvGeUlL3y65968xPhmwG8,62
9
+ mem_brain_mcp-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ mem-brain-mcp = mem_brain_mcp.__main__:main