Token导航 LogoToken导航TokenDH.com
Abelin101 MCP logo
办公协作未说明官方级别未说明来源级核验

Abelin101 MCP

MCP Server

ChatGPT HTTP MCP工具执行成功后UI显示错误信息的问题报告。

工具数

1

提示词数

0

GitHub Stars

0

资源数

0
Python团队协作任务管理

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Abelin101

提供方

Abelin101

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

ChatGPT HTTP MCP Bug: Tools execute successfully but UI shows “Error in message stream” (Minimal Repro Included)

Summary

I’ve isolated a reproducible bug in ChatGPT’s HTTP MCP message streaming pipeline.

When ChatGPT connects to an HTTP MCP server via a publicly accessible URL (ngrok), it:

  • Connects successfully
  • Discovers the tools successfully (ListToolsRequest)
  • Sends CallToolRequest successfully
  • My MCP server executes the tool successfully
  • My MCP server returns a valid response
  • BUT the ChatGPT UI fails to render the result and instead shows:

This issue persists even with a minimal 60-line MCP server, no external dependencies, and a single trivial echo tool. Logs clearly show that the tool executes and returns normally, which confirms the issue is on the ChatGPT UI side.

This is not specific to my project — it reproduces 100% on a minimal FastAPI MCP server.


Environment

  • ChatGPT Model: ChatGPT 5.1 (Developer Mode)
  • MCP Type: HTTP MCP
  • Tunnel: ngrok http 9098
  • Client Browsers tested: Chrome, Edge, Opera — normal & incognito
  • Server: FastAPI + FastApiMCP (from fastapi-mcp)
  • OS: Windows 11 + WSL2 (Ubuntu 24.04)
  • Python: 3.10
  • FastAPI: Latest
  • MCP SDK: Latest fastapi-mcp release

Minimal MCP Server (single tool)

Here is the entire reproducible MCP server (slim_server.py). This is the full server — nothing omitted.

Click to expand the minimal server code

# slim_server.py - minimal reproducible HTTP MCP server

import asyncio
import json
import logging
from typing import Any, Dict

from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse, PlainTextResponse
from fastapi.middleware.cors import CORSMiddleware
from pydantic import BaseModel

from fastapi_mcp import FastApiMCP   #  {response.status_code} "
        f"({response.headers.get('content-type')})"
    )
    return response

# -------------------------------------------------------------------
# Minimal tool: echo
# -------------------------------------------------------------------

class EchoRequest(BaseModel):
    message: str

class EchoResponse(BaseModel):
    message: str

@app.post(
    "/echo",
    operation_id="echo",
    response_model=EchoResponse,
    tags=["mcp", "test"],
)
async def echo_tool(body: EchoRequest) -> EchoResponse:
    log.info(f"echo_tool called with message={body.message!r}")
    return EchoResponse(message=f"echo: {body.message}")

# -------------------------------------------------------------------
# MCP Mount
# -------------------------------------------------------------------

mcp_http = FastApiMCP(
    app,
    name="Minimal MCP Repro",
    description="A minimal HTTP MCP server for reproducing ChatGPT UI streaming bug.",
    include_operations=["echo"],
)

mcp_http.mount()  # mounts /mcp and /mcp/messages
log.info("Mounted HTTP MCP endpoint at /mcp")

# -------------------------------------------------------------------
# Run app
# -------------------------------------------------------------------

if __name__ == "__main__":
    import uvicorn

    uvicorn.run(
        "ops.mcp.slim_server:app",  # adjust to your module path
        host="127.0.0.1",
        port=9098,
        reload=True,
        log_level="info",
    )

Reproduction Steps

Run the MCP server above.

Expose it via ngrok:

ngrok http 9098

Example URL:

https://adela-unlaudable-nondidactically.ngrok-free.dev

In ChatGPT → GPT Builder → Add Tool → MCP Server (HTTP):

https://.ngrok-free.dev/mcp

ChatGPT successfully connects and shows the echo tool.

Open a new chat with the custom GPT.

Ask:

Call the echo tool with message "hello"

✔ What happens in ngrok logs:
GET /mcp                  200 OK
POST /mcp/messages/       202 Accepted
POST /mcp/messages/       202 Accepted
POST /mcp                 405 Method Not Allowed   # expected

✔ What happens in the FastAPI logs:
Processing request of type ListToolsRequest
Processing request of type CallToolRequest
echo_tool called with message='hello'
HTTP POST /echo -> 200 OK

✔ What happens in local curl:
$ curl -X POST http://127.0.0.1:9098/echo -d '{"message":"hello"}'
{"message":"echo: hello"}

❌ What happens in ChatGPT UI:
Error in message stream

The UI never displays the tool response, even though the backend definitely received it.

Expected vs Actual
✔ Expected

After calling the echo MCP tool, ChatGPT should show:

{ "message": "echo: hello" }

❌ Actual

ChatGPT logs show MCP handshake + tool execution succeeded

My MCP server returns correctly

The UI displays a red banner:

Error in message stream

No assistant response appears.

Why this is an OpenAI bug

Because:

The minimal server is correct

The MCP connector successfully registers the server + tool

The connector successfully sends call_tool

My server executes the tool without error

My server returns a valid MCP response

The TCP stream over ngrok is healthy

The UI fails after the backend receives the response

This strongly suggests a client-side UI streaming bug in ChatGPT when rendering responses for HTTP MCP.

Attachments / Evidence
✔ Full minimal server source

(above)

✔ MCP server logs

(included via log_requests)

✔ ngrok logs

(showing correct 200/202 activity)

✔ ChatGPT UI screenshots

(a reproducible failure every time)

Notes

This does not occur locally — only through ChatGPT UI.

Happens across multiple browsers and different machines.

Reproduces 100% with this minimal server.

If there’s any way to enable additional debug logging on the ChatGPT side or test a beta build, I’d be happy to help.

Thanks!

目录标签

目录标签

Python团队协作任务管理ChatGPT本地部署HTTPMCP错误报告工具执行UI问题

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP