Skip to main content

Mneme

CI PyPI Python License: Apache-2.0 GHCR

A self-hosted catalog of callables and persistent memory for AI agents.

Mneme is a local-first indexer and search service. An LLM agent uses it to find the right HTTP API operation, library symbol, or saved note — then pull a minimal slice instead of loading entire docs into context.

Published on PyPI as mneme-server; the CLI is mneme.

Quickstart

pip install mneme-server
mneme demo                            # index a bundled spec, run a sample search
mneme mcp-config --client cursor      # paste-ready MCP config
mneme doctor                          # environment diagnostics

Index popular public APIs in one shot:

mneme crawl-seeds examples/seeds.popular.txt

The default index lives in a per-user directory (XDG-aware), so later commands work without --db.

What gets indexed

Mneme searches callables — individual things an agent can invoke or recall:

Kind Example
HTTP operation POST /v1/refunds
Python symbol httpx.Client.get
JS/TS symbol axios.create
Agent note a saved scratch-pad entry

All kinds share one SQLite + FTS5 index and one MCP search tool (search_callables).

flowchart LR
  openapi[OpenAPI specs] --> normalize
  pylib[Python packages] --> symbols
  jslib[.d.ts files] --> symbols
  normalize --> sqlite[(SQLite + FTS5)]
  symbols --> sqlite
  notes[Notebook + workspace] --> notesdb[(notes.db)]
  sqlite --> mcp[MCP server]
  sqlite --> httpapi[HTTP API]
  notesdb --> mcp
  mcp --> agent[Agent]
  httpapi --> agent

Install

pip install mneme-server              # base CLI + HTTP API
pip install 'mneme-server[mcp]'       # + local MCP server
pip install 'mneme-server[libraries]' # + Python + JS/TS library indexing

From source:

git clone https://github.com/Joshwani/mneme.git && cd mneme
python -m venv .venv && source .venv/bin/activate
python -m pip install -e '.[dev,mcp,libraries]'

CLI

# index
mneme add-file examples/specs/todo.yaml
mneme add-spec https://example.com/openapi.yaml
mneme discover example.com --ingest
mneme crawl-seeds examples/seeds.popular.txt
mneme add-pylib httpx
mneme add-jslib --package axios --file ./axios.d.ts

# search
mneme search "create refund" --method POST
mneme search-callables "create request" --kind http_operation

# memory
mneme notes-add --title "T" --body "B" --tag x
mneme notes-search "query"
mneme workspace-enable --scope notes --max-mb 10
mneme workspace-write --scope notes --path a.md --content "..."

# serve
mneme serve --host 127.0.0.1 --port 8080
mneme mcp-server
mneme stats
mneme doctor

Use --db <path> to override the default index path.

MCP server

Mneme runs locally over stdio (or streamable HTTP). Credentials and notes stay on your machine.

pip install 'mneme-server[mcp]'
mneme mcp-server
mneme mcp-config --client cursor      # Cursor
mneme mcp-config --client claude      # Claude Desktop
mneme mcp-config --client continue    # Continue.dev

Main tools: search_callables, get_operation, get_library_symbol, prepare_http_call, execute_http_call, notes_*, workspace_*, mneme_stats. HTTP execution is dry-run by default; real calls require explicit confirmation.

Library indexing

Python — static analysis via griffe (no code execution):

pip install 'mneme-server[pylib]'
mneme add-pylib httpx
mneme add-pylib mymod --source-dir ./src

JavaScript/TypeScript — parse a local .d.ts via tree-sitter (no Node required):

pip install 'mneme-server[jslib]'
mneme add-jslib --package axios --file ./node_modules/axios/index.d.ts

Memory

Two opt-in primitives in a separate notes.db:

  • Notebook — FTS5-backed scratch pad (notes-add, notes-search, …).
  • Scoped workspace — small file area for snippets; off until you workspace-enable a scope.

Auth profiles

Store credentials in env vars, reference them by profile name. Agents see redacted previews, not secrets.

{
  "profiles": {
    "github": {
      "provider_domain": "api.github.com",
      "base_url": "https://api.github.com",
      "allow_methods": ["GET", "POST"],
      "auth": { "type": "bearer", "token_env": "GITHUB_TOKEN" }
    }
  }
}

Default path: ~/.config/mneme/auth.json. See examples/auth.json for a fuller example.

mneme auth-profiles
mneme prepare-call op_... --auth-profile github --json-body '{}'
mneme execute-call op_... --auth-profile github --send --confirm

HTTP API

mneme serve --host 127.0.0.1 --port 8080
curl -s -X POST http://127.0.0.1:8080/search \
  -H 'content-type: application/json' \
  -d '{"query":"create a todo","limit":5}'

Endpoints: GET /health, GET /stats, POST /search, GET /operations/{id}, GET /operations/{id}/spec-slice, POST /operations/{id}/prepare-call, POST /operations/{id}/execute-call.

Docker

docker pull ghcr.io/joshwani/mneme:latest
cd deploy && docker compose up --build -d

See deploy/ for systemd, cron, and compose examples.

Default paths

What Env override Default (Linux/macOS)
API/library index MNEME_DB ~/.local/share/mneme/mneme.db
Notes index MNEME_NOTES_DB ~/.local/share/mneme/notes.db
Workspace root MNEME_WORKSPACE_ROOT ~/.local/share/mneme/workspace/
Auth config — ~/.config/mneme/auth.json

Troubleshooting

Run mneme doctor first — it prints resolved paths, index size, installed extras, and a network check.

Problem Fix
Empty search results Run mneme demo or mneme crawl-seeds examples/seeds.popular.txt
MCP ImportError pip install 'mneme-server[mcp]'
401/403 on execute Check env vars referenced in your auth profile
Host not allowed Adjust profile allow_methods / hosts, or MNEME_HTTP_ALLOW_HOSTS

Development

python -m pip install -e '.[dev,mcp,libraries]'
ruff check && ruff format --check && pytest

See CONTRIBUTING.md and CHANGELOG.md.

License

Apache License 2.0.

Metadata

Release files for mneme-server 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mneme-server 0.4.0
File Size Uploaded Provenance Actions
mneme_server-0.4.0.tar.gz 68.1 kB With provenance Details for mneme_server-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mneme-server 0.4.0
File Interpreter ABI Platform Actions
mneme_server-0.4.0-py3-none-any.whl Python 3 none any Details for mneme_server-0.4.0-py3-none-any.whl

Total release size: 138.5 kB

Release files / mneme_server-0.4.0.tar.gz

Download URL mneme_server-0.4.0.tar.gz
Size 68.1 kB
Tags Source
SHA-256 checksum
How to use checksums
21a4ef0cef6d261d004641d86ad31ec426a62bde2c730b4d4d6f042d9c420c87
BLAKE2b-256 checksum
How to use checksums
82da6a86c2ed4f360287b3a3c4b0724cd307b0e7bf99cb69e876182982ae2dc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 28, 2026.

Transparency log

Release files / mneme_server-0.4.0-py3-none-any.whl

Download URL mneme_server-0.4.0-py3-none-any.whl
Size 70.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0e099154ba2220da481f6f1b9dbf7c78d680aa942997b7422eef21dfee7cefb
BLAKE2b-256 checksum
How to use checksums
272c267c57365ae97036092d09b2f0edea18da68c0b0f6a935358ae456861cbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 28, 2026.

Transparency log

Security for mneme-server 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mneme_server-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page