Building an MCP Server with FastMCP
Unlock the complete study guide + 1,040 practice questions across 16 full exams.
Bundled into the existing Designing, Deploying and Managing Network Automation Systems premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- MCP: one protocol, any tool
- Three primitives: tools act, resources read
- Standing up a FastMCP server
- Defining a tool: the decorator wires it up
- Resources and prompts: read-only data and templates
- Choosing a transport: stdio local, HTTP remote
- Reading the stem: exam patterns and traps
MCP primitives: tool vs resource vs prompt
| Aspect | Tool | Resource | Prompt |
|---|---|---|---|
| What it is | Model-invoked action | Read-only data source | Reusable message template |
| Who controls it | The model calls it | The application supplies it | The user selects it |
| Side effects | Possible (it acts) | None (GET-like read) | None (returns text) |
| FastMCP decorator | @mcp.tool | @mcp.resource("uri") | @mcp.prompt |
| JSON-RPC method | tools/call | resources/read | prompts/get |
| Net-automation example | get_interface_status() | device://{hostname}/status | troubleshoot_interface |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.