What problem does it solve? Modifying MCP servers that expose repository memory (like docs-memory) risks breaking stdio framing, headerless parsing, and the tools/list contract that agents depend on. This Skill provides a disciplined procedure so changes stay backward-compatible and verifiable. ## Core Features & Use Cases - Mandatory prior-art retrieval: Search existing Skills and sessions in docs-memory before coding, so you reuse known solutions instead of re-learning painful protocol details. - Contract-first tool design: Define tool names, JSON input/output schemas, and error modes before implementation, favoring small composable tools. - Validation ladder: Run mcp-check, the docs-memory stdio compatibility check, and focused Jest tests in order, stopping at the first failure. - Use Case: When adding a new docs_memory tool to tools/mcp/docs-memory/mcp-server.js, follow this Skill to keep tools/list additive, preserve headerless stdio support, and record the new capability as a Skill for future agents. ## Quick Start Ask the agent to add a new tool to the docs-memory MCP server while following the mcp-memory-server-surgery procedure and running its validation ladder.