github-repo-stats

github-repo-stats

A Model Context Protocol server that fetches public GitHub repository statistics.

Category
访问服务器

README

mcp-transport-talk

Code companion for my MCP Dev Summit Bengaluru 2026 talk: "From SSE to Streamable HTTP: What Actually Changed in MCP's Transport Layer and Why Your Servers Need to Catch Up"

— Animesh Pathak (@sonichigo), Developer Relations Engineer, Harness Inc

A note on terminology (important — read this first)

The talk title uses community shorthand. People say "SSE → Streamable HTTP" when what they actually mean is "the dual-endpoint HTTP+SSE architecture → the single-endpoint Streamable HTTP architecture."

Three things people conflate:

Term What it is Status
HTTP+SSE transport The deprecated MCP transport. Two endpoints: GET /sse (persistent) + POST /message. Required sticky sessions. Deprecated (spec 2025-03-26)
Streamable HTTP transport The current MCP transport. Single endpoint that supports both POST and GET, with optional SSE streaming for responses. Current spec
SSE (the format) The W3C text/event-stream content type. Used inside Streamable HTTP for streaming server messages. Still alive — actively used

The deprecation was architectural, not protocol-level. Streamable HTTP still uses SSE format when it needs to stream multiple messages — it's just no longer a separate persistent endpoint. Throughout this repo, when I use the shorthand "SSE deprecated" I mean the two-endpoint architecture.

What's in here

The same MCP server (a GitHub repo stats tool) implemented three ways. You can run them side by side and watch how each architecture behaves under different conditions.

src/
├── stdio-server/                       # Local-only transport (still recommended for Claude Desktop / Code)
├── http-sse-server-deprecated/         # The dual-endpoint HTTP+SSE pattern (deprecated March 2025)
└── streamable-http-server/             # The current spec (uses SSE format internally when streaming)

clients/                                # A minimal MCP client to test each server
scripts/
├── load-test-dual-endpoint.sh          # Watch the deprecated architecture break behind a load balancer
└── load-test-streamable.sh             # Watch Streamable HTTP scale horizontally

The tool we're implementing

A single MCP tool — github_repo_stats — that fetches public stats for any GitHub repo. Picked deliberately:

  • Real I/O (calls the GitHub API), so transport behavior is observable.
  • Stateless (no auth, no session needed), so we can fairly compare architectures.
  • Small enough to fit on a slide.

Quick start

pnpm install

# Run all three servers in parallel
pnpm dev:all

# Or one at a time:
pnpm dev:stdio          # → connects via stdin/stdout
pnpm dev:http-sse       # → http://localhost:3001 (deprecated dual-endpoint pattern)
pnpm dev:streamable     # → http://localhost:3002 (current spec)

The demo that lands the point

# Start the load-balancer simulator (round-robin across 3 instances of each server)
pnpm demo:lb

# Hit the dual-endpoint server through it — watch it fail intermittently
pnpm demo:lb:dual-endpoint

# Hit the Streamable HTTP server through it — watch it just work
pnpm demo:lb:streamable

The deprecated dual-endpoint server fails roughly 2 out of every 3 requests because the POST /message lands on a different process than the GET /sse that initiated the session. The Streamable HTTP server is stateless and doesn't care which instance handles each request.

This is the live version of the architectural contrast in the slides.

The real-world failure I keep referencing

The intermittent-failure scenario in scripts/load-test-dual-endpoint.sh is a synthetic version of an actual incident from the Harness MCP Server's staging environment. We had a load balancer with default round-robin behavior in front of three pods. About 60% of MCP tool calls failed silently because the POST request landed on the wrong pod. Logs showed nothing because each pod treated it as a missing session and returned 404 to the SSE stream that wasn't there.

Three days of debugging produced a one-line architectural fix: switch transports. That experience is what this talk is built on.

Where SSE format still lives in the current architecture

This is the bit that confuses people. The current Streamable HTTP transport still uses SSE format — but as a response mode, not a separate endpoint. When a client POSTs to the single /mcp endpoint, the server can respond with either:

  1. A plain JSON body (Content-Type: application/json) — for simple one-shot requests
  2. An SSE stream (Content-Type: text/event-stream) — when the server needs to stream progress, notifications, or multiple messages

See src/streamable-http-server/index.ts — the SDK's handleRequest() picks the response mode automatically based on what the server is doing.

Migration cheat sheet

If you have an existing dual-endpoint server and want to migrate, the diff is roughly:

- import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
+ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";

- app.get("/sse", async (req, res) => {
-   const transport = new SSEServerTransport("/message", res);
-   await server.connect(transport);
- });
- app.post("/message", async (req, res) => {
-   await transport.handlePostMessage(req, res);
- });

+ app.post("/mcp", async (req, res) => {
+   const transport = new StreamableHTTPServerTransport({
+     sessionIdGenerator: () => randomUUID(),
+   });
+   await server.connect(transport);
+   await transport.handleRequest(req, res, req.body);
+ });

Plus a 405 shim for the old /sse endpoint — see src/streamable-http-server/index.ts.

Real-world deprecation deadlines

This isn't theoretical — major MCP server providers are pulling the old endpoints:

Vendor Deadline Notes
Keboola April 1, 2026 Removing dual-endpoint SSE
Atlassian Rovo June 30, 2026 mcp.atlassian.com/v1/sse/v1/mcp

If your server still uses the dual-endpoint pattern, your integrations will start breaking in 2026.

Resources & References

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选