Skip to content

Serve MCP at bare root (https://mcp.gen.pro); keep /mcp as legacy alias - #21

Merged
mavxdegods merged 1 commit into
mainfrom
gen-4785-bare-mcp-url
Jul 30, 2026
Merged

mavxdegods merged 1 commit into
mainfrom
gen-4785-bare-mcp-url

Conversation

@mavxdegods

Copy link
Copy Markdown
Member

GEN-4785 follow-on: the official MCP URL is now the bare host, {"url": "https://mcp.gen.pro"}.

  • --http mode builds the streamable-http app at path="/" and wraps it in an ASGI shim mapping /mcp and /mcp/ → /, so both paths serve the endpoint natively. Alias rather than redirect because MCP clients aren't guaranteed to re-POST the JSON-RPC body across a 30x.
  • README updated to the bare URL.

Tested locally on fastmcp 3.4.2 (same version as the live hosted venv): initialize POST → 200 at /, /mcp, /mcp/; 404 elsewhere.

Note: the live mcp.gen.pro (PyPI 0.1.25 install) already serves the bare URL via an nginx root→/mcp alias on app-2; this change makes the server itself dual-path so the behavior survives the pending git-based deploy.

🤖 Generated with Claude Code

Canonical hosted URL becomes https://mcp.gen.pro (no path). The --http
entrypoint now builds the streamable-http app at path="/" and wraps it in
a tiny ASGI shim that maps /mcp (and /mcp/) onto / so every pre-existing
client config keeps working. Alias, not redirect: MCP clients are not
guaranteed to re-POST a JSON-RPC body across a 30x.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mavxdegods
mavxdegods force-pushed the gen-4785-bare-mcp-url branch from 75acca4 to 6db23b0 Compare July 30, 2026 15:19
@mavxdegods
mavxdegods merged commit 14230b4 into main Jul 30, 2026
2 checks passed
mavxdegods pushed a commit that referenced this pull request Jul 30, 2026
mav: no more downloadable MCP; the official GEN MCP is the hosted server.
This is the last version that will ever be published to PyPI.

- version 0.9.1 -> 1.0.0: a final release should read as final, and it
  caps the version list above the never-published 0.2-0.9 range
- import emits DeprecationWarning ONLY for package-index installs
  (PEP 610: no direct_url.json). git/editable installs — the hosted
  mcp.gen.pro deployment and dev checkouts — stay quiet
- stdio CLI prints a plain stderr notice (unfilterable); --http hosted
  mode is the official surface and prints nothing
- README leads with the hosted config (bare https://mcp.gen.pro per
  PR #21; /mcp keeps working); local install demoted to a legacy section
- pyproject description carries the pointer (that is the PyPI headline)
- fastmcp pinned >=2.3.0,<4: a frozen-forever package must not let a
  future fastmcp major break fresh installs (verified on 3.4.5: imports,
  143 tools, list_tools public; NB 2.14.x privatized list_tools)
- tests: warn-on-index-install, quiet-on-git-install, stderr banner on
  stdio, silence on --http — all fail against a pre-change tree

Package stays fully functional: existing integrations get a migration
window, not a breakage.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mavxdegods pushed a commit that referenced this pull request Jul 30, 2026
…run)

After #21 the --http path builds an ASGI app and calls uvicorn.run, so
patching mcp.run no longer intercepts it — the test would start a real
server. Stub sys.modules["uvicorn"] instead and assert the app+port.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mavxdegods pushed a commit that referenced this pull request Jul 31, 2026
mav: no more downloadable MCP; the official GEN MCP is the hosted server.
This is the last version that will ever be published to PyPI.

- version 0.9.1 -> 1.0.0: a final release should read as final, and it
  caps the version list above the never-published 0.2-0.9 range
- import emits DeprecationWarning ONLY for package-index installs
  (PEP 610: no direct_url.json). git/editable installs — the hosted
  mcp.gen.pro deployment and dev checkouts — stay quiet
- stdio CLI prints a plain stderr notice (unfilterable); --http hosted
  mode is the official surface and prints nothing
- README leads with the hosted config (bare https://mcp.gen.pro per
  PR #21; /mcp keeps working); local install demoted to a legacy section
- pyproject description carries the pointer (that is the PyPI headline)
- fastmcp pinned >=2.3.0,<4: a frozen-forever package must not let a
  future fastmcp major break fresh installs (verified on 3.4.5: imports,
  143 tools, list_tools public; NB 2.14.x privatized list_tools)
- tests: warn-on-index-install, quiet-on-git-install, stderr banner on
  stdio, silence on --http — all fail against a pre-change tree

Package stays fully functional: existing integrations get a migration
window, not a breakage.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mavxdegods pushed a commit that referenced this pull request Jul 31, 2026
…run)

After #21 the --http path builds an ASGI app and calls uvicorn.run, so
patching mcp.run no longer intercepts it — the test would start a real
server. Stub sys.modules["uvicorn"] instead and assert the app+port.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mavxdegods added a commit that referenced this pull request Jul 31, 2026
…ro (#23)

* GEN-4785: final PyPI release 1.0.0 — deprecation pointer to mcp.gen.pro

mav: no more downloadable MCP; the official GEN MCP is the hosted server.
This is the last version that will ever be published to PyPI.

- version 0.9.1 -> 1.0.0: a final release should read as final, and it
  caps the version list above the never-published 0.2-0.9 range
- import emits DeprecationWarning ONLY for package-index installs
  (PEP 610: no direct_url.json). git/editable installs — the hosted
  mcp.gen.pro deployment and dev checkouts — stay quiet
- stdio CLI prints a plain stderr notice (unfilterable); --http hosted
  mode is the official surface and prints nothing
- README leads with the hosted config (bare https://mcp.gen.pro per
  PR #21; /mcp keeps working); local install demoted to a legacy section
- pyproject description carries the pointer (that is the PyPI headline)
- fastmcp pinned >=2.3.0,<4: a frozen-forever package must not let a
  future fastmcp major break fresh installs (verified on 3.4.5: imports,
  143 tools, list_tools public; NB 2.14.x privatized list_tools)
- tests: warn-on-index-install, quiet-on-git-install, stderr banner on
  stdio, silence on --http — all fail against a pre-change tree

Package stays fully functional: existing integrations get a migration
window, not a breakage.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* test: stub uvicorn in the --http no-banner test (PR #21 replaced mcp.run)

After #21 the --http path builds an ASGI app and calls uvicorn.run, so
patching mcp.run no longer intercepts it — the test would start a real
server. Stub sys.modules["uvicorn"] instead and assert the app+port.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: mavneox <mav@onlywithneo.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

2 participants