Building MCP APIs and Servers

The Model Context Protocol as a control-plane API surface: the JSON-RPC foundation, tools versus resources versus prompts, transports, why tool design is API design, OAuth 2.1 authorization for remote servers, and the security surface that comes with letting a model call your infrastructure.

Overview

MCP as a control-plane API

The Model Context Protocol (MCP) is an open standard for connecting AI applications to external systems. A platform engineer needs it not because it is an AI topic, but because an MCP server that exposes infrastructure actions is a control-plane API with a non-human caller. Every question about authorization, blast radius, schema design and auditability still applies, with the difficulty turned up.

Key concepts

  • Host, client, server
  • Data layer and transport layer
  • Tools
  • Resources
  • Prompts
  • Stdio and Streamable HTTP
  • Discovery and statelessness
  • OAuth 2.1 for remote servers

Interview questions

  • Explain MCP to someone who builds APIs. What is it, and what is it not?
  • Walk me through the wire protocol from connection to a tool result.
  • What makes a good tool definition? Show me a bad one and fix it.
  • You are building an MCP server that can restart production services. What is the security model?
  • Where does prompt injection enter an MCP system, and what actually mitigates it?
  • Compare MCP with REST and gRPC. When would you not use MCP?

Sign up free to read the full topic

More DevOps topics

Start free on Cariara · Coding problems · System design studio