Skip to content

feat: Add HTTP transport support, fix API filters, and improve rate limiting#4

Open
JumpLink wants to merge 4 commits intogscalzo:mainfrom
faktenforum:main
Open

feat: Add HTTP transport support, fix API filters, and improve rate limiting#4
JumpLink wants to merge 4 commits intogscalzo:mainfrom
faktenforum:main

Conversation

@JumpLink
Copy link

@JumpLink JumpLink commented Jan 23, 2026

This PR adds HTTP (streamable-http) transport support for Docker deployments, fixes invalid API filter issues, and implements intelligent rate limiting with backoff handling.

Changes

HTTP Transport Support

  • Added streamable-http transport mode for containerized deployments
  • Server automatically detects transport mode based on PORT environment variable
  • Supports both stdio (default) and HTTP transport modes
  • Includes health check endpoint (GET /health) and session management

API Filter Fixes

  • Fixed: Replaced invalid custom filter IDs (!*MZqiDl8Y0c)yVzXS, etc.) with built-in filters
  • Now uses withbody and default filters which are always valid
  • Resolves "Invalid filter specified (400)" errors

Rate Limiting Improvements

  • Implemented intelligent rate limiting: 25 requests/second (safety margin below API's 30/sec limit)
  • Added method-specific backoff handling (respects API backoff field)
  • Automatic quota monitoring with warnings when quota < 100
  • Exponential backoff retry on 429 errors
  • Minimum delay enforcement between requests

Code Quality

  • Refactored codebase for better maintainability and documentation
  • Added JSDoc comments for all public methods
  • Improved error handling and type safety
  • Reduced code duplication

Dependencies

  • Updated all dependencies to latest versions

Testing

  • All existing tests pass
  • HTTP transport mode tested in Docker environment
  • Rate limiting verified with API calls
  • Filter fixes verified (no more 400 errors)

Breaking Changes

None - fully backward compatible. Stdio mode remains the default when PORT is not set.

- Add streamable-http transport support for Docker deployments
- Replace invalid custom filter IDs with built-in filters (withbody, default)
- Implement intelligent rate limiting (25 req/sec with backoff handling)
- Add API quota monitoring and warnings
- Support method-specific backoff from API responses
- Add API key status logging on startup
- Refactor code for better maintainability and documentation
- Update dependencies: @modelcontextprotocol/sdk 0.6.0 -> 1.25.3
- Add express and zod dependencies for HTTP transport
- Improve error handling and type safety
- Add streamable-http transport support for Docker deployments
- Replace invalid custom filter IDs with built-in filters (withbody, default)
- Implement intelligent rate limiting (25 req/sec with backoff handling)
- Add API quota monitoring and warnings
- Support method-specific backoff from API responses
- Add API key status logging on startup
- Refactor code for better maintainability and documentation
- Update dependencies: @modelcontextprotocol/sdk 0.6.0 -> 1.25.3
- Add express and zod dependencies for HTTP transport
- Improve error handling and type safety
- Remove redundant module declarations and comments from index.ts and types/index.ts
- Simplify code by eliminating unused sections and improving readability
- Update test comments for clarity in rateLimiting.test.ts
@JumpLink JumpLink marked this pull request as ready for review January 23, 2026 15:01
- Add comprehensive JSDoc comments for all functions
- Document function parameters, return values, and behavior
- Update README with new features (structured logging, graceful shutdown, session management)
- Document all HTTP endpoints (GET/DELETE /mcp)
- Improve code consistency and maintainability
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