The Integration Problem MCP Solves
Every serious AI product hits the same wall. The model is smart, but it can't do anything until you connect it to your CRM, database, calendar, ticketing system and internal APIs.
The old way: write custom glue for each model and each app. Ten tools × three AI clients = thirty integrations to maintain.
The Model Context Protocol (MCP) — an open standard introduced by Anthropic in late 2024 and since adopted widely — fixes that. You expose your tools once, through an MCP server, and any MCP-compatible client can use them.
MCP in One Diagram
┌──────────────┐ MCP ┌──────────────────┐ ┌──────────────┐
│ AI client │ ◄──────────► │ Your MCP │ ───► │ CRM / DB / │
│ (agent, IDE, │ tools, │ server │ │ internal │
│ chat app) │ resources, │ (auth, schemas, │ │ APIs │
└──────────────┘ prompts │ permissions) │ └──────────────┘
└──────────────────┘
An MCP server exposes three kinds of things:
- Tools — actions the model can take (
create_invoice,search_leads) - Resources — data the client can read (a document, a record, a schema)
- Prompts — reusable templates the user can invoke
MCP vs Plain Tool Calling
You don't always need MCP.
| Situation | Use |
|---|---|
| One app, one model, a handful of tools | Plain function/tool calling in your backend |
| Same tools needed in several agents or clients | MCP server |
| You want customers to plug your product into their AI tools | MCP server (this is the big one) |
| Internal tools for a team using AI IDEs or desktop assistants | MCP server |
If you're a SaaS company in 2026, shipping an MCP server is becoming what shipping a public API was in 2015: the way other software — now including AI agents — integrates with you.
A Minimal TypeScript MCP Server
Using the official TypeScript SDK, a tool is a name, a schema and a handler:
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
const server = new McpServer({ name: "clinic-tools", version: "1.0.0" });
server.tool(
"find_open_slots",
"Find open appointment slots for a doctor on a given date.",
{ doctorId: z.string(), date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/) },
async ({ doctorId, date }) => {
const slots = await db.slots.findOpen({ doctorId, date });
return {
content: [{ type: "text", text: JSON.stringify(slots) }],
};
}
);
await server.connect(new StdioServerTransport());
Check the SDK docs for the exact API of the version you install — it evolves quickly. For remote servers, use the HTTP transport behind your normal auth layer instead of stdio.
Production Checklist
This is where most demos stop and real systems start.
1. Design tools around intents
Models choose tools by name and description. reschedule_appointment(appointmentId, newSlotId) beats exposing PATCH /appointments/:id with fifteen optional fields. Fewer, clearer tools → fewer wrong calls.
2. Write descriptions like documentation
Say when to use the tool, when not to, and what the output means. "Use only after the user has confirmed the new time" prevents a lot of accidents.
3. Validate everything
The model can and will send malformed arguments. Validate with Zod (or Pydantic in Python) and return a clear, structured error the model can recover from.
4. Scope permissions to the user
The MCP server should act as the signed-in user, with exactly their permissions — never as a superuser. Use OAuth for remote servers and map every call to a real identity.
5. Confirm destructive actions
Anything that sends, deletes, pays or publishes should require an explicit confirmation step from the human. Make it a two-step tool (prepare_refund → confirm_refund) if your client doesn't support confirmations natively.
6. Defend against prompt injection
Text returned by a tool — an email body, a web page, a support ticket — can contain instructions aimed at the model. Treat it as data, keep tool output clearly delimited, and never let a tool result alone trigger a high-risk action.
7. Idempotency and timeouts
Agents retry. Give write tools an idempotency key so a retried create_invoice doesn't bill twice. Put hard timeouts on every downstream call and return partial results rather than hanging.
8. Log and evaluate
Log every tool call with arguments, result size, latency and the user. Then build a small eval set — 30–100 realistic requests with expected tool sequences — and run it whenever you change tool names, descriptions or the model.
Where MCP Pays Off
- Clinic operations — front-desk staff ask an assistant "who's next in Dr. Shah's queue and is the 4pm slot free?" and it reads live data through scoped tools.
- Sales ops — agents search leads, log calls and draft follow-ups across a CRM without custom code per AI client.
- Engineering teams — AI IDEs get read-only access to internal docs, feature flags and error dashboards.
The Bottom Line
MCP turns "AI that talks" into "AI that works with your systems" — and does it in a way you build once. The protocol is the easy part; auth, permissions, validation and evals are what make it safe for production.
I build MCP servers and production AI agents on OpenAI, Claude and Gemini for teams in India, the USA, the UK and worldwide. Let's talk about yours.




