StreamNative Logo
VideoOct 8, 202613 mins

MCP Is Not Free Context

Unlock Instant Access

Complete the form to start watching.

Session Overview

In this session, Ahmed Ibrahim and Shaghayegh Moradirad break down the hidden costs and latency bottlenecks of building AI agents with Model Context Protocol (MCP). Learn key engineering takeaways from building agent runtimes, including context window bloat, tool composability, code mode, and prompt caching economics.

What You'll Learn

  • What MCP is and how it extends agent systems
  • The real cost of front-loading schemas and tool definitions
  • Why naming clarity prevents agent hallucinations and failure modes
  • Trimming tool outputs to avoid context flooding
  • Tool composability and using runtime scripts (Code Mode) vs sequential round-trips
  • The hidden cost dynamics of cached tokens over multi-turn agent runs
  • Design principles for building fast, cost-effective agent environments

Chapters

  • 00:00 — Introduction & what is MCP?
  • 01:21 — Pitfall 1: Loading too many tools upfront
  • 03:03 — Pitfall 2: Ambiguous tool naming & scoping
  • 04:20 — Pitfall 3: Massive tool outputs & context bloating
  • 05:46 — Pitfall 4: Tool composability & Code Mode
  • 08:13 — Pitfall 5: The myth of cheap cached tokens
  • 09:35 — Summary: Core rules for designing efficient MCP servers
  • 12:50 — Q&A wrap-up

About Speaker

Shaghayegh Moradirad

Shaghayegh Moradirad Shaghayegh Moradirad is a software engineer at OpenAI, where she has worked on the Codex Python SDK, ChatGPT features and has brought up services from scratch. Her work sits at the boundary of developer tools, AI systems, and product engineering. Before OpenAI, she worked on observability and large-scale infrastructure-adjacent systems at LinkedIn and Two Sigma.

Ahmed Ibrahim

Ahmed Ibrahim Ahmed Ibrahim is a software engineer at OpenAI working on Codex. He builds agent runtimes, tool execution, and developer infrastructure for software engineering agents.