Quick answer

The Model Context Protocol (MCP) is a JSON-RPC client-server standard that lets AI applications connect to external systems through reusable servers instead of bespoke integrations. Servers expose tools, resources and prompts over stdio (local) or Streamable HTTP (remote). It pays off when several clients share a capability, but needs vetting, per-user permissions, logging and human approval for writes.

Before MCP, every AI application that wanted to reach an external system wrote its own integration. Connecting an assistant to a database, a ticketing system and a file store meant three bespoke tool definitions, three authentication paths and three sets of code that only worked inside that one application. The Model Context Protocol exists to make that integration write-once and reusable.

The basic shape

MCP is a client-server protocol built on JSON-RPC. An MCP server exposes capabilities; an MCP client — an AI application, an IDE, a chat interface — connects to servers and makes their capabilities available to the model.

Servers expose three kinds of thing:

  • Tools — functions the model can invoke. Query a database, create an issue, send a message. These are the equivalent of function calling, but defined once on the server rather than in every client.
  • Resources — data the client can read. Files, records, documents, addressed by URI. Application-controlled rather than model-invoked.
  • Prompts — reusable templates the server offers, typically surfaced to the user as slash commands or actions.

The value is the standardisation. Write one MCP server for your internal ticketing system and every MCP-capable application can use it, without any of them knowing anything about your API.

A minimal server

import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = new Server(
  { name: "acme-orders", version: "1.0.0" },
  { capabilities: { tools: {}, resources: {} } }
);

server.setRequestHandler(ListToolsRequestSchema, async () => ({
  tools: [{
    name: "search_orders",
    description: "Search orders for the authenticated account. Returns up to 20 matches.",
    inputSchema: {
      type: "object",
      properties: {
        query:  { type: "string", description: "Order number, customer email, or product name." },
        status: { type: "string", enum: ["any", "pending", "shipped", "delivered"] }
      },
      required: ["query"]
    }
  }]
}));

server.setRequestHandler(CallToolRequestSchema, async (request) => {
  if (request.params.name !== "search_orders") throw new Error("Unknown tool");

  const results = await api.searchOrders(request.params.arguments);

  return { content: [{ type: "text", text: JSON.stringify(results) }] };
});

await server.connect(new StdioServerTransport());

The tool definition is the same design problem as any function calling schema: a description that says when to use it and when not to, unambiguous parameters, and identity resolved server-side rather than accepted as an argument.

Transports

  • stdio — the server runs as a local subprocess of the client. Simplest, no network exposure, and the right choice for anything touching local files or local credentials.
  • Streamable HTTP — the server is a remote service. Necessary for hosted, multi-user servers, and it brings all the usual concerns: authentication, authorisation, rate limiting, and the fact that the endpoint is reachable by anyone who finds it.

The distinction matters more than it looks. A local stdio server inherits the trust of the user running it. A remote HTTP server needs a real authorisation model, because "the model asked me to" is not an access control decision.

Where it genuinely helps

  1. Internal tooling reused across applications. One server for your deployment system, usable from an IDE assistant, a chat interface and an automation runner.
  2. Vendor integrations. A SaaS product shipping an MCP server means its customers can wire it into whatever AI application they already use, without that vendor building an integration for each.
  3. Local development context. Filesystem, git, database and log servers give a coding assistant grounded access to the actual project rather than guesses.
  4. Avoiding lock-in. Tool definitions live outside any one model provider's format.

Where it does not

MCP is a transport and discovery standard, not a reasoning improvement. It does not make a model better at deciding which tool to call, and a badly described tool is badly described regardless of protocol. If you have one application calling three internal APIs, native function calling is less machinery and works fine — MCP earns its keep when the same capability is consumed by more than one client, or by clients you do not control.

The security questions to answer first

This is the part that deserves real attention, because MCP moves tool definitions outside your codebase.

  • Where did this server come from? An MCP server is code running with your permissions. Installing one from an unvetted source is equivalent to installing an unvetted dependency, with the added property that it is specifically designed to be invoked by a model.
  • Tool descriptions are model-visible text. A malicious or compromised server can put instructions in a tool description — this is prompt injection with a distribution channel. Review the definitions your client is loading.
  • Combining servers combines risk. A server with read access to private data plus a server that can send messages externally is an exfiltration path, even when neither is malicious on its own. This composition risk is the one people underestimate.
  • Who is the request acting as? Tools must execute with the end user's permissions, resolved from an authenticated session — never with a shared service account that can see everything.
  • What is logged? Every tool call, its arguments and its result, with a trace ID. Without this you cannot answer what happened after an incident.
  • Confirm before consequential actions. Reads can be automatic. Anything that writes, deletes, sends or spends should require explicit human approval, and the approval should describe what will actually happen.

Treat an MCP server the way you would treat a new dependency with network access and the ability to be steered by untrusted text — because that is precisely what it is. Adopted deliberately, it removes a lot of duplicated integration work; adopted casually, it is a well-designed pathway for exactly the attacks the industry is still learning to defend against.

Frequently Asked Questions

What can an MCP server expose to an AI application?

An MCP server can expose tools, resources and prompts. Tools are functions the model can invoke, such as querying a database or creating an issue. Resources are data the client can read, addressed by URI. Prompts are reusable templates, typically surfaced to users as slash commands or actions.

What is the difference between stdio and Streamable HTTP in MCP?

With stdio, the server runs as a local subprocess of the client. It is the simplest option, has no network exposure and suits anything touching local files or credentials. Streamable HTTP is for remote, hosted, multi-user servers and brings authentication, authorisation and rate limiting concerns, because the endpoint is reachable by anyone who finds it.

When should I use MCP instead of native function calling?

Native function calling is less machinery when one application calls a few internal APIs. MCP earns its place when the same capability is consumed by more than one client, or by clients you do not control. It is a transport and discovery standard and does not make a model better at choosing tools.

Related Service

🤖 Business Process Automation

Business process automation with n8n, Zapier, Make, and AI — connect your tools, eliminate repetitive work, and let workflows run themselves around the clock.

Explore Business Process Automation →
Share this article
X Facebook LinkedIn