Skip to main content
Hieu Nguyen
Senior Software Engineer at OCB
View all authors

Model Context Protocol (MCP) Deep Dive: Building a Server in Go from Scratch

· 8 min read
Hieu Nguyen
Senior Software Engineer at OCB

You want your AI agent to query your database, check GitHub PRs, or search Notion docs. Until recently that required a custom integration for every model/tool pair — the classic N×M problem.

Enter the Model Context Protocol (MCP). Introduced by Anthropic in late 2024, MCP is an open standard built on JSON-RPC 2.0 that acts as a universal connector between AI assistants and external data or tools.

In this post, we skip the SDK and build an MCP server from scratch in Go — reading raw JSON-RPC payloads from stdin and writing responses to stdout. This forces you to understand exactly what the protocol requires.

RAG and AI Agents: The Architecture Behind Intelligent AI Systems

· 10 min read
Hieu Nguyen
Senior Software Engineer at OCB

LLMs can reason brilliantly — but they're frozen in time. They don't know what happened last week. They've never seen your company's private database. And when they don't know something, they might confidently make something up.

RAG and AI Agents are the two architectural patterns that solve this. One gives the LLM relevant context. The other gives it the ability to act. Together, they form the backbone of every serious AI product built in 2025.