MCP for the Technical Use Case Screen
Explore how to design and defend an MCP server for Anthropic's Forward Deployed Engineer interviews. Understand server construction using the Python MCP SDK, testing without a model, and safe tool exposure. Learn to connect the server to Claude, handle errors, and respond to common interview probes to demonstrate practical deployment experience.
Anthropic’s technical use case screen centers on deploying Claude with MCP. Candidates who have only read about the protocol tend to describe it in general terms. Candidates who have built a server can explain where its tools come from, what Claude sees of them, how the server connects, and what happens when it fails. Interviewers look for that second kind of answer.
The Model Context Protocol (MCP) is the open standard Anthropic introduced for connecting AI applications to external tools and data. An MCP server exposes tools and data through the protocol, and an MCP client inside an application, such as an agent, discovers and calls them. MCP servers are also one of the deliverables Anthropic’s FDE posting names directly, so building one is core FDE work.
The examples build an expense policy server for the expense audit scenario, then test it, then connect it to Claude.
Building an MCP server in Python
The Python MCP SDK builds a server from ordinary functions. A function decorated with @mcp.tool() becomes a tool, an action Claude can call. A function decorated with @mcp.resource() becomes a resource, read-only data an application can load by its address. Each function’s type hints become its input schema, and its docstring becomes the description Claude reads.
The code below is the server file, expense_policy_server.py. The test client and the agent later in the lesson both start it by that name.
from datetime import datefrom mcp.server import MCPServerfrom mcp.server.mcpserver.exceptions import ToolErrorPOLICY_LIMITS_USD = {"meals": 75.00, "lodging": 350.00, "airfare": 2500.00}SUBMISSION_WINDOW_DAYS = 30mcp = MCPServer("expense-policy", log_level="WARNING")@mcp.resource("policy://travel-and-expense")def policy_summary() -> str:"""The company's travel and expense policy in brief."""return "Meals up to $75, lodging up to $350 per night, airfare up to $2,500. Submit receipts within 30 days."@mcp.tool()def get_policy_limit(category: str) -> dict:"""Return the per-expense limit in US dollars for one category. Valid categories are meals, lodging, and airfare."""if category not in POLICY_LIMITS_USD:raise ToolError(f"Unknown category {category}. Use one of: meals, lodging, airfare.")return {"category": category, "limit_usd": POLICY_LIMITS_USD[category]}@mcp.tool()def check_receipt_age(receipt_date: str, submitted_date: str) -> dict:"""Check whether a receipt was submitted within the 30-day window. Dates use YYYY-MM-DD."""try:days = (date.fromisoformat(submitted_date) - date.fromisoformat(receipt_date)).daysexcept ValueError:raise ToolError("Dates must use the YYYY-MM-DD format, for example 2026-10-05.")return {"days_between": days, "within_window": 0 <= days <= SUBMISSION_WINDOW_DAYS}if __name__ == "__main__":mcp.run()
Lines 3–4: We imported
MCPServerto build the server andToolErrorto report failures that Claude should read.Lines 6–7: We created the policy limits and the 30-day ...