sethserver.com Subscribe
Robot with question mark thought bubble standing between wrench tool and document pages

When to write an MCP and When to Write a Tool

By Seth Black • Updated: January 15, 2026

Programming · 3 min read

Like this kind of writing? Get one email a week with notes on startups, AI, and the occasional strong opinion about Python: subscribe to the newsletter.

If you're building with LLMs, you'll eventually hit this question: do I write an MCP server or just write a tool? The answer is annoyingly, "it depends!".

Both work. One is a system boundary. The other is a function boundary. Picking the wrong one won't break anything, but it will make your codebase harder to maintain. And your future self will take it personally.

What's a Tool?

A tool is usually just a callable function in your app. Small surface area. Fast to ship. Easy to test. If your model needs to "do a thing" inside one codebase, tools are great.

Write a tool when:

import requests

def get_weather(city: str) -> dict:
    # This weather function is about as simple as it gets.
    # Real tools will have retries, better error messages, and maybe caching,
    # but the idea is the same.
    r = requests.get("https://api.example.com/weather", params={"q": city}, timeout=5)
    r.raise_for_status()
    return r.json()

Tools also fit nicely into your existing app telemetry. If you can unit test it like normal code and ship it with your app, that's a strong hint it should stay a tool.

What's an MCP Server?

An MCP server is a separate service that exposes tools/resources in a standardized way. It's what you reach for when you need reuse, separation, or governance.

MCP servers sound complicated, but they're really just HTTP endpoints with a standard interface. The complexity usually comes from everything around it: auth, logging, rate limits, deployment, and the fact that networks enjoy failing at the worst times.

Write an MCP server when:

Think of it this way - if multiple teams need the same capability, that's an MCP server.

Here's a tiny sketch:

# mcp_server.py (sketch)
from fastapi import FastAPI

app = FastAPI()

@app.post("/tools/weather")
def weather(payload: dict):
    city = payload["city"]
    # In real life you'd validate inputs, enforce auth/policy,
    # log access, and handle failures without crying.
    return {"city": city, "temp_c": 22.1}

Clients call it over the network, and you put it behind your normal security layers.

The trade-offs (what you'll learn after your third refactor)

A quick consulting story: I've seen teams spin up MCP servers for capabilities that could have been a 10-line function. The ops overhead ate them alive. Suddenly they weren't "building AI." They were debugging why staging can't talk to prod because someone rotated a token and didn't tell anyone. Classic.

Here's a simple heuristic:

A practical decision checklist

Ask:

If you answered "yes" to most of those, you probably want an MCP server.

For more context, see: Model Context Protocol

Start with tools. When you find yourself copying the same tool across three repos, that's when you know it's time for an MCP server. Much like choosing the right machine learning model, the key is matching the solution to your actual needs rather than reaching for the most complex option.

-Sethers

Share this post
Newsletter

One email, once a week.

Notes on databases, systems, and the occasional strong opinion about Python. No spam, unsubscribe anytime.

Seth Black
Written by

Seth Black

Engineer and founder based in Texas. Writes about databases, AI, and running things in production. Embeds in small teams as lead engineer.

More from Programming

View all →
Programming

What's the Differences Between Relational, NoSQL, Vectors, and Caches

Apr 14, 2026
Programming

Git and Source Control in AI Land

Apr 14, 2026
Programming

Domains, DNS, and why it feels fragile

Apr 14, 2026