· 2 min read · ← All posts
Ardan Labs Go MCP Agents

Field notes from working through example 17 of Ardan Labs’ Ultimate AI course by Bill Kennedy and Florin Pățan (Apache 2.0). My fork: PratikDhanave/ai-training. Thank you Bill and Florin for teaching this material — the patterns in this post are derived from the course; the production reflections at the end are mine.

What the example teaches

Model Context Protocol is Anthropic’s spec for how tools, resources, and prompts are exposed to LLMs in a portable way. The example shows:

What it looks like

Server side:

srv := mcp.NewServer("my-server")
srv.AddTool(mcp.Tool{
    Name:        "search_orders",
    Description: "Search the orders database by customer or date range.",
    Schema:      ordersSchema,
    Handler:     handleOrdersSearch,
})
srv.Listen("stdio") // or "tcp:8080"

Client side:

client := mcp.NewClient()
client.Connect("stdio", "./my-server")
tools := client.ListTools(ctx)

// pass `tools` to the LLM as available tools
// when the LLM emits a tool call, dispatch via the client

What I learned

MCP is the right abstraction at the right time. Before MCP, every LLM had its own tool-calling shape; integrating a new tool meant N adapters. MCP collapses it to one server, N clients.

The transport options matter. Stdio for local subprocess tools (Cursor’s filesystem tool). TCP for network services. The same MCP server speaks both with one config change.

Production connection

Genie ships both an MCP server (exposing finance domain tools) and an MCP client (consuming external tool servers). The Ardan example is the cleanest minimal pair I’ve seen for understanding the protocol. We extended it with the RFC 8693 token-exchange flow so MCP tool calls carry dual-identity audit; the base shape came from this lesson.


Credit & reference. This post is field notes on example 17 from Ardan Labs’ Ultimate AI by Bill Kennedy + Florin Pățan, licensed Apache 2.0. The original example: cmd/examples/example17-mcp/. My fork with notes: PratikDhanave/ai-training. Highly recommend the course for anyone building AI applications in Go — the material is rigorous and the Kronk + yzma + llama.cpp pipeline gives you hardware-accelerated local inference end-to-end. Thank you, Bill and Florin.

← Back to all posts