pin-memory 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.
- pin_memory-0.1.0/.github/workflows/publish.yml +33 -0
- pin_memory-0.1.0/.gitignore +225 -0
- pin_memory-0.1.0/AGENTS.md +3 -0
- pin_memory-0.1.0/CHANGELOG.md +15 -0
- pin_memory-0.1.0/PKG-INFO +107 -0
- pin_memory-0.1.0/README.md +95 -0
- pin_memory-0.1.0/pyproject.toml +26 -0
- pin_memory-0.1.0/src/pin_memory/__init__.py +0 -0
- pin_memory-0.1.0/src/pin_memory/main.py +4 -0
- pin_memory-0.1.0/src/pin_memory/server.py +242 -0
- pin_memory-0.1.0/uv.lock +833 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "*.*.*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-n-publish:
|
|
10
|
+
name: Build and publish Python 🐍 distributions 📦 to PyPI
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
id-token: write # Required for trusted publishing
|
|
14
|
+
contents: read # Required to checkout the repository
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up uv
|
|
20
|
+
uses: astral-sh/setup-uv@v5
|
|
21
|
+
with:
|
|
22
|
+
enable-cache: true
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version-file: "pyproject.toml"
|
|
28
|
+
|
|
29
|
+
- name: Build package
|
|
30
|
+
run: uv build
|
|
31
|
+
|
|
32
|
+
- name: Publish package distributions to PyPI
|
|
33
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
.opencode
|
|
2
|
+
.gemini
|
|
3
|
+
.kiro
|
|
4
|
+
.pin
|
|
5
|
+
|
|
6
|
+
# Byte-compiled / optimized / DLL files
|
|
7
|
+
__pycache__/
|
|
8
|
+
*.py[codz]
|
|
9
|
+
*$py.class
|
|
10
|
+
|
|
11
|
+
# C extensions
|
|
12
|
+
*.so
|
|
13
|
+
|
|
14
|
+
# Distribution / packaging
|
|
15
|
+
.Python
|
|
16
|
+
build/
|
|
17
|
+
develop-eggs/
|
|
18
|
+
dist/
|
|
19
|
+
downloads/
|
|
20
|
+
eggs/
|
|
21
|
+
.eggs/
|
|
22
|
+
lib/
|
|
23
|
+
lib64/
|
|
24
|
+
parts/
|
|
25
|
+
sdist/
|
|
26
|
+
var/
|
|
27
|
+
wheels/
|
|
28
|
+
share/python-wheels/
|
|
29
|
+
*.egg-info/
|
|
30
|
+
.installed.cfg
|
|
31
|
+
*.egg
|
|
32
|
+
MANIFEST
|
|
33
|
+
|
|
34
|
+
# PyInstaller
|
|
35
|
+
# Usually these files are written by a python script from a template
|
|
36
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
37
|
+
*.manifest
|
|
38
|
+
*.spec
|
|
39
|
+
|
|
40
|
+
# Installer logs
|
|
41
|
+
pip-log.txt
|
|
42
|
+
pip-delete-this-directory.txt
|
|
43
|
+
|
|
44
|
+
# Unit test / coverage reports
|
|
45
|
+
htmlcov/
|
|
46
|
+
.tox/
|
|
47
|
+
.nox/
|
|
48
|
+
.coverage
|
|
49
|
+
.coverage.*
|
|
50
|
+
.cache
|
|
51
|
+
nosetests.xml
|
|
52
|
+
coverage.xml
|
|
53
|
+
*.cover
|
|
54
|
+
*.py.cover
|
|
55
|
+
.hypothesis/
|
|
56
|
+
.pytest_cache/
|
|
57
|
+
cover/
|
|
58
|
+
|
|
59
|
+
# Translations
|
|
60
|
+
*.mo
|
|
61
|
+
*.pot
|
|
62
|
+
|
|
63
|
+
# Django stuff:
|
|
64
|
+
*.log
|
|
65
|
+
local_settings.py
|
|
66
|
+
db.sqlite3
|
|
67
|
+
db.sqlite3-journal
|
|
68
|
+
|
|
69
|
+
# Flask stuff:
|
|
70
|
+
instance/
|
|
71
|
+
.webassets-cache
|
|
72
|
+
|
|
73
|
+
# Scrapy stuff:
|
|
74
|
+
.scrapy
|
|
75
|
+
|
|
76
|
+
# Sphinx documentation
|
|
77
|
+
docs/_build/
|
|
78
|
+
|
|
79
|
+
# PyBuilder
|
|
80
|
+
.pybuilder/
|
|
81
|
+
target/
|
|
82
|
+
|
|
83
|
+
# Jupyter Notebook
|
|
84
|
+
.ipynb_checkpoints
|
|
85
|
+
|
|
86
|
+
# IPython
|
|
87
|
+
profile_default/
|
|
88
|
+
ipython_config.py
|
|
89
|
+
|
|
90
|
+
# pyenv
|
|
91
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
92
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
93
|
+
# .python-version
|
|
94
|
+
|
|
95
|
+
# pipenv
|
|
96
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
97
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
98
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
99
|
+
# install all needed dependencies.
|
|
100
|
+
# Pipfile.lock
|
|
101
|
+
|
|
102
|
+
# UV
|
|
103
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
104
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
105
|
+
# commonly ignored for libraries.
|
|
106
|
+
# uv.lock
|
|
107
|
+
|
|
108
|
+
# poetry
|
|
109
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
110
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
111
|
+
# commonly ignored for libraries.
|
|
112
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
113
|
+
# poetry.lock
|
|
114
|
+
# poetry.toml
|
|
115
|
+
|
|
116
|
+
# pdm
|
|
117
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
118
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
119
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
120
|
+
# pdm.lock
|
|
121
|
+
# pdm.toml
|
|
122
|
+
.pdm-python
|
|
123
|
+
.pdm-build/
|
|
124
|
+
|
|
125
|
+
# pixi
|
|
126
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
127
|
+
# pixi.lock
|
|
128
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
129
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
130
|
+
.pixi
|
|
131
|
+
|
|
132
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
133
|
+
__pypackages__/
|
|
134
|
+
|
|
135
|
+
# Celery stuff
|
|
136
|
+
celerybeat-schedule
|
|
137
|
+
celerybeat.pid
|
|
138
|
+
|
|
139
|
+
# Redis
|
|
140
|
+
*.rdb
|
|
141
|
+
*.aof
|
|
142
|
+
*.pid
|
|
143
|
+
|
|
144
|
+
# RabbitMQ
|
|
145
|
+
mnesia/
|
|
146
|
+
rabbitmq/
|
|
147
|
+
rabbitmq-data/
|
|
148
|
+
|
|
149
|
+
# ActiveMQ
|
|
150
|
+
activemq-data/
|
|
151
|
+
|
|
152
|
+
# SageMath parsed files
|
|
153
|
+
*.sage.py
|
|
154
|
+
|
|
155
|
+
# Environments
|
|
156
|
+
.env
|
|
157
|
+
.envrc
|
|
158
|
+
.venv
|
|
159
|
+
env/
|
|
160
|
+
venv/
|
|
161
|
+
ENV/
|
|
162
|
+
env.bak/
|
|
163
|
+
venv.bak/
|
|
164
|
+
|
|
165
|
+
# Spyder project settings
|
|
166
|
+
.spyderproject
|
|
167
|
+
.spyproject
|
|
168
|
+
|
|
169
|
+
# Rope project settings
|
|
170
|
+
.ropeproject
|
|
171
|
+
|
|
172
|
+
# mkdocs documentation
|
|
173
|
+
/site
|
|
174
|
+
|
|
175
|
+
# mypy
|
|
176
|
+
.mypy_cache/
|
|
177
|
+
.dmypy.json
|
|
178
|
+
dmypy.json
|
|
179
|
+
|
|
180
|
+
# Pyre type checker
|
|
181
|
+
.pyre/
|
|
182
|
+
|
|
183
|
+
# pytype static type analyzer
|
|
184
|
+
.pytype/
|
|
185
|
+
|
|
186
|
+
# Cython debug symbols
|
|
187
|
+
cython_debug/
|
|
188
|
+
|
|
189
|
+
# PyCharm
|
|
190
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
191
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
192
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
193
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
194
|
+
# .idea/
|
|
195
|
+
|
|
196
|
+
# Abstra
|
|
197
|
+
# Abstra is an AI-powered process automation framework.
|
|
198
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
199
|
+
# Learn more at https://abstra.io/docs
|
|
200
|
+
.abstra/
|
|
201
|
+
|
|
202
|
+
# Visual Studio Code
|
|
203
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
204
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
205
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
206
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
207
|
+
# .vscode/
|
|
208
|
+
# Temporary file for partial code execution
|
|
209
|
+
tempCodeRunnerFile.py
|
|
210
|
+
|
|
211
|
+
# Ruff stuff:
|
|
212
|
+
.ruff_cache/
|
|
213
|
+
|
|
214
|
+
# PyPI configuration file
|
|
215
|
+
.pypirc
|
|
216
|
+
|
|
217
|
+
# Marimo
|
|
218
|
+
marimo/_static/
|
|
219
|
+
marimo/_lsp/
|
|
220
|
+
__marimo__/
|
|
221
|
+
|
|
222
|
+
# Streamlit
|
|
223
|
+
.streamlit/secrets.toml
|
|
224
|
+
.aider*
|
|
225
|
+
"\n# Checkpoint file\n.checkpoint.json"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-05-02
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial release of Pin Memory MCP server.
|
|
12
|
+
- Support for global, workspace, and project scopes.
|
|
13
|
+
- CLI for managing factoids and installing agent instructions.
|
|
14
|
+
- GitHub Actions workflow for PyPI publishing.
|
|
15
|
+
- Standard project metadata and documentation.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pin-memory
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A Memory MCP server for pinning and recalling factoids.
|
|
5
|
+
Project-URL: Homepage, https://github.com/scartill/pin-memory
|
|
6
|
+
Project-URL: Changelog, https://github.com/scartill/pin-memory/blob/main/CHANGELOG.md
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Requires-Dist: click
|
|
9
|
+
Requires-Dist: mcp[cli]
|
|
10
|
+
Requires-Dist: rich
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
# Pin Memory
|
|
14
|
+
|
|
15
|
+
A Model Context Protocol (MCP) server for managing factoids across different scopes (global, workspace, and project).
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
- **Pin**: Store factoids in global, workspace-specific, or project-local storage.
|
|
20
|
+
- **Recall**: Retrieve factoids based on current context.
|
|
21
|
+
- **MCP Integration**: Exposes tools for LLMs to autonomously remember and recall information.
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
Using `uv` (recommended):
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Install as a global tool
|
|
29
|
+
uv tool install .
|
|
30
|
+
|
|
31
|
+
# Or run directly
|
|
32
|
+
uv run pin-memory mcp
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
### CLI Commands
|
|
38
|
+
|
|
39
|
+
Pin Memory provides a CLI for managing factoids:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# List all factoids
|
|
43
|
+
pin-memory show
|
|
44
|
+
|
|
45
|
+
# Install agent instructions to AGENTS.md
|
|
46
|
+
pin-memory install --workspace my-workspace
|
|
47
|
+
|
|
48
|
+
# Launch the MCP server
|
|
49
|
+
pin-memory mcp
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Scopes
|
|
53
|
+
|
|
54
|
+
- **Global**: Stored in `~/.scartill/pin`.
|
|
55
|
+
- **Workspace**: Stored in `~/.scartill/pin/workspaces/<workspace_name>`.
|
|
56
|
+
- **Project**: Stored in `.pin` in the current working directory.
|
|
57
|
+
|
|
58
|
+
## MCP Configuration
|
|
59
|
+
|
|
60
|
+
To use this with an MCP client (e.g. Claude Desktop, Gemini CLI), add it to your configuration:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"mcpServers": {
|
|
65
|
+
"pin-memory": {
|
|
66
|
+
"command": "uv",
|
|
67
|
+
"args": [
|
|
68
|
+
"--directory",
|
|
69
|
+
"C:/path/to/pin-memory",
|
|
70
|
+
"run",
|
|
71
|
+
"pin-memory",
|
|
72
|
+
"mcp"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## MCP Tools
|
|
80
|
+
|
|
81
|
+
### `pin`
|
|
82
|
+
|
|
83
|
+
Stores a factoid in memory.
|
|
84
|
+
|
|
85
|
+
- `factoid_name`: Name of the factoid.
|
|
86
|
+
- `factoid`: The content of the factoid.
|
|
87
|
+
- `location`: "global", "project", or "workspace/<name>".
|
|
88
|
+
|
|
89
|
+
### `recall`
|
|
90
|
+
|
|
91
|
+
Recalls all pinned factoids from global, requested workspace, and local project scopes.
|
|
92
|
+
|
|
93
|
+
- `workspace`: Optional name of the workspace.
|
|
94
|
+
|
|
95
|
+
## Development
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Clone the repository
|
|
99
|
+
git clone https://github.com/scartill/pin-memory.git
|
|
100
|
+
cd pin-memory
|
|
101
|
+
|
|
102
|
+
# Sync dependencies
|
|
103
|
+
uv sync
|
|
104
|
+
|
|
105
|
+
# Run tests (if applicable)
|
|
106
|
+
uv run pytest
|
|
107
|
+
```
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Pin Memory
|
|
2
|
+
|
|
3
|
+
A Model Context Protocol (MCP) server for managing factoids across different scopes (global, workspace, and project).
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Pin**: Store factoids in global, workspace-specific, or project-local storage.
|
|
8
|
+
- **Recall**: Retrieve factoids based on current context.
|
|
9
|
+
- **MCP Integration**: Exposes tools for LLMs to autonomously remember and recall information.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
Using `uv` (recommended):
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Install as a global tool
|
|
17
|
+
uv tool install .
|
|
18
|
+
|
|
19
|
+
# Or run directly
|
|
20
|
+
uv run pin-memory mcp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
### CLI Commands
|
|
26
|
+
|
|
27
|
+
Pin Memory provides a CLI for managing factoids:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# List all factoids
|
|
31
|
+
pin-memory show
|
|
32
|
+
|
|
33
|
+
# Install agent instructions to AGENTS.md
|
|
34
|
+
pin-memory install --workspace my-workspace
|
|
35
|
+
|
|
36
|
+
# Launch the MCP server
|
|
37
|
+
pin-memory mcp
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Scopes
|
|
41
|
+
|
|
42
|
+
- **Global**: Stored in `~/.scartill/pin`.
|
|
43
|
+
- **Workspace**: Stored in `~/.scartill/pin/workspaces/<workspace_name>`.
|
|
44
|
+
- **Project**: Stored in `.pin` in the current working directory.
|
|
45
|
+
|
|
46
|
+
## MCP Configuration
|
|
47
|
+
|
|
48
|
+
To use this with an MCP client (e.g. Claude Desktop, Gemini CLI), add it to your configuration:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"mcpServers": {
|
|
53
|
+
"pin-memory": {
|
|
54
|
+
"command": "uv",
|
|
55
|
+
"args": [
|
|
56
|
+
"--directory",
|
|
57
|
+
"C:/path/to/pin-memory",
|
|
58
|
+
"run",
|
|
59
|
+
"pin-memory",
|
|
60
|
+
"mcp"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## MCP Tools
|
|
68
|
+
|
|
69
|
+
### `pin`
|
|
70
|
+
|
|
71
|
+
Stores a factoid in memory.
|
|
72
|
+
|
|
73
|
+
- `factoid_name`: Name of the factoid.
|
|
74
|
+
- `factoid`: The content of the factoid.
|
|
75
|
+
- `location`: "global", "project", or "workspace/<name>".
|
|
76
|
+
|
|
77
|
+
### `recall`
|
|
78
|
+
|
|
79
|
+
Recalls all pinned factoids from global, requested workspace, and local project scopes.
|
|
80
|
+
|
|
81
|
+
- `workspace`: Optional name of the workspace.
|
|
82
|
+
|
|
83
|
+
## Development
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Clone the repository
|
|
87
|
+
git clone https://github.com/scartill/pin-memory.git
|
|
88
|
+
cd pin-memory
|
|
89
|
+
|
|
90
|
+
# Sync dependencies
|
|
91
|
+
uv sync
|
|
92
|
+
|
|
93
|
+
# Run tests (if applicable)
|
|
94
|
+
uv run pytest
|
|
95
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "pin-memory"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "A Memory MCP server for pinning and recalling factoids."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"mcp[cli]",
|
|
9
|
+
"click",
|
|
10
|
+
"rich",
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
[project.urls]
|
|
14
|
+
Homepage = "https://github.com/scartill/pin-memory"
|
|
15
|
+
Changelog = "https://github.com/scartill/pin-memory/blob/main/CHANGELOG.md"
|
|
16
|
+
|
|
17
|
+
[project.scripts]
|
|
18
|
+
pin-memory = "pin_memory.main:main"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
[tool.hatch.build.targets.wheel]
|
|
22
|
+
packages = ["src/pin_memory"]
|
|
23
|
+
|
|
24
|
+
[build-system]
|
|
25
|
+
requires = ["hatchling"]
|
|
26
|
+
build-backend = "hatchling.build"
|
|
File without changes
|