Three Major Pitfalls of Remote MCP Servers
Objective_Speed_5885 · reddit · 2026-07-18
The author summarizes three key pitfalls encountered when building a remote MCP server:
- Remote services must use OAuth 2.1: The server doesn't issue tokens but validates tokens issued by an external authorization server, using protected-resource metadata to tell the client where to authenticate.
- stdout cannot be misused under stdio: Any console.log can break the protocol stream; logs must be written to stderr.
- Tools should be as "thin" as possible: Splitting a large, catch-all managenotes(action, ...) into multiple narrow tools and adding clear constraints to each field significantly improves model selection and reduces parameter hallucinations.
The author also turned the whole setup into a reusable template: including an OAuth verifier (JWKS + RFC 7662), two transport types, session management, a demo AS, Docker/Fly configurations, and 42 tests covering the entire flow from registration to PKCE and MCP calls.
More from coding & agent
- Warp's six non-engineering teams all run on Linear and Claude Code — mon__lim · 2026-09-11
- Is inference latency becoming the biggest bottleneck for production AI agents? — Euphoric_Sea632 · 2026-09-11
- Anthropic researcher: 99% of engineers now run swarms of 300+ self-improving agents — AlishaOutridge · 2026-09-11
- Gergely Orosz: Shipping 10x PRs With AI Agents, Sites Fill With Small Regressions — ducha_aiki · 2026-09-11
- Same Echo Maze prompt, three frontier models: all passed visually but shipped the same hidden bug — eyishazyer · 2026-09-11
- Astra storyboards plus Minimax H3 per-shot generation boost video success rates — Hailuo_AI · 2026-09-11