HASZB_AIHASZB_AI

Search across courses, lessons, glossary terms, prompts and tools.

Lab 09

MCP & Connectors

MCP is a protocol for connecting AI applications to tools and data through a client and a server, instead of a bespoke integration each time.

Conceptual model. A conceptual walkthrough. No connector is configured and nothing is authorised — this site has no access to your files, calendar, database or repositories, and could not gain it without you explicitly setting that up elsewhere.

Pick a connector

Example request: Summarise the contract in ~/documents

How the request travels

What this server exposes

  • read_file
  • list_directory
  • search_files

A server declares its tools; the client discovers them. The application decides which of them the model is actually allowed to call.

The permission question

A read tool over a whole home directory can surface anything in it, including credentials in dotfiles.

Connecting a system and granting full access to it are separate decisions. The useful question is never “can it connect?” but “what can it do once connected, and what happens if it is wrong?”

What a server declares

tool declaration
{
  "name": "read_file",
  "description": "Reads from a folder on disk.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "path": {
        "type": "string"
      }
    },
    "required": [
      "path"
    ]
  }
}

Note what is absent: no credentials, no endpoint, no network detail. The server holds all of that. The model only ever sees a name, a description and a shape.

Reading the result

What just happened
A request travels from the person to the application, out through an MCP client to a server that fronts A folder on disk, and the result comes back as text.
Why it matters
Before a shared protocol, every application wrote a bespoke integration for every tool — an N×M problem. A server written once can be used by any client that speaks the protocol.
Where you meet this
This is the machinery behind an assistant that can read your files or query your database. The connection is configured and authorised by a person; it is not something a model can arrange for itself.

Words that get confused

Model
Takes text, returns text. Cannot act on anything by itself.
Agent
A program that loops around a model, keeps state, and executes the actions it requests.
Tool
One capability the model may ask for, with a name and a declared set of arguments.
API
The interface of some external system. A tool usually calls one.
MCP client
The part of the AI application that speaks the protocol and connects out to servers.
MCP server
A process that exposes tools and resources from one system, in a standard shape any client understands.
Connector
The everyday word for a configured link to one external system.