Handle
Connecting…
Back to Workshop
Module 01 ~15 min

What are AI Agents & MCP?

Understand the big picture: what AI agents are, why they need tools, and how MCP connects them to the real world.

What You'll Learn

AI Agents

What makes an agent different from a chatbot

MCP Protocol

The standard for connecting AI to tools

Architecture

How the pieces fit together

What is an AI Agent?

An AI agent is an LLM (Large Language Model) that can take actions. Instead of just generating text, an agent can call functions, query APIs, read databases, and interact with the real world.

Think of it this way: ChatGPT can talk about the weather. An AI agent can actually check the weather forecast for you by calling a weather API.

Chatbot

  • Generates text responses
  • No access to external data
  • Knowledge frozen at training time
  • "I don't have access to real-time weather"

AI Agent

  • Generates text + calls tools
  • Connects to APIs, databases, services
  • Access to real-time data
  • "Let me check the weather in Oslo for you..."

The Agentic Loop

When an agent receives a question, it doesn't just answer — it reasons about what tools to use, calls them, and then synthesizes the results into a response. This loop is the core of every AI agent:

1. Receive

User asks: "What's the weather in Oslo?"

2. Reason

LLM decides: "I need the get_weather_forecast tool with location=Oslo"

3. Execute

Agent calls the MCP server: tools/call → get_weather_forecast(Oslo)

4. Synthesize

LLM combines tool results into a natural response: "It's 8°C and cloudy in Oslo today..."

What is MCP?

Model Context Protocol (MCP) is an open standard (released by Anthropic in 2024) that defines how AI agents discover and use tools. Think of it as "USB for AI" — a universal way to plug tools into any agent.

Before MCP, every AI framework had its own way of defining tools. MCP standardizes this with a simple protocol built on JSON-RPC 2.0:

tools/list

"What tools do you have?" — Returns a list of available tools with their names, descriptions, and input schemas.

tools/call

"Run this tool with these arguments" — Executes a specific tool and returns the result.

That's it. Two methods. An agent calls tools/list to discover what's available, then tools/call to use a tool. The beauty is that agents don't need to know about tools in advance — they discover them dynamically at runtime.

What We're Building

In this workshop, you'll build all three components of an AI agent system:

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   Web Service   │────▶│   AI Agent      │────▶│   MCP Server    │
│   (Port 8080)   │     │   (Port 8001)   │     │   (Port 8000)   │
└─────────────────┘     └─────────────────┘     └─────────────────┘
                              │                        │
                              ▼                        ▼
                         Gemini API             External APIs
                         (Gemini 3.5 Flash Lite)          (yr.no, NewsAPI)
        
MCP Server Exposes tools via JSON-RPC 2.0. You'll build this in Module 4.
AI Agent Orchestrates between the LLM and tools. You'll build this in Module 5.
Web UI Chat interface for testing. Provided for you — it just talks to the agent.

Key Concepts

JSON-RPC 2.0

A lightweight protocol for remote procedure calls. Every MCP message is a JSON-RPC request with jsonrpc, method, params, and id fields.

Tool Discovery

The agent doesn't hardcode tool definitions. It calls tools/list at startup and dynamically learns what tools are available. This means you can add tools to the MCP server without changing agent code.

Function Calling

Modern LLMs (GPT-4, Claude, Llama 3) can decide to call functions. You give the LLM a list of available functions and it returns structured JSON indicating which function to call and with what arguments.

How was this module?

Your feedback helps us improve the workshop.

Submitting as anonymous

Your handle is sent with this feedback; leave it blank in the header and the submission stays anonymous. Please keep personal data out of the comment too — no name, e-mail address or employer, yours or anyone else's.

Environment Setup