Module 02

AI Agents and Workflows

M02·AI Agents and Workflows

Build an MCP Agent

Build an MCP server that exposes portfolio data through resources, tools, and prompts. Connect an agent that discovers capabilities at runtime and manage the portfolio through the protocol.

Build an MCP Agent

Agents can reason and plan1, but without structured access to live data they mostly talk about work instead of doing it. You can hard-wire database queries into an agent, but that breaks down the moment you want to swap the backend, or add a new capability. The Model Context Protocol (MCP)2 fixes this with a shared interface built around three primitives: resources, tools, and prompts.

We'll build a portfolio management system that uses all three. The MCP server sits on top of SQLite and exposes five stock holdings, a cash balance, and a transaction log. A LangGraph agent connects over stdio, discovers what the server can do at runtime, and manages a ~$258k portfolio entirely through the protocol.

Tutorial Goals

  • Understand MCP's three primitives - resources, tools, and prompts
  • Build an MCP server with FastMCP backed by SQLite
  • Connect a LangGraph agent to the server via stdio transport
  • Load MCP Resources as agent context and discover tools at runtime
  • Run multi-turn conversations where the agent executes real trades

What is MCP?

Members onlyJoin 900+ members
Members only from here
This lesson is part of the full AI engineering roadmap. Here's what unlocking gives you.
What you unlock
  • 01All 6 modules · 40+ hands-on tutorials
  • 02Source code, repositories, and architecture diagrams
  • 03Portfolio artifacts: apps, APIs, eval reports, dashboards, capstones
  • 04Live sessions + every recording
  • 05Discord community access
  • 06Certificate of completion with public verification URL
Price·lifetime
$299$197·Pay once

price goes up August 1

30-day money-back guarantee. One email, full refund.

or
“Best educational investment in my ML/AI journey.”
Ana Clara Medeiros·AI Developer
Instant access after paymentSecure checkout · stripe

Footnotes

  1. Toolformer: Language Models Can Teach Themselves to Use Tools (Schick et al., 2023)

  2. Model Context Protocol

  3. SQLite Write-Ahead Logging

  4. Average Cost Basis Method (Investopedia)

  5. langchain-mcp-adapters

  6. Gorilla: Large Language Model Connected with Massive APIs (Patil et al., 2023)