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.

Original post →

More from coding & agent

coding & agent channel →