Skip to content

fix: unbreak fresh installs (pin mcp<2) and setup wizard sign-in timeout - #2

Open
fotoflo wants to merge 3 commits into
IgnazioDS:mainfrom
fotoflo:fix/fresh-installs
Open

fix: unbreak fresh installs (pin mcp<2) and setup wizard sign-in timeout#2
fotoflo wants to merge 3 commits into
IgnazioDS:mainfrom
fotoflo:fix/fresh-installs

Conversation

@fotoflo

@fotoflo fotoflo commented Aug 8, 2026

Copy link
Copy Markdown

Summary

Two one-line fixes for problems that currently break a fresh install end-to-end:

1. Pin mcp<2 (pyproject.toml)

mcp 2.0.0 removed the low-level Server.list_tools() / call_tool() decorator API that src/server.py registers its tools with. Because the dependency is declared as mcp>=1.10.0 with no upper bound, every fresh install now picks up 2.0.0 and crashes on startup:

AttributeError: 'Server' object has no attribute 'list_tools'

Pinning to <2 restores working installs (verified with mcp 1.29.0) until the server is ported to the new SDK surface.

2. Don't wait for networkidle on the sign-in page (setup_auth.py)

substack.com/sign-in keeps analytics/telemetry connections open, so Playwright's networkidle state never arrives. page.goto(..., wait_until="networkidle") raised a 30s TimeoutError, which closed the browser before the user could log in — the wizard failed with "❌ Authentication failed" every time:

Authentication error: Page.goto: Timeout 30000ms exceeded.
Call log:
  - navigating to "https://substack.com/sign-in", waiting until "networkidle"

domcontentloaded is sufficient here: the wizard only pre-fills the email field and then polls for the session cookie, so there's no need to wait for the network to settle.

Testing

  • python -m pytest -q -m "not integration" — 335 passed, 2 skipped (Python 3.12, mcp 1.29.0)
  • Manual: server starts and registers all 29 tools; connects successfully from Claude Code (claude mcp list → ✔ Connected)
  • Manual: setup wizard now reaches the sign-in page and stays open for login

🤖 Generated with Claude Code

fotoflo and others added 3 commits August 8, 2026 04:32
mcp 2.0.0 removed the Server.list_tools()/call_tool() decorator API this
server registers its 29 tools with, so any fresh install now crashes on
startup with:

    AttributeError: 'Server' object has no attribute 'list_tools'

Pin to <2 until the server is ported to the new SDK surface.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
substack.com/sign-in keeps analytics/telemetry connections open, so
Playwright's networkidle state never arrives; page.goto() raised a 30s
TimeoutError and the wizard closed the browser before the user could
log in. domcontentloaded is enough — the wizard polls for the session
cookie afterwards anyway.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nk email never arrives

Substack's anti-bot layer frequently silently drops the magic-link email
when it is requested from the automated setup browser — no error is shown
and the wizard waits forever. The code already supports manual auth via
SUBSTACK_SESSION_TOKEN, but no doc explained how to obtain the
substack.sid cookie. Add the capture recipe to the README troubleshooting
section, the authentication guide's session-token method, and the
quickstart's alternative setup + troubleshooting table.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@fotoflo

fotoflo commented Aug 8, 2026

Copy link
Copy Markdown
Author

Pushed one more commit (dd6b23d), docs only: documents the manual session-cookie fallback (SUBSTACK_SESSION_TOKEN via the substack.sid cookie), since Substack's anti-bot layer often silently drops the setup wizard's magic-link email when it's requested from the automated browser. Covers README troubleshooting, docs/authentication.md, and the quickstart.

🤖 Generated with Claude Code

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