memory-map-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,41 @@
1
+ # ============================================================
2
+ # memory_map — Environment Configuration
3
+ # Copy this file to .env and fill in your values.
4
+ # ============================================================
5
+
6
+ # ----------------------------------------------------------
7
+ # MongoDB Atlas (required)
8
+ # Create a free cluster at https://cloud.mongodb.com
9
+ # ----------------------------------------------------------
10
+ MEMORY_MAP_MONGO_URI=mongodb+srv://<user>:<password>@<cluster>.mongodb.net/
11
+
12
+ # ----------------------------------------------------------
13
+ # Vector search provider (optional)
14
+ # Choose one: "atlas" or "openai"
15
+ # Leave unset to use keyword tag matching only (no embeddings)
16
+ # ----------------------------------------------------------
17
+
18
+ # Option A — Atlas autoEmbed (Voyage-4, no API key needed)
19
+ # Create index: history_autoembed_index (type: autoEmbed, path: dialogue)
20
+ MEMORY_MAP_EMBED_PROVIDER=atlas
21
+
22
+ # Option B — OpenAI embeddings (text-embedding-3-small)
23
+ # Create index: history_vector_index (type: vector, path: embedding, dims: 1536)
24
+ MEMORY_MAP_EMBED_PROVIDER=openai
25
+ OPENAI_API_KEY=sk-...
26
+
27
+ # ----------------------------------------------------------
28
+ # Optional settings
29
+ # ----------------------------------------------------------
30
+
31
+ # GitHub token for private repos and higher API rate limits
32
+ # GITHUB_TOKEN=ghp_...
33
+
34
+ # Max size per memory entry in KB (default: 10)
35
+ # MCP_MAX_ENTRY_KB=10
36
+
37
+ # Timeout in seconds for git commands (default: 10)
38
+ # MCP_GIT_TIMEOUT=10
39
+
40
+ # Restrict all path arguments to a root directory
41
+ # MCP_WORKSPACE_ROOT=/path/to/workspace
@@ -0,0 +1,60 @@
1
+ name: Retrieval Benchmark
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ k:
7
+ description: Recall/Precision/nDCG cutoff
8
+ default: "5"
9
+ required: false
10
+ index_wait:
11
+ description: Seconds to wait for Atlas vector index sync (set >0 only with Atlas URI)
12
+ default: "0"
13
+ required: false
14
+
15
+ jobs:
16
+ benchmark:
17
+ name: Retrieval benchmark
18
+ runs-on: ubuntu-latest
19
+
20
+ services:
21
+ mongodb:
22
+ image: mongo:7
23
+ ports:
24
+ - 27017:27017
25
+ options: >-
26
+ --health-cmd "mongosh --eval 'db.runCommand({ ping: 1 })'"
27
+ --health-interval 10s
28
+ --health-timeout 5s
29
+ --health-retries 5
30
+
31
+ env:
32
+ MEMORY_MAP_MONGO_URI: ${{ secrets.MEMORY_MAP_MONGO_URI || 'mongodb://localhost:27017' }}
33
+ MEMORY_MAP_EMBED_PROVIDER: ${{ secrets.MEMORY_MAP_EMBED_PROVIDER || '' }}
34
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY || '' }}
35
+
36
+ steps:
37
+ - uses: actions/checkout@v4
38
+
39
+ - name: Set up Python
40
+ uses: actions/setup-python@v5
41
+ with:
42
+ python-version: "3.11"
43
+ cache: pip
44
+
45
+ - name: Install dependencies
46
+ run: pip install -r requirements.txt
47
+
48
+ - name: Run benchmark
49
+ run: |
50
+ python benchmarks/bench_retrieval.py \
51
+ --k ${{ inputs.k || 5 }} \
52
+ --index-wait ${{ inputs.index_wait || 0 }} \
53
+ --verbose
54
+
55
+ - name: Upload results
56
+ uses: actions/upload-artifact@v4
57
+ with:
58
+ name: benchmark-results
59
+ path: benchmarks/results/
60
+ retention-days: 90
@@ -0,0 +1,46 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: Tests (Python ${{ matrix.python-version }})
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ python-version: ["3.11", "3.12"]
18
+
19
+ services:
20
+ mongodb:
21
+ image: mongo:7
22
+ ports:
23
+ - 27017:27017
24
+ options: >-
25
+ --health-cmd "mongosh --eval 'db.runCommand({ ping: 1 })'"
26
+ --health-interval 10s
27
+ --health-timeout 5s
28
+ --health-retries 5
29
+
30
+ env:
31
+ MEMORY_MAP_MONGO_URI: mongodb://localhost:27017
32
+
33
+ steps:
34
+ - uses: actions/checkout@v4
35
+
36
+ - name: Set up Python ${{ matrix.python-version }}
37
+ uses: actions/setup-python@v5
38
+ with:
39
+ python-version: ${{ matrix.python-version }}
40
+ cache: pip
41
+
42
+ - name: Install dependencies
43
+ run: pip install -e ".[dev]"
44
+
45
+ - name: Run tests
46
+ run: pytest tests/ -v --tb=short
@@ -0,0 +1,45 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build:
9
+ name: Build distribution
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - uses: actions/setup-python@v5
15
+ with:
16
+ python-version: "3.11"
17
+
18
+ - name: Build wheel and sdist
19
+ run: |
20
+ pip install build
21
+ python -m build
22
+
23
+ - uses: actions/upload-artifact@v4
24
+ with:
25
+ name: dist
26
+ path: dist/
27
+
28
+ publish:
29
+ name: Publish to PyPI
30
+ needs: build
31
+ runs-on: ubuntu-latest
32
+ environment:
33
+ name: pypi
34
+ url: https://pypi.org/p/memory-map-mcp
35
+ permissions:
36
+ id-token: write # required for OIDC trusted publishing
37
+
38
+ steps:
39
+ - uses: actions/download-artifact@v4
40
+ with:
41
+ name: dist
42
+ path: dist/
43
+
44
+ - name: Publish to PyPI
45
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,29 @@
1
+ venv/
2
+ .venv/
3
+ __pycache__/
4
+ .pytest_cache/
5
+ *.pyc
6
+
7
+ # Build artifacts
8
+ dist/
9
+ build/
10
+ *.egg-info/
11
+
12
+ .mcp_memory.json
13
+ .mcp_memory.json.lock
14
+ *.bak.*
15
+ .mcp_history.json
16
+ .env
17
+ .vscode/
18
+ .claude/
19
+ CLAUDE.md
20
+
21
+ # Benchmark result artifacts — force-add with `git add -f` to commit a baseline
22
+ benchmarks/results/*.json
23
+
24
+ # Manual dev scripts (hardcoded local paths, superseded by pytest suite)
25
+ tests/test_client.py
26
+ tests/quick_git_test.py
27
+ tests/test_setup.py
28
+ test_question.py
29
+ test_setup.py
@@ -0,0 +1,25 @@
1
+ # Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We are committed to making participation in this project a respectful and harassment-free experience for everyone, regardless of background or identity.
6
+
7
+ ## Our Standards
8
+
9
+ **Expected behaviour:**
10
+ - Use welcoming and inclusive language
11
+ - Be respectful of differing viewpoints and experience
12
+ - Accept constructive feedback gracefully
13
+ - Focus on what is best for the community
14
+
15
+ **Unacceptable behaviour:**
16
+ - Harassment, insults, or derogatory comments
17
+ - Personal or political attacks
18
+ - Publishing others' private information without consent
19
+ - Any conduct that would be inappropriate in a professional setting
20
+
21
+ ## Enforcement
22
+
23
+ Instances of unacceptable behaviour may be reported by opening a GitHub issue or contacting the maintainer directly. All reports will be reviewed and investigated promptly and fairly.
24
+
25
+ This project follows the [Contributor Covenant](https://www.contributor-covenant.org/) principles (v2.1).
@@ -0,0 +1,40 @@
1
+ # Contributing to Memory Map
2
+
3
+ Thanks for your interest in contributing!
4
+
5
+ ## Getting started
6
+
7
+ 1. Fork the repo and clone your fork
8
+ 2. Create a virtual environment and install dependencies:
9
+
10
+ ```bash
11
+ python -m venv venv
12
+ venv\Scripts\activate # Windows
13
+ source venv/bin/activate # Mac/Linux
14
+ pip install -r requirements.txt
15
+ ```
16
+
17
+ 3. Create a branch for your change:
18
+
19
+ ```bash
20
+ git checkout -b your-feature-name
21
+ ```
22
+
23
+ ## Making changes
24
+
25
+ - All server logic lives in `server.py`
26
+ - Tests are in the `tests/` directory — run them with `pytest`
27
+ - Keep changes focused; one fix or feature per PR
28
+
29
+ ## Submitting a pull request
30
+
31
+ 1. Push your branch and open a PR against `main`
32
+ 2. Describe what the change does and why
33
+ 3. If it fixes a bug, include steps to reproduce the original issue
34
+
35
+ ## Reporting issues
36
+
37
+ Open a GitHub issue with:
38
+ - What you expected to happen
39
+ - What actually happened
40
+ - Your OS, Python version, and Claude Code version
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sidhartha Mohanty
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.