-
Notifications
You must be signed in to change notification settings - Fork 72
feat(mcp): add OIDC auth, HTTP entry point, and Dockerfile for hosted deployment #1046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Aaron ("AJ") Steers (aaronsteers)
merged 4 commits into
main
from
devin/1781654305-hosted-cloud-mcp
Jun 27, 2026
+144
−1
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9b58979
feat(mcp): add OIDC auth, HTTP entry point, and Dockerfile for hosted…
devin-ai-integration[bot] 391f7bc
fix(mcp): add starlette to deptry DEP003 ignore list
devin-ai-integration[bot] 0e230c0
refactor(mcp): simplify env vars, add starlette dep, non-root Docker …
devin-ai-integration[bot] 1689115
fix(mcp): correct OIDC docstrings to list all three required env vars
devin-ai-integration[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| FROM python:3.12-slim | ||
|
|
||
| COPY --from=ghcr.io/astral-sh/uv:0.8.17 /uv /uvx /bin/ | ||
|
|
||
| RUN apt-get update \ | ||
| && apt-get install --no-install-recommends -y git \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| COPY pyproject.toml uv.lock README.md /app/ | ||
| COPY airbyte/ /app/airbyte/ | ||
|
|
||
| RUN uv sync --frozen --no-dev | ||
|
|
||
| RUN useradd -m -u 10001 appuser \ | ||
| && chown -R appuser:appuser /app | ||
|
|
||
| ENV PATH="/app/.venv/bin:$PATH" | ||
|
|
||
| EXPOSE 8080 | ||
|
|
||
| USER appuser | ||
|
|
||
| CMD ["airbyte-mcp-http"] | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Copyright (c) 2025 Airbyte, Inc., all rights reserved. | ||
| """HTTP transport entry point for the Airbyte MCP server. | ||
|
|
||
| Starts the MCP server with HTTP transport, suitable for hosted deployment | ||
| behind a load balancer. When OIDC env vars are set, authentication is | ||
| handled by `OIDCProxy` (configured in `server.py`). | ||
|
|
||
| Environment variables: | ||
|
|
||
| - `MCP_SERVER_URL`: Public base URL (for OIDC redirect callbacks) | ||
| - `OIDC_CONFIG_URL`: Keycloak OIDC discovery URL (enables auth with all three OIDC vars) | ||
| - `OIDC_CLIENT_ID`: OIDC client identifier | ||
| - `OIDC_CLIENT_SECRET`: OIDC client secret | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import logging | ||
|
|
||
| from airbyte.mcp.server import DEFAULT_HTTP_HOST, DEFAULT_HTTP_PORT, app | ||
|
|
||
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| def main() -> None: | ||
| """Start the Airbyte MCP server with HTTP transport.""" | ||
| logging.basicConfig(level=logging.INFO) | ||
| logger.info( | ||
| "Starting Airbyte MCP HTTP server on %s:%d", | ||
| DEFAULT_HTTP_HOST, | ||
| DEFAULT_HTTP_PORT, | ||
| ) | ||
|
|
||
| app.run( | ||
| transport="streamable-http", | ||
| host=DEFAULT_HTTP_HOST, | ||
| port=DEFAULT_HTTP_PORT, | ||
| stateless_http=True, | ||
|
aaronsteers marked this conversation as resolved.
|
||
| ) | ||
|
aaronsteers marked this conversation as resolved.
|
||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() | ||
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
|
aaronsteers marked this conversation as resolved.
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.