今日已更新 256 条资讯 | 累计 29398 条内容
关于我们

Your MCP server's real constraint is the context window, not the API

Meticulosity 2026年08月04日 21:00 4 次阅读 来源:Dev.to

We use AskElephant to record client calls, and we work in claude.ai. Those two things could not talk to each other, and the reason is structural rather than a missing feature. AskElephant ships an MCP server. It runs locally over stdio, which serves Claude Desktop, Cursor, VS Code and Windsurf. A browser cannot spawn a process on your laptop, so claude.ai needs an MCP server at an HTTPS address. That is a different program. Building it took about a day. Working out what it should refuse to do took considerably longer, and that part generalises to any MCP server sitting in front of a large corpus. The code is on GitHub . The arithmetic that determines the design Before writing tools, measure your payload. We measured every transcript in our account: 3,706 engagements, 2,230 of which carry one. Characters Approx tokens Average transcript-bearing call 32,485 8,100 Median 28,240 7,060 p95 75,543 18,885 Largest 175,643 43,900 The largest single call is more than a fifth of a 200,000-token context window on its own. Now consider the actual user request: "find where we discussed pricing with this client this year." That touches maybe forty calls. The naive tool returns forty transcripts, which is roughly 325,000 tokens. It does not fit. Not slow, not costly: impossible. So the design constraint is not the API. It is arithmetic, and it arrives before you write a single tool definition. Do the reading on the server The whole design collapses to one line: The Worker does the reading. Claude does the thinking. search_transcripts fetches the candidate transcripts, scans them inside the Worker, and returns only matching passages with speaker and timestamp attached. A real forty-meeting search, run through claude.ai against the live archive, returned 76,757 characters of excerpt: about 19,200 tokens rather than 325,000. The scanner is a pure function with no IO, which makes it trivial to test: export function scanTranscript ( text : string , queries : string [], opts : ScanOption

本文内容来源于互联网,版权归原作者所有
查看原文