You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI write-note (and other tool subcommands) crash with 'function' object has no attribute 'fn' — no resolvable fastmcp version satisfies the 0.16.2 CLI bridge #944
What happens
A fresh pip install basic-memory resolves fastmcp 3.4.2. Any basic-memory tool ... subcommand then fails:
$ echo "hello" | basic-memory tool write-note --title t --folder f
Error during write_note: 'function' object has no attribute 'fn'
The CLI bridge (basic_memory/cli/commands/tool.py) calls mcp_write_note.fn(...) — a fastmcp 2.x API. Under fastmcp 3.x the tool objects have no .fn.
Downgrading does not help: fastmcp==2.14.7 (newest 2.x) breaks a different import (ImportError: cannot import name 'PrivateKeyJWTClientAuthenticator' from 'fastmcp.server.auth.auth'). There is no fastmcp version that satisfies the 0.16.2 CLI, yet pyproject declares an open-ended fastmcp>=2.10.2.
Impact
The MCP-server path is unaffected (the tool functions work when called directly), so this is specifically the CLI bridge — but every documented basic-memory tool ... command is broken on a clean install.
Suggested fix
Pin a compatible fastmcp range in pyproject.toml, and/or update the CLI bridge to call the tool callables the way fastmcp 3.x exposes them (the underlying async functions are importable from basic_memory.mcp.tools).
Packaging note
fastmcp 3.4.2 ships its module via the fastmcp-slim package; a surgical uninstall/reinstall of fastmcp alone can leave an empty namespace package (fastmcp.__file__ is None). Worth a note in install docs.
— Reported by ArdurAI, from independent benchmarking of open-source agent-memory tools.
Thanks for the precise diagnosis — the mechanics are exactly right for 0.16.2. That release is from the fastmcp 2.x era: its open-ended fastmcp>=2.10.2 constraint predates fastmcp 3, so it installs alongside a 3.x it can't use, and its CLI bridge calls the 2.x-only .fn(...) API. This is already fixed in newer releases: 0.17.0 pinned fastmcp exactly, 0.19.0 migrated the CLI bridge to fastmcp 3, and the current release (0.21.6) pins fastmcp==3.3.1 with no .fn calls anywhere. The published 0.16.2 metadata on PyPI can't be amended retroactively.
The fact that a fresh install resolved to 0.16.2 is the tell: pip backtracks to whatever old version's looser constraints fit the packages already in the environment — your fastmcp-slim note suggests a previously-mutated env, which is the classic trigger. In a clean venv, pip install basic-memory (or pip install -U basic-memory) gets you 0.21.6 with a correctly pinned fastmcp, and the tool subcommands work on Python 3.13.
Closing as fixed-in-current — please reopen if you can reproduce the crash on 0.21.6 in a clean environment.
Activity
groksrc commentedon Jun 10, 2026
Thanks for the precise diagnosis — the mechanics are exactly right for 0.16.2. That release is from the fastmcp 2.x era: its open-ended
fastmcp>=2.10.2constraint predates fastmcp 3, so it installs alongside a 3.x it can't use, and its CLI bridge calls the 2.x-only.fn(...)API. This is already fixed in newer releases: 0.17.0 pinned fastmcp exactly, 0.19.0 migrated the CLI bridge to fastmcp 3, and the current release (0.21.6) pinsfastmcp==3.3.1with no.fncalls anywhere. The published 0.16.2 metadata on PyPI can't be amended retroactively.The fact that a fresh install resolved to 0.16.2 is the tell: pip backtracks to whatever old version's looser constraints fit the packages already in the environment — your fastmcp-slim note suggests a previously-mutated env, which is the classic trigger. In a clean venv,
pip install basic-memory(orpip install -U basic-memory) gets you 0.21.6 with a correctly pinned fastmcp, and thetoolsubcommands work on Python 3.13.Closing as fixed-in-current — please reopen if you can reproduce the crash on 0.21.6 in a clean environment.