Skip to content

fix: fastmcp deprecation warning - #150

Merged
phernandez merged 2 commits into
mainfrom
fix-fastmcp-deprecation-warning
Jun 20, 2025
Merged

phernandez merged 2 commits into
mainfrom
fix-fastmcp-deprecation-warning

Conversation

@groksrc

@groksrc groksrc commented Jun 19, 2025

Copy link
Copy Markdown
Member

Summary

  • Fixes deprecation warning that appears when running bm --version or basic-memory --version
  • Moves log_level parameter from FastMCP constructor to the run() method as recommended by fastmcp

Changes

  • Remove log_level="DEBUG" from FastMCP constructor in server.py
  • Add log_level="DEBUG" to both mcp_server.run() calls in mcp.py

Test

After this change, running bm --version no longer shows the deprecation warning:

Providing `log_level` when creating a server is deprecated. Provide it when calling `run` or as a global setting instead.

Context

This warning was discovered after installing basic-memory v0.13.7 via Homebrew.

@groksrc groksrc changed the title Fix fastmcp deprecation warning fix: fastmcp deprecation warning Jun 19, 2025
- Remove log_level from FastMCP constructor in server.py
- Add log_level='DEBUG' to mcp_server.run() calls in mcp.py
- Fixes deprecation warning that appeared when running 'bm --version'
- Follows fastmcp recommendation to provide log_level when calling run()

Signed-off-by: Drew Cain <groksrc@gmail.com>
@groksrc
groksrc force-pushed the fix-fastmcp-deprecation-warning branch from fd44d65 to 3dc8a8f Compare June 19, 2025 19:30
Comment thread src/basic_memory/cli/commands/mcp.py Outdated
Comment thread src/basic_memory/cli/commands/mcp.py Outdated
Signed-off-by: Paul Hernandez <60959+phernandez@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants