Slammin' Language Model Nest: sundry utils + MCP
Project description
slmn
What’s inside
slmn is a small collection of independent tools, each in its own notebook/module:
| module | what it does |
|---|---|
nbtools |
read, grep, and edit Jupyter notebook cells by id – no hand-rolled JSON surgery |
misc |
read a PDF’s text; check whether a local GPU is free |
remote |
launch and monitor background jobs on a remote host over ssh; fetch a URL; check a repo’s GitHub CI |
[publish](https://drscotthawley.github.io/slmn/publish.html#publish) |
automate the nbdev edit->ship loop: clean/export, a reviewed commit, push, wait for CI, and (on a feature branch) merge a PR to main |
dead_drop |
file-based async IPC – one side drops a message file, another picks it up (with a streaming variant) |
cli |
the slmn <tool> [args...] dispatcher that exposes all of the above from the shell |
mcp |
an optional server exposing the same tools to any MCP client (slmn-mcp) |
Every tool is a plain, type-hinted function. That single definition is what the CLI turns into command-line flags and what the MCP server turns into a tool schema – so the three ways to call a tool (below) never drift apart.
Installation
slmn isn’t on PyPI or conda yet, so install it from GitHub. The default install is
“lite” – just the tools and the slmn CLI:
pip install git+https://github.com/drscotthawley/slmn.git
The MCP server is optional; add the mcp extra if you want it (it pulls in fastmcp and
friends):
pip install "slmn[mcp] @ git+https://github.com/drscotthawley/slmn.git"
How to use
The same tools are reachable three ways.
Import them directly:
from slmn.nbtools import grep_nb
print(grep_nb('nbs/01_nbtools.ipynb', 'def read_nb'))
From the shell, via the slmn dispatcher (run slmn with no arguments for the tool list):
slmn grep_nb nbs/01_nbtools.ipynb 'def read_nb'
slmn gpu_free
Over MCP (with the mcp extra installed), registered with any MCP-speaking client:
claude mcp add slmn -- slmn-mcp
Documentation
Full documentation is hosted on the project’s GitHub
pages; the source for each page is the
correspondingly-named notebook under nbs/.
For developers
slmn is built with nbdev: the notebooks under nbs/ are the
source of truth, and the slmn/ package is generated from them. To hack on it, install in
editable mode:
git clone https://github.com/drscotthawley/slmn.git
cd slmn
pip install -e ".[mcp]"
Edit the notebooks, then regenerate the package, run the tests, and ship – all via slmn’s
own publish tool (nbdev-clean/export -> reviewed commit -> push -> wait for CI -> merge a
PR to main):
slmn publish "your commit message"
from slmn.misc import gpu_free
gpu_free()
2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slmn-0.0.1.tar.gz.
File metadata
- Download URL: slmn-0.0.1.tar.gz
- Upload date:
- Size: 38.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04d5ba0590b6b656c5541767eddf3311a6d7f5be4b2de1204ed9afc6aa31f620
|
|
| MD5 |
6a826492120fee37a90ce5d97d6d10f8
|
|
| BLAKE2b-256 |
6cc36e31400b10152de0658adf5d5b59e25b305d2942a58aeae422f88af0e6bc
|
File details
Details for the file slmn-0.0.1-py3-none-any.whl.
File metadata
- Download URL: slmn-0.0.1-py3-none-any.whl
- Upload date:
- Size: 41.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee027862e172756a5b67f48d2ddffac38decf64fde0e8d2772f8ddefc18691ef
|
|
| MD5 |
71819aa9edd09f17779397637cd3eb6a
|
|
| BLAKE2b-256 |
2509249c4935c216ee2af37b289a6dbebda3f5c9ca128bc0e7e14ba1832be9a2
|