Advanced
Local AI Agents: Hermes 3 and the Model Context Protocol
Build a fully local AI agent that uses real tools — no cloud, no API keys, no data leaving your machine. This track teaches the Model Context Protocol from first principles, shows you how to build MCP servers in Python, runs Hermes 3 locally via Ollama as the agent brain, and wires them together into a production research assistant.
01
Why Hermes 3 and MCP: The Local Agentic Stack
Most AI agent tutorials rely on cloud APIs, vendor SDKs, and data leaving your machine. This lesson introduces the two components that make a fully local agent practical in 2025: Hermes 3 as the tool-calling LLM and the Model Context Protocol as the standardised way to give it real capabilities.
›
02
MCP Architecture: Hosts, Clients, Servers, and Transports
Before writing any code, you need a clear mental model of how MCP components fit together. This lesson covers the three participants in every MCP interaction, what each is responsible for, the two transport mechanisms, and the JSON-RPC protocol that runs underneath — giving you the foundation to understand every piece of code in the rest of the track.
›
03
Environment Setup and Your First MCP Server
Set up the Python environment for MCP development, install FastMCP, and build a working MCP server from scratch. By the end of this lesson you have a server with one tool that can be called from MCP Inspector and from Python code.
›
04
Defining Tools: Schemas, Validation, and Error Responses
Tool definitions are what the LLM reads to decide what it can do and how to do it. This lesson goes deep on schema design, parameter validation, the two error types MCP distinguishes, and patterns for tools that need to maintain state across multiple calls.
›
05
Resources and Prompt Templates
Beyond tools, MCP servers can expose two other primitives: resources (read-only data the agent can inspect) and prompt templates (reusable instruction structures). This lesson covers both, when to use each one instead of a tool, and how to register them with FastMCP.
›
06
MCP Inspector and Official MCP Servers
Before connecting a server to an LLM, test it interactively with MCP Inspector — a browser-based client that lets you browse tools, call them manually, and inspect responses. This lesson also covers the official MCP server library, the filesystem and fetch servers the capstone uses, and how to run them without writing any code.
›
07
Running Hermes 3 with Ollama
Pull the Hermes 3 model, verify it runs correctly, and confirm that Ollama exposes it on the OpenAI-compatible API your agent code will use. This lesson focuses on the Hermes-specific setup steps that go beyond basic Ollama usage.
›
08
Hermes 3 Tool Calling: ChatML, tool_call, and tool_response
Hermes 3 uses a specific XML-based format for tool calling that is different from OpenAI function calling. This lesson covers the exact system prompt structure, how the model signals a tool call, how to inject the result back, and how to test the format directly against Ollama before building the full agent loop.
›
09
Discovering Tools: Connecting Python to MCP
The bridge between Hermes 3 and your MCP servers is a Python function that opens client connections, queries each server for its tools, and formats them into the system prompt Hermes expects. This lesson builds that bridge piece by piece.
›
10
The Agent Loop: Hermes + MCP in Action
All the pieces are ready. This lesson assembles them into a complete agent loop: start the servers, build the system prompt, call Hermes, parse the tool call, execute it via MCP, inject the result, and repeat until Hermes gives a final answer. By the end you have a working local agent you can query from the terminal.
›
11
Multi-Step Agents and Error Handling
Real agent tasks span multiple tool calls, hit errors, and require recovery logic. This lesson covers how Hermes handles tool execution errors, what to do when JSON parsing fails, how to add conversation memory across sessions, and how to connect to remote MCP servers over HTTP.
›
12
Capstone: A Production Local Research Agent
Assemble the complete local research assistant: Hermes 3 on Ollama, the official filesystem and fetch servers, your custom notes server, conversation memory, and error handling — all wired together into a production agent you can run from the terminal with any research query.
›
Enjoying this track?
Get weekly AI learning picks — prompts, tools, and tutorials every Monday.