Core Concept 1: What Is MCP & Building Your First Server
Start from first principles: see how an AI Host, Client, and Server talk like a USB-C plug—and build a local STDIO server without the two classic beginner bugs.
Start from first principles before choosing a cloud: understand how the Host, 1:1 Client, and Server work together, what Tools, Resources, and Prompts do, and how to avoid the two classic beginner pitfalls on a tiny local server.
1. Visual Analogy · MCP Is Like a USB-C Port for AI Apps
How does an AI assistant discover and run external tools without custom glue code for every app?
Welcome to MCP Foundry! Every module moves through 3 progressive steps (1. Intuition -> 2. Architecture -> 3. Hands-On Simulator), with clickable dotted Key Terms and a live dark Dev Inspector at the bottom. Before thinking about cloud gateways or containers, start with how MCP works on your own laptop: an AI app (the Host) creates a 1:1 Client connector that plugs into your Server to expose actions, read-only files, and prompt templates.
How this fits: Core Concept 1 (cloud-agnostic): Master the Host -> Client -> Server basics here first, using Step-by-Step mode, dotted Key Term tooltips, and the dark Dev Inspector below before moving into cloud-specific labs.
- Three roles work in a loop: Host (AI app) -> Client (1:1 protocol link) -> Server (your data or API wrapper).
- Tools run actions, Resources expose read-only data, and Prompts provide reusable instruction templates.
- Test locally with MCP Inspector first, never print debug text to stdout, and watch live frames in the Dev Inspector.
Before USB-C, every gadget needed its own proprietary charger and cable. Before MCP, connecting an AI assistant to a database, calendar, or API meant writing custom glue code for every pairing. MCP gives AI apps one standard plug so a server you build once works across compatible AI hosts and editors.
Why must a local STDIO MCP server send debug logs to stderr instead of stdout?
Engineering Scratchpad
Auto-saved per lab in mcp_foundry_v1_scratchpads
0 chars saved
Engineering Scratchpad
Auto-saved per lab in mcp_foundry_v1_scratchpads