Lessons from running a remote MCP server: DCR mess, refresh rotation, prompt-injection guards
rvmdl · reddit · 2026-10-20
The author of static.md shares first-hand lessons running a remote MCP server used by Claude, Cursor and Codex — for shared agent memory, meeting notes, collaborative whiteboards and self-updating docs. Key server-side lessons: dynamic client registration gets messy fast (dedupe Claude Code's per-port registrations by metadata hash; restrict unverified clients to loopback/https redirects); rotate refresh tokens on every refresh, revoke the whole family on reuse, and rate-limit per family against looping clients; treat note content as untrusted input by wrapping tool output in prompt-injection markers and gating setaccess behind explicit user requests. Eight tools total, one-line setup via claude mcp add.
More from coding & agent
- tsrs: an agent-written Rust port of TypeScript is 8x faster than TS 7.0 with 70% less memory — cnakazawa · 2026-10-20
- ASCII Magic launches 634-piece MIT-licensed animated ASCII art library you can wire into coding agents — sull · 2026-10-20
- Dev details how to let an MCP agent delete files safely: HMAC preview tokens and deny lists — qupit · 2026-10-20
- Cloudflare adopts tsrs, a Rust port of TypeScript that is 8x faster with 70% less memory — cnakazawa · 2026-10-20
- px0 Becomes a Full AI Workbench: Rebase Conflict Resolution and AI Commit Rewrites — arpit_bhayani · 2026-10-20
- Cloudflare and VoidZero back tsrs, a Rust port of TypeScript that's 8x faster with 70% less memory — Ben's Bites · 2026-10-20