Skip to content

Split mcp_cloud/http_server.py into four focused modules#490

Merged
neoneye merged 5 commits intomainfrom
split-mcp-cloud-http-server
Apr 2, 2026
Merged

Split mcp_cloud/http_server.py into four focused modules#490
neoneye merged 5 commits intomainfrom
split-mcp-cloud-http-server

Conversation

@neoneye
Copy link
Copy Markdown
Member

@neoneye neoneye commented Apr 2, 2026

Summary

  • Split 1,439-line mcp_cloud/http_server.py into four focused modules: server_boot.py (config, app creation), middleware.py (auth, CORS, rate limiting), tool_http_bridge.py (models, tool wrappers), route_registration.py (routes, tool registration)
  • http_server.py becomes a thin re-export shim preserving backward compatibility for tests and the Dockerfile entry point
  • Updated AGENTS.md module map and import graph, and marked completion in proposal 131

Test plan

  • All 27 split-critical tests pass (CORS, rate limiting, routing, auth key parsing)
  • Re-export shim verified: fastmcp_server, app, all middleware functions accessible via http_server.*
  • Dockerfile entry point python -m mcp_cloud.http_server preserved
  • CI lint, typecheck, and tests pass

🤖 Generated with Claude Code

neoneye and others added 5 commits April 2, 2026 16:36
…split

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract middleware.py (auth, CORS, rate limiting), tool_http_bridge.py
(request/response models, tool wrappers), route_registration.py (all
route handlers, tool registration), and server_boot.py (config, server
creation, lifespan). http_server.py becomes a re-export shim preserving
backward compatibility for tests and the Dockerfile entry point.

Test patches updated to target server_boot for constant mutations
(CORS_ORIGINS, DOWNLOAD_RATE_LIMIT_REQUESTS).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@neoneye neoneye merged commit 1ed8bee into main Apr 2, 2026
3 checks passed
@neoneye neoneye deleted the split-mcp-cloud-http-server branch April 2, 2026 15:50
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