X UNIVERSITY

Lesson 6 of 13

Track 03 · Claude Code

MCP Servers from Scratch

By the end of this lesson you will be able to deploy Model Context Protocol (MCP) servers that securely connect Claude to external APIs and datasets. MCP is a universal JSON-RPC standard that exposes external capabilities to AI models as structured prompts, resources, and tools. Handling credentials means careful configuration, passing environment variables to local processes or using OAuth 2.0 for remote endpoints, so Claude accesses only permitted data. Deploying a server means choosing local standard input/output (stdio) for direct machine access, or remote HTTP for cloud services. Worked example: integrating an internal database. Launch a local stdio MCP server with the claude mcp add command, injecting your database password via an environment-variable flag. The server translates the schema into resources and tools so Claude can query tables natively. Practice task: run a pre-built local MCP server, connect it to Claude Code, and prompt Claude to fetch and summarize live data using its new tools.