Skip to content

Commit 893ba7b

Browse files
authored
fix(streamable-http): pin mount to /mcp/ + bump to 1.0.106 (#122)
The mcp SDK defaults streamable_http_path to /mcp (no trailing slash). The upstream proxy at internal nginx :9009 forwards Next.js requests to /mcp/ verbatim, which the SDK responds to with HTTP 307 to /mcp. That redirect dance is the prime suspect for the 1.0.104 production transport regression (PagerDuty incident 129); reverted to 1.0.103 on the same day, hotfixed as 1.0.105 without the mcp 1.23.0 bump. This release retries the mcp 1.23.0 bump with the redirect removed: explicitly setting streamable_http_path=/mcp/ makes the with-slash URL canonical, so prod traffic hits a direct 200 instead of a 307. Pairs with --host 127.0.0.1 in the systemd unit (separate repo) for deterministic IPv4 binding.
1 parent 1876915 commit 893ba7b

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎meta_ads_mcp/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from meta_ads_mcp.core.server import main
88

9-
__version__ = "1.0.104"
9+
__version__ = "1.0.106"
1010

1111
__all__ = [
1212
'get_ad_accounts',

‎meta_ads_mcp/core/server.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,11 @@ def main():
337337
mcp_server.settings.port = args.port
338338
mcp_server.settings.stateless_http = True
339339
mcp_server.settings.json_response = not args.sse_response
340-
340+
# Mount streamable HTTP at /mcp/ (with trailing slash) so requests
341+
# forwarded by an upstream proxy at .../mcp/ are served directly
342+
# instead of receiving a 307 redirect to /mcp (the SDK default).
343+
mcp_server.settings.streamable_http_path = "/mcp/"
344+
341345
# Import all tool modules to ensure they are registered
342346
logger.info("Ensuring all tools are registered for HTTP transport")
343347
from . import accounts, campaigns, adsets, ads, insights, authentication

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "meta-ads-mcp"
7-
version = "1.0.104"
7+
version = "1.0.106"
88
description = "Model Context Protocol (MCP) server for Meta Ads - Use Remote MCP at pipeboard.co for easiest setup"
99
readme = "README.md"
1010
requires-python = ">=3.10"

‎server.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
33
"name": "co.pipeboard/meta-ads-mcp",
44
"description": "Facebook / Meta Ads automation with AI: analyze performance, test creatives, optimize spend.",
5-
"version": "1.0.104",
5+
"version": "1.0.106",
66
"remotes": [
77
{
88
"type": "streamable-http",

0 commit comments

Comments
 (0)