Build your own MCP

I wrote about it, so I figured I should build one. A tiny, working MCP server — download it and add it to your favorite AI tool.

What it does: it hands your AI two small tools — roll some dice, and pull up a quick bio of me. Nothing mission-critical; the point is the pattern, not the party tricks.

Why

I wrote a post — You down with MCP? — arguing that MCP is the boring plumbing that makes the interesting agent stuff possible. Writing it left me with an itch: if this protocol is so foundational, how hard is it to actually build one myself? Turns out, not hard at all. So I built a tiny one to prove the point.

The gist

No LLM API key needed to run the server — it just exposes tools. Your client brings the model.

The whole server

That's not a teaser — this is the entire thing:

from mcp.server.fastmcp import FastMCP
import random

mcp = FastMCP("ryan-bowlin-starter")

@mcp.tool()
def roll_dice(sides: int = 6, count: int = 1) -> str:
    """Roll `count` dice with `sides` sides each; returns the rolls and total."""
    rolls = [random.randint(1, sides) for _ in range(count)]
    return f"Rolled {count}d{sides}: {rolls}  (total: {sum(rolls)})"

@mcp.tool()
def about_ryan() -> str:
    """A short bio for Ryan Bowlin and where to find his work."""
    return "Ryan Bowlin — Senior PM shaping decisions leaders bet on and building AI that gets it right. https://ryancbowlin.com"

if __name__ == "__main__":
    mcp.run()  # stdio transport by default

Download the server (.py) ↓

Add it to your tool

Drop this into your MCP client's config (paths and file name may vary by client), then restart:

{
  "mcpServers": {
    "ryan-bowlin-starter": {
      "command": "python",
      "args": ["/full/path/to/ryan-bowlin-mcp.py"]
    }
  }
}

Restart the client and your agent can now roll dice and, apparently, tell you about me. Swap in your own tools from there — the pattern is the whole point.

The takeaway

~30 lines, and any agent that speaks MCP can now use it. That's the argument from the post made concrete: the protocol is deliberately boring, which is exactly why it scales.

Want the why behind this — where MCP came from and why it matters? Read You down with MCP? Yeah, you know me!