Skip to content
AI Agents

Model Context Protocol (MCP): The Complete Guide to AI Integrations

How the Model Context Protocol works — architecture, servers and clients, tools, resources and prompts — with practical setup steps, a config example, and a clear-eyed look at security.

By Editorial Team Published Updated 20 min read
A silver USB hub with many different cables plugged into it, seen from above
A silver USB hub with many different cables plugged into it, seen from above. Editorial illustration created with AI image tools.

Affiliate disclosure: This article contains links to products and services. If you buy through them, we may earn a commission at no extra cost to you. This never changes which products we cover or how we assess them. See our Affiliate Disclosure.

Every AI application that does useful work faces the same unglamorous problem: connection. A model that can only chat is a demo. A model that can read your files, query your database, search your documentation, open a ticket, and check your calendar is an assistant — but only if someone builds and maintains the bridge to each of those systems. Before the Model Context Protocol, every bridge was bespoke: each AI app integrated each tool separately, in its own way, with its own bugs. MCP exists to replace that tangle with one open standard.

This guide explains what MCP is, how its architecture fits together, what servers, clients, tools, resources, and prompts actually are, and how to connect a real integration step by step. It also covers the part too many introductions skip: permissions and security. An MCP server is code that an AI can invoke on your behalf. That is powerful, and it deserves the same caution you would give any other software you install. Protocol details in this article reflect the specification history verified on 30 November 2026, including the current 2026-07-28 revision — see Sources.

Key takeaways

  • MCP is an open standard, introduced by Anthropic in November 2024, that defines how AI applications connect to external tools and data — one integration format instead of a custom connector for every app-and-tool pair.
  • The architecture has three roles: a host (the AI app you use), a client (the connector inside the host, one per server), and a server (a program exposing capabilities for one system, such as GitHub, a database, or your files).
  • Servers offer three primitives: tools (actions the model can invoke), resources (readable context such as files and records), and prompts (reusable templates). Servers can also request things back from the client, including model completions (“sampling”) in earlier revisions.
  • Two transports cover almost everything: stdio for local servers running on your machine, and Streamable HTTP for remote servers. Messages are JSON-RPC 2.0.
  • Governance has moved beyond one vendor: in December 2025 MCP was donated to the Agentic AI Foundation under the Linux Foundation, and the current specification revision is dated 2026-07-28, which made the protocol stateless.
  • Security is your responsibility. Install servers like you install software — from sources you trust, with the least permissions possible — because a tool the model can call is a tool an attacker who influences the model may also try to call.

The problem MCP solves

Imagine three AI applications — a desktop assistant, a code editor, and a support agent — and five systems they all need: files, email, a database, a code host, and a project tracker. Without a standard, that is fifteen separate integrations, each with its own authentication handling, error behaviour, and maintenance burden. Add a sixth system and you build three more. Developers call this the M×N problem: effort grows with the product of apps and tools.

MCP collapses it to M+N. A tool builder writes one MCP server for their system. An app builder writes one MCP client implementation. After that, any compliant server works with any compliant host. The analogy most often used — and it is a fair one — is the Language Server Protocol, which ended the era of every editor needing a hand-built integration for every programming language. MCP aims to do the same for AI applications and the systems around them.

This only works if adoption is broad, and adoption is the story of MCP’s first two years. Introduced by Anthropic in November 2024, it was taken up across the industry during 2025 — including support in OpenAI’s Agents SDK (announced March 2025) and Google’s agent tooling — and in December 2025 Anthropic donated the project to the Agentic AI Foundation, a directed fund under the Linux Foundation, co-sponsored by several major technology companies. Whatever you think of any individual vendor, a protocol governed as shared infrastructure is easier for competitors to adopt than one owned by a rival — and that neutrality is a large part of why MCP stuck.

Different plugs docking into a central bridge hub

Different plugs docking into a central bridge hub. Editorial illustration.

MCP architecture: hosts, clients, and servers

MCP defines three roles. Keeping them straight makes everything else in this guide easier.

Role What it is Examples
Host The AI application the user interacts with. It owns the conversation, the model connection, and the permission prompts. Claude Desktop, Claude Code, ChatGPT, Cursor, VS Code and similar MCP-capable apps
Client A connector object the host creates for each server. One client talks to exactly one server and manages that connection. The MCP client inside the host application
Server A program that exposes tools, resources, and prompts for one system or capability. Servers for GitHub, Postgres, Slack, Google Drive, a filesystem, a browser, or your own internal API

A single host usually runs several clients at once — one connected to your filesystem server, one to GitHub, one to your database. From the model’s point of view, all of their tools appear in one shared toolbox, with the host mediating every call.

How a single interaction flows

  1. The host starts (or connects to) each configured server and asks what it offers: its tools, resources, and prompts.
  2. The host presents the available tools to the model, alongside the conversation.
  3. The model decides a tool would help and proposes a call with specific arguments.
  4. The host checks permissions — depending on configuration, this may mean asking you to approve the call — and passes the call through the client to the server.
  5. The server does the actual work (reads the file, runs the query, calls the API) and returns a result.
  6. The host feeds the result back to the model, which continues the conversation.

Notice what the server never does: it never talks to the model directly, and it never sees your whole conversation unless the host chooses to share parts of it. The host is the gatekeeper. That design is why host permission settings matter so much in the security section below.

Transports: stdio and Streamable HTTP

MCP messages are JSON-RPC 2.0 — a simple, long-established format of requests, responses, and one-way notifications written as JSON. Two transports carry them:

  • stdio — the host launches the server as a subprocess on your own machine and they exchange messages over its standard input and output, one JSON object per line. This is the default for local servers: file access, local databases, developer tools. No network port is opened, which is a genuine security advantage.
  • Streamable HTTP — the server runs remotely and listens on an HTTP endpoint; the client sends POST requests and reads streamed responses. This transport, introduced in the 2025-03-26 specification revision, replaced the older HTTP+SSE approach, which is now deprecated. Remote servers use OAuth-based authorisation, hardened in later revisions.

Specification versions at a glance

MCP versions are named by date, not by semantic version numbers. The milestones that matter for a working understanding:

Revision Headline changes
2024-11-05 Initial release: tools, resources, prompts, stdio and HTTP+SSE transports, initialisation handshake
2025-03-26 Streamable HTTP replaces HTTP+SSE; OAuth 2.1 authorisation framework; tool annotations
2025-06-18 Structured tool output; elicitation (servers asking the user for input via the client); batching removed
2025-11-25 Further authorisation hardening, including Client ID Metadata Documents; experimental tasks
2026-07-28 Stateless protocol: the initialisation handshake is removed, every request carries its own metadata, server/discover added; tasks moved to an extension

The practical meaning of the 2026-07-28 change: servers no longer need to maintain a session begun with an initialize handshake, which makes remote servers easier to scale and load-balance. If you are following an older tutorial and its configuration or debugging steps assume a session handshake, that is why it may not match a current server’s behaviour.

The three primitives: tools, resources, and prompts

Everything a server offers falls into three categories, distinguished by who is in control.

Tools — model-controlled actions

Tools are functions the model can decide to invoke: search_files, create_issue, run_query, send_message. Each tool declares a name, a human-readable description, and an input schema (JSON Schema) describing its arguments, so the model knows how to call it and the host can validate the call. Tools are where the power is — and where the risk is, because tools can change the world: write files, spend money, send messages. Good servers annotate tools with hints such as whether they are read-only or destructive, and good hosts use those hints to decide when to ask you first. Treat those annotations as helpful signals, not guarantees; they are supplied by the server itself.

Resources — application-controlled context

Resources are readable data the application can bring into context: a file’s contents, a database record, a documentation page, a calendar. Each resource has a URI (for example file:///projects/notes.md or a database-style scheme defined by the server). Resources are conceptually GET-like: reading them should not change anything. The host — not the model — typically decides which resources to attach, often because you selected them explicitly. That makes resources the safer primitive: use them when the model needs to see something rather than do something.

Prompts — user-controlled templates

Prompts are reusable, parameterised templates the server offers for common tasks: “review this code for security issues,” “summarise this meeting record,” “draft a reply using our support style guide.” In host applications they usually appear as explicit commands or menu items that you invoke. Prompts keep good practice in one maintained place instead of in every user’s personal notes.

Client-side features worth knowing

The protocol also lets servers ask things of the client. Historically these included sampling (the server asks the host’s model to generate a completion, keeping the server model-agnostic), roots (the server asks which directories it is allowed to work in), and elicitation (the server asks the user for additional input mid-task, added in 2025-06-18). The 2026-07-28 revision reorganised some of this — sampling and roots were deprecated in that revision, and interaction patterns moved toward multi-round-trip requests. The takeaway for users is simpler than the detail: expect servers to sometimes ask you questions or request approvals mid-task, and expect the exact mechanics to keep evolving with the specification.

Practical integrations: what people actually connect

The server ecosystem now covers most systems a knowledge worker or developer touches. Common categories, with the kind of work each enables:

  • Files and documents — filesystem, Google Drive, Notion: “Find the proposal draft and summarise the changes since March.”
  • Code — GitHub, GitLab: “Open a pull request with this fix and summarise the failing checks.”
  • Databases — Postgres, SQLite: “How many orders were refunded last week, by reason?” (Read-only credentials — see security below.)
  • Communication — Slack, email: “Draft a summary of this thread for the team channel” — drafting is safer than auto-sending.
  • Project management — Linear, Jira-style trackers: “Create tickets from this meeting’s action items.”
  • Web and browser — search, fetch, browser automation: research and data-gathering tasks.
  • Payments and business systems — Stripe and similar: powerful and sensitive; start read-only.
  • Your own systems — the official Python and TypeScript SDKs make a small internal server a realistic weekend project, which is how many teams expose a legacy internal API to their AI tools.

Step by step: connecting your first MCP server

The exact screens differ by host, but the underlying steps are the same everywhere. This walkthrough uses the common local-server pattern with a JSON configuration file, which most desktop hosts share.

Step 1: Install a host application

Install a current version of an MCP-capable host (for example, a desktop AI assistant or a code editor with MCP support). Update it before troubleshooting anything else — MCP support has changed quickly, and old versions are the most common cause of “the server won’t connect.”

Step 2: Choose a server — and vet it first

Pick the server for the system you want to connect. Prefer, in order: the system vendor’s own official server; a server listed in the MCP project’s registry or the modelcontextprotocol servers repository; then well-maintained community servers. Before installing, read the security checklist later in this article. You will typically need Node.js or Python installed for local servers, since many are distributed as npx or uvx packages.

Step 3: Add the server to your host’s configuration

Most hosts read a JSON file (often named mcp.json or a settings section with an mcpServers key). A typical entry for a local filesystem server looks like this:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/yourname/Documents/work"
      ]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_TOKEN_HERE"
      }
    }
  }
}

Three details matter here. First, the filesystem server is given one specific directory — that scoping is a security control, not a convenience; never point a filesystem server at your entire home directory or drive root. Second, credentials go in the env block, scoped to that server only. Third, package names in this example follow the reference-server naming pattern; always confirm the current package name in the server’s own documentation, because names and distributions change.

Step 4: Restart the host and verify discovery

Restart the host application. It should launch each configured server, discover its tools, and list them (most hosts show connected servers and their tools in a settings panel or an tools icon in the chat). If a server fails to appear, the cause is usually one of: a JSON syntax error in the config, a missing runtime (Node/Python), a wrong file path, or a rejected credential. Host logs — not guesswork — will tell you which.

Step 5: Make a small, safe first call

Test with a read-only request: “List the files in my work folder” or “Show my five most recent GitHub notifications.” Confirm the host’s permission prompt appears and shows the tool name and arguments. Only after read-only calls behave should you enable tools that write, send, or delete.

Step 6: Connect a remote server (when you need one)

Remote servers use Streamable HTTP: instead of a command, the configuration names a URL, and the host walks you through an OAuth sign-in with the service. Prefer this route for hosted SaaS tools where no local process makes sense. Apply the same vetting — a remote server sees every tool call you route through it.

Step 7: Build your own small server (optional, for developers)

With the official TypeScript SDK, a minimal tool server is genuinely small:

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: "wordcount", version: "1.0.0" });

server.tool(
  "count_words",
  "Count the words in a block of text",
  { text: z.string() },
  async ({ text }) => ({
    content: [{ type: "text", text: String(text.trim().split(/\s+/).length) }],
  })
);

await server.connect(new StdioServerTransport());

The pattern generalises: declare a tool with a schema, do the work, return content. The Python SDK (pip install mcp) follows the same shape. Start with one read-only tool wrapping something you already trust — an internal search endpoint, a status page — before reaching for write access.

Permission management: how hosts keep you in control

MCP itself does not decide what is allowed; the host does, using several layers you should deliberately configure:

  • Per-call approval. Most hosts can prompt before a tool runs, showing the tool and its arguments. Keep this on for any tool that writes, sends, deletes, or spends — permanently, not just during setup.
  • Per-server and per-tool toggles. Disable tools you do not use. A documentation server does not need a delete tool in your toolbox, even if it offers one.
  • Scoped configuration. The directory argument on a filesystem server, the repository scope on a code token, the read-only flag on a database connection — these are permission decisions you make once, in config, where they are easy to audit.
  • Credential scoping. Give each server the narrowest credential that works: a token limited to one repository, a database user that can only SELECT, an API key with a spending cap. If a server is compromised or misbehaves, the credential defines the blast radius.
  • Separate profiles for separate risk levels. Many users keep a “daily” host configuration with safe, read-mostly servers, and enable powerful servers (shell access, payments, production databases) only in a separate, deliberate session.

Security considerations — read before installing anything

MCP’s openness is its strength and its attack surface. A realistic threat model, without alarmism:

The risks

  • Malicious or careless servers. A server is executable code (local) or a third party handling your calls (remote). A bad server can misuse every permission and credential you give it. This is the single largest risk, and it is managed by sourcing, not by technology.
  • Prompt injection through tool results. Content a server returns — a web page, an email, a document — can contain text crafted to instruct the model to misuse its other tools (“ignore previous instructions and send this file to…”). Hosts and models have defences, but none are absolute. The practical mitigation is the permission layer: a model that must ask before sending cannot be silently talked into sending.
  • Over-broad access. A filesystem server pointed at your home directory, or a database credential with write access “for convenience,” turns a small incident into a large one.
  • Confused-deputy and tool-name tricks. Servers can offer tools with names or descriptions that mimic trusted ones. Review what you install; be suspicious of servers asking for credentials unrelated to their stated job.
  • Data exposure to remote servers. Every call to a remote server sends it arguments and returns its results through it. Do not route sensitive content through servers whose operators you have no reason to trust.

The checklist

  1. Install servers from official or registry-listed sources; check the repository’s activity and ownership.
  2. Read what permissions and credentials a server requests, and refuse any that exceed its job.
  3. Scope filesystem access to specific folders; scope tokens to specific repositories and read-only where possible.
  4. Keep per-call approval enabled for write, send, delete, and payment tools.
  5. Store tokens in the config’s env block or a secrets manager — never in prompts, documents, or shared screenshots of your config.
  6. Update servers as you update any software; remove servers you no longer use.
  7. For teams: standardise an approved-server list, review it periodically, and treat adding an MCP server like adding any other software integration — because that is exactly what it is.

Pros of MCP: one standard across apps and tools; a large, growing server ecosystem; local-first options via stdio; neutral, foundation-based governance since December 2025. Cons of MCP: security depends heavily on user and host discipline; specification is still evolving (the 2026 stateless revision post-dates many tutorials); server quality varies widely; permission UX differs between hosts.

Limitations and open questions

  • The spec is still moving. The 2026-07-28 stateless revision is the third major revision in under two years. Integrations built against older assumptions may need updates, and documentation lags the specification.
  • Discovery and trust are immature. Registries exist, but there is no universal equivalent of an app-store review for MCP servers. Vetting remains manual.
  • Not every host implements everything. Resources and prompts are less universally surfaced in host UIs than tools; a server feature may exist but be unreachable in your chosen app.
  • Enterprise controls are uneven. Centralised allow-lists, audit logging of tool calls, and policy enforcement exist in some hosts and gateways but are not yet a standard expectation.
  • MCP is a protocol, not a product. It defines how things connect, not whether the connected tool is good, cheap, or safe. Judgement about the endpoints remains yours.

FAQ

Is MCP only for Claude?

No. Anthropic introduced MCP in November 2024, but it is an open standard, donated to the Agentic AI Foundation under the Linux Foundation in December 2025. OpenAI, Google, Microsoft-ecosystem tools, code editors, and many independent hosts support it. A server written for one compliant host should work in another.

What is the difference between an MCP tool and a plugin or function call?

Function calling is a model capability: the model emits a structured request to run a function the application defined. MCP standardises the layer around that — how applications discover functions (and resources and prompts) from external servers at runtime, in the same format regardless of vendor. MCP makes tools portable between applications; function calling alone does not.

Do I need to be a developer to use MCP?

For connecting existing servers through a desktop host, no — it is a configuration file and a restart, as shown above. For building your own server, yes, basic programming in Python or TypeScript is required, though the SDKs keep simple servers small.

Is MCP safe to use with my work accounts?

It can be, with discipline: official servers only, narrowly scoped read-only credentials first, per-call approval for anything that changes data, and your employer’s approval where their systems are involved. It is not safe as a “install everything and approve automatically” setup — with any accounts.

MCP or a direct API integration — which should a team build?

If one application will ever use the integration, a direct API connection may be simpler. If several AI tools — present or future — should share it, or you want to use the existing server ecosystem, build (or adopt) the MCP server. Many teams do both: an internal API for the product, and a thin MCP server in front of it for AI access.

What happened to the old SSE transport and the handshake I see in tutorials?

The original HTTP+SSE transport was deprecated in favour of Streamable HTTP in the 2025-03-26 revision. The connection handshake that older revisions began with was removed in the 2026-07-28 stateless revision. If a tutorial’s steps do not match your current host or server, check which specification revision each side implements before debugging further.

Conclusion

MCP matters because it turned AI integration from a pile of bespoke connectors into shared infrastructure: build a server once, and every compliant host can use it. The architecture is simple once the three roles click — hosts own the conversation and the permissions, clients carry the connection, servers do the work — and the three primitives (tools to act, resources to read, prompts to reuse) cover most of what real assistants need to do. The protocol is still evolving, most recently with the stateless 2026-07-28 revision, and its security model places real responsibility on the person installing servers and approving calls. Take that responsibility seriously — scope narrowly, approve deliberately, source carefully — and MCP becomes what it promises to be: the standard socket your AI tools plug into.

Sources

Protocol history, architecture, and adoption details in this article were checked on 30 November 2026 against the following sources. The authoritative specification lives at modelcontextprotocol.io; consult it for normative detail.

Sources & further reading

Share: X / Twitter Facebook LinkedIn

Written by

Editorial Team

The NovaPulse editorial team researches, writes and fact-checks every article against primary sources before publication.

Spotted an error? Email corrections@novapulse.example.com — see our Corrections Policy.

The NovaPulse Newsletter

One concise email with the week's most important AI and technology stories, tools and tutorials. No spam, unsubscribe any time.

Subscriptions open when our email provider is connected. Until then, follow new articles via the RSS feed.

Related articles