How do you write your own MCP server?
Essence
You need your own MCP server when the team has repetitive actions an agent should perform reliably and consistently: checking translations in a String Catalog, listing simulators, calling an internal API, looking up a feature flag. Instead of explaining every time which script to run and how to parse its output, you package it as a tool with a clear name, description and argument schema.
A minimal server is 30–50 lines. The hard part isn't the protocol (the SDK handles it) but designing good tools.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep