Skip to content

Fix FastMCP tool registration - #49

Draft
lukacf wants to merge 1 commit into
mainfrom
agent/fix-fastmcp-tool-listing
Draft

Fix FastMCP tool registration#49
lukacf wants to merge 1 commit into
mainfrom
agent/fix-fastmcp-tool-listing

Conversation

@lukacf

@lukacf lukacf commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • enumerate registered FastMCP tools through the context-free middleware entrypoint in the daemon
  • apply the same compatibility fix to proxy tool registration
  • preserve the existing registration behavior and callable mapping

Root cause and impact

FastMCP 2.13.3 requires request context when _list_tools() is called directly. Goldfish invokes tool discovery while bootstrapping the daemon and MCP proxy, outside a request context, so registration failed and clients could reconnect with no Goldfish tools exposed.

Using _list_tools_middleware() is the context-free enumeration path and restores all registered tools for both startup paths.

Validation

  • uv run pytest tests/integration/test_svs_registration.py tests/integration/test_daemon_proxy.py tests/unit/test_mcp_tool_registration.py - 39 passed
  • make lint - Ruff, Ruff format, and mypy passed
  • commit hooks - passed, including fast unit and contract tests
  • normal pre-push hooks - passed, including full unit and 1,223 integration tests

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.

1 participant