SShortSingh.
Back to feed

Context window limits, not APIs, are the real bottleneck for MCP servers

0
·1 views

A developer building an HTTPS-based MCP server to connect AskElephant's call-recording tool with claude.ai discovered that the core design challenge was not API integration but context window arithmetic. An analysis of 3,706 client call engagements showed that a single transcript could reach nearly 44,000 tokens, and a typical multi-meeting search query could naively generate over 325,000 tokens — far exceeding a 200,000-token context window. To solve this, the team split responsibilities so that a Worker function scans and filters transcripts locally, returning only relevant excerpts with speaker labels and timestamps, while Claude handles reasoning over the condensed output. This approach reduced a real 40-meeting search from a theoretical 325,000 tokens to roughly 19,200 tokens of targeted excerpts. The team also identified a compounding bug where three independently reasonable caps on meetings, hits, and context characters were never validated as a combined budget, allowing worst-case outputs to silently exceed the window limit.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

SnapPDF lets developers generate PDF invoices via a simple GET request, no Chromium needed

Generating PDF invoices in web apps typically requires Puppeteer, which bundles a roughly 300MB Chromium binary and often fails within serverless environments due to bundle size limits. SnapPDF offers a hosted alternative that accepts a public URL as a query parameter and returns raw PDF bytes, eliminating the need for heavy dependencies. The service supports optional parameters such as page format, landscape mode, background rendering, and a CSS selector to wait for before capturing, which is especially useful for dynamically loaded invoice data. Developers can integrate it using Node's built-in fetch API with no additional libraries, though the target URL must be publicly accessible since the renderer fetches it over the internet. A recommended pattern for private invoices is to expose a signed, short-lived, unauthenticated render route that reuses the existing HTML template.

0
ProgrammingDEV Community ·

MCP Protocol Goes Stateless, Enabling Free Cloudflare Worker Hosting

The Model Context Protocol released its 2026-07-28 revision, removing sessions, session IDs, and the initialize handshake to make every request fully self-contained. On the same day, Cloudflare deprecated its Durable Object-backed McpAgent class and recommended a stateless request handler for new MCP servers. Together, these changes eliminate the main barrier to running an MCP server on Cloudflare's free plan, which previously required stateful infrastructure. The remaining constraint is Cloudflare's free-tier CPU limit of 10 milliseconds per request, which the author tested by deploying a real two-tool read-only MCP server on their own site. The server, built with zero external dependencies, handles tools listing and article retrieval, demonstrating that a minimal MCP server can fit within the free plan's limits.

0
ProgrammingDEV Community ·

Developer builds TG Cleaner to bulk-leave Telegram groups without API credentials

A developer who had accumulated 340 Telegram groups built a web tool called TG Cleaner after finding that manually leaving groups would take nearly four hours. Existing bulk-leave tools required users to create a Telegram developer account and generate API credentials, a process that took 15–30 minutes and posed a barrier for non-technical users. TG Cleaner eliminates that friction by routing authentication through a single registered Telegram application, so users only need to enter their phone number and a verification code. The tool, available as both a website and a Telegram Mini App via @TGCUtilityBot, lets users bulk-leave groups, mute or archive chats, and remove ghost contacts and bot DMs. It is built on a Python/Flask backend with Telethon for Telegram's MTProto layer, Celery and Redis for background tasks, and PostgreSQL for data storage.

0
ProgrammingDEV Community ·

AI Agents vs Chatbots: Four Key Technical Differences Explained

AI chatbots and AI agents are often conflated, but the two systems differ significantly in how they function. Chatbots operate on a simple input-output model, responding to prompts with text but taking no independent action. AI agents, by contrast, use large language models as a reasoning engine to plan and execute multi-step tasks, connecting to external tools such as APIs, databases, and browsers to interact with real-world systems. Unlike chatbots, agents can maintain persistent memory across long-running workflows and self-correct when they encounter errors during execution. This makes AI agents far better suited to autonomous tasks like booking travel or resolving software bugs, where action — not just advice — is required.

Context window limits, not APIs, are the real bottleneck for MCP servers · ShortSingh