Add initial Transport and Streamable HTTP support - #44
Draft
3dgiordano wants to merge 3 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new streamable HTTP transport for Perfecto MCP, allowing the server to handle multiple users and clouds over HTTP with per-request authentication via Bearer tokens and cloud selection via headers. It also refactors authentication and runtime context handling to support both stdio and HTTP transports, and updates documentation and CLI options accordingly.
New HTTP Transport and Authentication:
BearerAuthMiddleware) and cloud name resolution logic, with clear error handling for missing or malformed credentials. Health probe endpoints (/health,/healthz) bypass authentication for orchestration.Runtime and Context Refactoring:
AppRuntimeclass to encapsulate process-level transport, authentication, and user config, with logic to resolve and hydrate per-request context.stdio,http,docker) based on CLI, environment variables, or defaults, and builds the correct runtime and authentication wiring for each. [1] [2] [3]Documentation and CLI Improvements:
docs/hosted-http.mdwith detailed client configuration, header usage, auth behavior, environment variables, and limitations for HTTP transport. UpdatesREADME.mdto reference the new transport and documentation. [1] [2]--mcp, allowing explicit transport selection and improving help text. [1] [2] [3]Supporting Changes:
uvicornsubmodules for HTTP transport.References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]