Skip to content

Refactor: split server.py into app, models, and tools modules#171

Merged
RafaelPo merged 1 commit intomainfrom
refactor/split-server
Feb 20, 2026
Merged

Refactor: split server.py into app, models, and tools modules#171
RafaelPo merged 1 commit intomainfrom
refactor/split-server

Conversation

@RafaelPo
Copy link
Contributor

Summary

  • Split the 1043-line monolithic server.py into focused modules: app.py (FastMCP instance, lifespan, task state), models.py (input models, schema validators), tools.py (all MCP tool implementations)
  • server.py becomes a thin entry point with re-exports for backward compatibility
  • Update test patch targets to match new module locations

Test plan

  • All 34 existing tests pass (5 integration tests skipped — require API key)
  • ruff lint clean
  • basedpyright 0 errors
  • No behavior changes — pure code move

🤖 Generated with Claude Code

Pure refactor — no behavior changes. Break the 1043-line monolithic
server.py into focused modules:

- app.py: FastMCP instance, lifespan, task state management
- models.py: Input models, schema validators, _schema_to_model
- tools.py: All @mcp.tool() implementations
- server.py: Thin entry point with re-exports for backward compat

Update test patch targets from everyrow_mcp.server to
everyrow_mcp.tools/app to match new module locations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@RafaelPo
Copy link
Contributor Author

@claude code review

@RafaelPo
Copy link
Contributor Author

This is part 1 of 4 splitting the work from the original PR #165 (feat/remote-mcp-server) into reviewable chunks:

  1. PR Refactor: split server.py into app, models, and tools modules #171 (this one) — Refactor: split server.py into app, models, tools modules
  2. HTTP transport + OAuth + Redis + GCS
  3. Results widget redesign
  4. input_url support for remote CSV loading

Each PR builds on the previous one. The original PR #165 will be closed once all 4 are merged.

@RafaelPo RafaelPo merged commit 785955f into main Feb 20, 2026
5 checks passed
@RafaelPo RafaelPo deleted the refactor/split-server branch February 20, 2026 10:11
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