feat: initial package import from mcp-context-forge PR 5417#3
Merged
Conversation
- Add mcp_reverse_proxy package: SSE, stdio, streamable HTTP and WebSocket transport adapters for proxying MCP servers behind TLS reverse proxies, including CLI, cert utilities and full test suite - fix(security): escape html in SSO provider delete responses (CWE-79) - fix(security): escape html in remove_root error and success responses (CWE-79) - Sync all upstream changes: new alembic migrations, service updates, test coverage, config additions, chart values, and dependency updates Signed-off-by: Pat Hourigan <hourigan@ie.ibm.com>
- __main__.py docstring: python -m mcp_reverse_proxy - logging_config.py: reword parent-package comment (zero mcpgateway references remain in src/) - docs/README.md: module invocation examples use mcp_reverse_proxy.cli - tests/README.md: test paths match repo-root layout Signed-off-by: Jonathan Springer <jps@s390x.com>
Signed-off-by: Jonathan Springer <jps@s390x.com>
pyproject.toml declares readme = "USER_README.md"; placing the user guide at the repo root makes the path valid for the build backend and follows the PyPI convention of a root-level rendered readme. Signed-off-by: Jonathan Springer <jps@s390x.com>
Signed-off-by: Jonathan Springer <jps@s390x.com>
Builds sdist+wheel on v* tags and publishes via OIDC trusted publishing (pypa/gh-action-pypi-publish). Requires a pending publisher configured on PyPI: org contextforge-org, repo mcp-reverse-proxy, workflow release.yml, environment pypi. Not executed until a tag is pushed. Signed-off-by: Jonathan Springer <jps@s390x.com>
Mechanical fixes (137): remove unused imports/coding declarations, modernize typing annotations (UP006/UP035/UP045), sort imports and __all__, combine implicit string concatenation, and related auto-fixable rules per the package ruff configuration. Signed-off-by: Jonathan Springer <jps@s390x.com>
Signed-off-by: Jonathan Springer <jps@s390x.com>
- Rename StdioSubprocessTerminated to StdioSubprocessTerminatedError (N818; spans src and tests atomically) - Drop unused cert-value locals in cli.py (F841); underscore unused asyncio.wait result (RUF059) - Replace try/except-pass with contextlib.suppress (SIM105) - Keep strong reference to scheduled disconnect task (RUF006) - Avoid loop-variable overwrite in SSE/WS readers (PLW2901) - Tuple-startswith in streamable HTTP adapter (PIE810) - Narrow httpx verify argument to SSLContext | bool (mypy arg-type) - Silence intentional ABC no-op default (B027) and wait_for signature match in tests (ARG001); underscore unused lambda args in tests Signed-off-by: Jonathan Springer <jps@s390x.com>
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.
Summary
Closes #1
Imports the standalone
mcp_reverse_proxypackage (extracted in mcp-context-forge PR 5417, branchcyberfraud-reverse-proxy-support) into this repository, adds CI and a prepared (not executed) PyPI release workflow.Import method (recorded per plan)
History-preserving import via
git filter-repo. The source repo was cloned locally,git filter-repo --subdirectory-filter mcp_reverse_proxy --refs import-srcwas run against the extraction commit (e57f77c73), and the resulting filtered commit (a011fc389) was cherry-picked onto the scaffold as71f790b, preserving original authorship and DCO sign-off. Only one commit on the source branch touchedmcp_reverse_proxy/, so the filtered history is a single commit; earlier work-in-progress commit2a43f7c6blives on a different source branch and was superseded by the extraction commit.What landed
src/mcp_reverse_proxy/— client, CLI, cert utilities, stdio/SSE/streamable-HTTP/WebSocket transport adapterstests/— 8 unit-test files, 124 tests (all passing)docs/README.md(architecture, 285 lines) +USER_README.md(user guide, 676 lines, moved to repo root — see below)pyproject.toml—mcp-reverse-proxyv1.0.0, console scriptmcp-reverse-proxyPost-import fixes
__main__.pydocstring andlogging_config.pycomment referencedmcpgateway; docs usedpython -m mcpgateway.mcp_reverse_proxy.cli. All corrected —grep -rn mcpgateway src/returns zero matches.pyproject.tomldeclaresreadme = "USER_README.md"; the file was moveddocs/USER_README.md→ repo root so the path is valid for the build backend and follows PyPI convention.verify) and addedtypes-PyYAMLto dev extras.ruff check,mypy, andpytest(124 passed) are all green locally.Companion test MCP server — evaluation outcome: EXCLUDED
tests/mcp-servers/python/test_reverse_proxy_mcp_server/(FastMCP-based multi-transport test server) was not imported:pyproject.toml,uv.lock, Makefile,test_server.sh) with afastmcpdependency the library does not need.Follow-up: #2 tracks porting it as a
tests/integration/fixture.CI / release
ci.yml: ruff + mypy (py3.11), pytest matrix py3.11/3.12/3.13, wheel+sdist buildrelease.yml: build + PyPI trusted publishing (OIDC, no API token) onv*tags — prepared, NOT executedPyPI trusted-publishing setup required (manual, before first tag)
On PyPI, for project
mcp-reverse-proxy, add a pending publisher:mcp-reverse-proxycontextforge-orgmcp-reverse-proxyrelease.ymlpypiA GitHub environment named
pypishould also be created in repo settings (optional protection rules). No tag will be pushed until this is confirmed.Verification
pytest tests/ -q: 124 passedruff check src tests: cleanmypy src/mcp_reverse_proxy: no issuesuv build: wheel + sdist build successfully