AI Fundamentals — How Modern AI Works›10 · MCP: connecting AI to systems
Learning Hub / AI Fundamentals & AI-Assisted Engineering / AI Fundamentals — How Modern AI Works

Lesson 10 of 13 · AI that takes action

MCP: connecting AI to systems

The Model Context Protocol (MCP) is an open standard for connecting AI applications to tools and data. Instead of every AI app writing its own integration for every system, a system offers one MCP server and any MCP-capable app can use it. The parts (host, client, server), what a server can offer, a worked example, and the security questions to ask before connecting one.

Practitioner
Key wordsMCPModel Context ProtocolMCP serverMCP clienthosttoolsresourcespromptsintegrationpermissionstrust

The integration problem

Lesson 8 showed that a model can use tools that an application defines. Without a standard, every AI application has to build its own connector for every system:

WITHOUT a standard                       WITH MCP
chat app   ─┬─ GitHub connector           chat app  ─┐            ┌─ GitHub MCP server
            ├─ Jira connector             IDE       ─┼── MCP ─────┼─ Jira MCP server
            └─ database connector         agent     ─┘            ├─ database MCP server
IDE        ─┬─ GitHub connector  (again)                          └─ your own MCP server
            └─ Jira connector    (again)
agent      ─── … (again)                  each system written once, usable everywhere

The Model Context Protocol (MCP) is an open standard for this connection, now supported by many AI applications and tools.

Before USB, every device had its own plug, and every computer needed a different socket for each one. USB made one standard plug. MCP is a standard plug for AI: build one MCP server for your system, and any AI app with an MCP socket can use it.

The parts

  • Host: the AI application a person uses (a desktop chat app, an IDE, a coding agent).
  • MCP client: the piece inside the host that connects to one server.
  • MCP server: a small program that wraps a system and offers:
  • tools: actions (search_tickets, get_pod_logs, create_issue);
  • resources: things to read (a file, a record, a schema);
  • prompts: reusable prompt templates.

A server can run locally on your machine (started by the host) or remotely over HTTP with proper sign-in.

A worked example

Person (in a chat app): "Which of my open tickets mention the VPN?"

1. The host has a ticketing MCP server connected. At start-up it asked the
   server "what tools do you have?" → search_tickets, get_ticket, add_comment
2. The model sees those tools and calls:  search_tickets(query="VPN", assignee="me", status="open")
3. The host passes the call to the MCP server, which queries the ticket system
   using the person's own credentials, and returns 3 tickets
4. The model answers with a short summary of the 3 tickets
5. If the model wanted add_comment, the host would ask the person to approve first

The model, the host and the protocol are all separate, so the same ticketing server works in the chat app, the IDE and an agent.

Security: an MCP server is code you trust with access

Risk Example Defence
Malicious or careless server A copied server sends data elsewhere Install from trusted sources, review, pin versions
Too much access Server holds an admin token Least-privilege, per-user credentials, read-only where possible
Prompt injection through content A ticket says "ignore your instructions and…" Treat tool results as data; approvals for writes (lesson 12)
Unsafe actions Model calls delete without asking Host requires approval for write tools
No audit trail Nobody knows what was done Log tool calls on the host and the server

A good starting rule: connect read-only servers first, with your own scoped credentials, and turn on write tools one at a time with approval.

Recap

  • MCP standardises how AI applications connect to tools and data.
  • Host (the app) → client → server (wraps a system and offers tools, resources and prompts).
  • Build a system's server once; any MCP-capable app can use it.
  • A server runs with your access: trust the source, limit permissions, approve writes, log calls.

This site is a public version of my personal engineering knowledge hub. It intentionally excludes confidential company information and internal operational details.