mcp-transport-stdio-http

mcp-transport-stdio-http is a skill for Claude Code from latestaiagents/agent-skills. It costs 103 tokens per session (1,397 once invoked), scanned A, original, MIT.

A guide to choosing how an MCP server communicates with its clients. MCP, or Model Context Protocol, is a standard way for AI applications to use tools and data services.

In plain words
What is it for?
Use it when building a local MCP server, a remote server over HTTP, or moving an older SSE connection to Streamable HTTP.
Why use it?
It helps prevent dropped connections, broken sessions, and scaling problems caused by choosing or implementing the wrong transport.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mcp-mastery plugin — 7 skills shipped together , and of latestaiagents

Good fit Use it when building a local MCP server, a remote server over HTTP, or moving an older SSE connection to Streamable HTTP.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/latestaiagents/agent-skills/mcp-transport-stdio-http
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add latestaiagents/agent-skills --skill mcp-transport-stdio-http
Clone the repo
git clone --depth 1 https://github.com/latestaiagents/agent-skills

Made for: Claude Code.

Or install mcp-mastery, the plugin that ships this one along with the rest of its 7 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-transport-stdio-http

README.md
[![agentmods](https://agentmods.dev/badge/skills/latestaiagents/agent-skills/mcp-transport-stdio-http/github.svg)](https://agentmods.dev/skills/latestaiagents/agent-skills/mcp-transport-stdio-http)
Your own site
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/mcp-transport-stdio-http"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/mcp-transport-stdio-http/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-transport-stdio-http

Your own site · 80×15
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/mcp-transport-stdio-http"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/mcp-transport-stdio-http.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,397 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00103 $0.01397
Opus 5 $0.00051 $0.00698
Sonnet 5 $0.00021 $0.00279
Haiku 4.5 $0.00010 $0.00140

Measured 7d ago against content hash 76721d99ae50, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

mcp-transport-stdio-http scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/mcp-mastery/mcp-transport-stdio-http/SKILL.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MCP Transports — stdio vs Streamable HTTP

Pick the right transport and the rest of your server design follows.

When to Use

  • Starting a new MCP server and choosing a transport
  • Migrating from deprecated SSE transport to Streamable HTTP
  • Debugging "connection dropped" or "session expired" errors
  • Scaling a remote MCP server horizontally

Transport Matrix

Transport Use when Pros Cons
stdio Local tools, CLI integrations, single-user Zero network, trusted process, simplest Only local; one client per server process
Streamable HTTP Remote multi-user servers Bidirectional, resumable, load-balanceable More complex; requires session layer
SSE (legacy) Existing deployments Deprecated; migrate to Streamable HTTP

stdio Transport

Server reads from stdin, writes JSON-RPC to stdout, logs to stderr. Client spawns the process.

import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
const transport = new StdioServerTransport();
await server.connect(transport);

Critical rule: never write non-JSON to stdout. console.log breaks the protocol. Use console.error for logs.

// BAD
console.log("Server started"); // corrupts protocol stream

// GOOD
console.error("Server started");

Streamable HTTP Transport (current spec)

Single HTTP endpoint handles all methods. Server pushes messages via SSE on long-lived GET, receives messages via POST, supports resumable sessions via Mcp-Session-Id header.

Server (TypeScript)

import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
import express from "express";

const app = express();
app.use(express.json());

const transports = new Map<string, StreamableHTTPServerTransport>();

app.all("/mcp", async (req, res) => {
  const sessionId = req.headers["mcp-session-id"] as string | undefined;
  let transport = sessionId ? transports.get(sessionId) : undefined;

  if (!transport) {
    transport = new StreamableHTTPServerTransport({
      sessionIdGenerator: () => crypto.randomUUID(),
      onsessioninitialized: (id) => transports.set(id, transport!),
    });
    await server.connect(transport);
  }

  await transport.handleRequest(req, res, req.body);
});

app.listen(3000);

Read the full file on GitHub · 156 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 156 lines · 103 tokens per session scan A 76721d99ae50

Subscribe to this mod's changes

mcp-transport-stdio-http is a skill published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 103 tokens to every session and 1,397 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

fw-ai-actions-app

Expert-level skill for AI Actions and integrations on Freshworks Platform 3.0. Use when (1) Creating actions.json and SMI functions (flat request, nested response), (2) Request templates and third-party API integration, (3) Pre-build validation (pricing, paywalls, account prerequisites), (4) Failure-case validation…

freshworks-developers/fw-dev-tools · 123 tokens

multi-app-orchestration

Orchestrate workflows across multiple applications and APIs — inter-app coordination, data handoff, and multi-system task completion.

a5c-ai/babysitter · 30 tokens

api-documenter

Auto-generate API documentation from code and comments. Use when API endpoints change, or user mentions API docs. Creates OpenAPI/Swagger specs from code. Triggers on API file changes, documentation requests, endpoint additions.

alirezarezvani/claude-code-tresor · 48 tokens

sinch-porting-api

Port phone numbers from other carriers into Sinch with the Porting API. Automates port-in order creation, portability checks, order tracking, on-demand activation, and webhook notifications. Use when porting numbers, checking portability, creating port-in orders, tracking port status, activating ported numbers…

sinch/skills · 76 tokens

sinch-voice-api

Build voice apps with Sinch Voice REST API. Use for phone calls, text-to-speech (TTS), IVR menus, DTMF input, conference calling, call recording, call forwarding, answering machine detection (AMD), SIP routing, WebSocket audio streaming, and SVAML call control.

sinch/skills · 67 tokens

sinch-whatsapp

Sends WhatsApp Business messages via the WhatsApp channel of the Sinch Conversation API — text, media, interactive, and Meta-approved template messages. Covers the 24-hour customer service window, template approval, opt-in requirements, and media specifications. Use when sending a WhatsApp message or WhatsApp…

sinch/skills · 91 tokens