From 844541a8d993a562415b456924c7ea9f3ff981b9 Mon Sep 17 00:00:00 2001 From: Mattia Tommasone Date: Thu, 8 Oct 2026 21:48:45 +0200 Subject: [PATCH 1/2] Relax dependency version constraints to allow any mcp[cli] 2.x.x and any fastmcp 4.x.x Change-Id: Ie35ba5dc145963266a3540768f8f5f59462e30d4 --- Dockerfile | 2 +- README.md | 4 ++-- pyproject.toml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index e36b703e..3ab1b14c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN uv pip install --system . # OAuth callback, even though FastMCP constructs the redirect with `iss` and # advertises it as mandatory. This version-guarded compatibility layer only # stops affected clients from requiring that response parameter. -RUN python -c "from importlib.metadata import version; from pathlib import Path; assert version('fastmcp') == '4.0.3'; p = Path('/usr/local/lib/python3.11/site-packages/fastmcp/server/auth/oauth_proxy/proxy.py'); s = p.read_text(); old = 'metadata.authorization_response_iss_parameter_supported = True'; new = 'metadata.authorization_response_iss_parameter_supported = False'; assert s.count(old) == 1; p.write_text(s.replace(old, new))" +RUN python -c "from importlib.metadata import version; from pathlib import Path; assert version('fastmcp').startswith('4.'); p = Path('/usr/local/lib/python3.11/site-packages/fastmcp/server/auth/oauth_proxy/proxy.py'); s = p.read_text(); old = 'metadata.authorization_response_iss_parameter_supported = True'; new = 'metadata.authorization_response_iss_parameter_supported = False'; assert s.count(old) == 1; p.write_text(s.replace(old, new))" LABEL io.google-mcp.workaround="openai-codex-0146-rfc9207-iss" diff --git a/README.md b/README.md index fe034c9d..08f1fb53 100644 --- a/README.md +++ b/README.md @@ -172,10 +172,10 @@ legacy MCP 2025 clients that use `Mcp-Session-Id` and GET SSE as well as MCP Do not enable FastMCP's `stateless_http` option on this shared endpoint; doing so removes the legacy GET channel. -The server runs on FastMCP 4 (`fastmcp>=4.0.3`) paired with `mcp[cli]==2.0.0`. The Docker build also applies a version-guarded +The server runs on FastMCP 4 (`fastmcp>=4.0.6,<5`) paired with `mcp[cli]>=2.0.0,<3`. The Docker build also applies a version-guarded OAuth metadata workaround for Codex CLI 0.146. It stops advertising the RFC 9207 authorization-response `iss` parameter as mandatory while FastMCP still -includes it in redirects. The build fails if the expected FastMCP version or +includes it in redirects. The build fails if the expected FastMCP major version or patch location changes, so upgrades require explicit interoperability tests. For Codex, configure and authenticate the server as described in the diff --git a/pyproject.toml b/pyproject.toml index 2c91fa30..da5130ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,8 +9,8 @@ requires-python = ">=3.10" license = "Apache-2.0" dependencies = [ "google-ads>=32.0.0", - "mcp[cli]==2.0.0", - "fastmcp>=4.0.6" + "mcp[cli]>=2.0.0,<3", + "fastmcp>=4.0.6,<5" ] description = "MCP Server for Google Ads, depends on Google Ads API." From 184f449325616afa3ef99b8a41db1c456e4cde19 Mon Sep 17 00:00:00 2001 From: Mattia Tommasone Date: Thu, 8 Oct 2026 21:51:05 +0200 Subject: [PATCH 2/2] Increment version number and add Ben as an author Change-Id: I5bcb263d79e982aea9270105a08d8b93691f882d --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index da5130ea..5f7f6c7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ version = "0.0.4" requires-python = ">=3.10" license = "Apache-2.0" dependencies = [ - "google-ads>=32.0.0", + "google-ads>=33.0.0", "mcp[cli]>=2.0.0,<3", "fastmcp>=4.0.6,<5" ] @@ -18,6 +18,7 @@ readme = "README.md" authors = [ { name = "Dean Lukies", email = "lukiesd@users.noreply.github.com" }, { name = "Mattia Tommasone", email = "Raibaz@users.noreply.github.com" }, + { name = "Ben Karl", email = "benrkarl@users.noreply.github.com" }, ] keywords = ["Google Ads", "Google Ads API", "MCP"] classifiers = [