Agents and tools · senior
MCP, memory and multi-agent systems
The Model Context Protocol is an open way to connect tools to AI apps. Memory design keeps long chats useful and cheap, and several agents are worth it only where separate contexts help.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- MCP is an open protocol (JSON-RPC 2.0) so any AI app can connect to any tool or data server the same way. A server exposes tools, resources (data attached as context) and prompts (templates the user picks).
- Transports: stdio for local servers and Streamable HTTP for remote servers. The old HTTP+SSE transport is deprecated.
- The current MCP version (2026-07-28) made the protocol stateless: no initialize handshake and no sessions. Many servers still run the 2025 versions, so the handshake is still common.
- Memory: keep recent turns word for word. Replace older turns with a running summary or, better, with extracted facts in a small structured state, such as size and budget.
- Summaries can drop details, so keep must-keep facts in structured fields. Long-term memory goes in a database or vector store, is visible and editable by the user, and is retrieved only when relevant.
- Append-only history keeps the cached prefix valid. Rewriting old turns breaks the cache.
- Several agents help when sub-tasks are separate, tools or permissions differ, or a fresh reviewer helps. Costs: more tokens, more latency, details lost in hand-offs and harder debugging.
- Use orchestrator and workers with narrow tools and a shared structured state. Start with one agent and split only where evals show a gain.
The red pen
Common traps: mistake → fix
Mistake: MCP replaces my own tool code
Fix: it is a connection standard; you still design and secure the tools.
Mistake: The model remembers earlier chats by itself
Fix: only what you send in the context exists for it.
Mistake: More agents give better results
Fix: they add cost and failure points; measure first.
Easy to hard
Questions interviewers ask, easy to hard
- What is MCP and what problem does it solve?
- What does an MCP server expose?
- Users say the assistant forgets their size in long chats. How do you design memory?
- Is five agents for travel booking a good idea?
- How do you debug a multi-agent run?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.