InterviewKata
AI engineering · Module 10 of 21 · Level 3: Configure your tools

MCP: connecting tools and data to any agent

Your agent can read files and run commands. But your work also lives in GitHub, Jira, Sentry, databases and internal APIs. The Model Context Protocol (MCP) is the open standard that plugs those systems into any AI tool, so one integration works in all five tools in this track.

1. The idea

Before USB, every printer, mouse and camera needed its own special port and cable. Now one plug fits everything: any device works with any laptop. MCP does that for AI tools. A database team builds one MCP server, and it works in Claude Code, Antigravity, Copilot, Cursor and Codex.

MCP has three roles:

A server can offer three kinds of things:

Tools

Actions the model can call, exactly like Module 06's tools: create_issue, run_query. Most servers are mainly tools.

Resources

Data to read: a file, a table schema, a document. In Claude Code you can reference them with @server:resource.

Prompts

Ready-made instructions or workflows the server provides, which you can pick in the host.

Servers connect in one of two ways: stdio (the host starts the server as a local program) or Streamable HTTP (a remote server at a URL, usually with sign-in). The current specification (version 2026-07-28) also defines optional extensions, such as long-running tasks and interactive "MCP Apps".

2. How it works

Many hosts, many servers, one protocol. The model still only writes tool requests (Module 06); MCP standardises how the host discovers and calls them.

Step through what happens when you ask an agent to look at a production error, with a Sentry MCP server connected.

3. Try it yourself: one server, five config files

The server is the same everywhere; only the config file differs. Describe a server and get the setup for each tool. Secrets always come from environment variables, never typed into the file.

4. Why it matters at work

Pick integrations by the job, and start small:

JobTypical serverTip
Issues and pull requestsGitHub, GitLabA command-line tool the agent already runs (gh) is often simpler and cheaper than a server.
Tickets and planningJira, LinearRead and comment first; create and transition later.
Production errorsSentry, DatadogRead-only; great for "find the cause of this error".
DatabasesPostgres, MySQLA read-only user on a non-production copy. Never production write access.
UI checksPlaywright and browser serversLets the agent look at its own UI work.
DocumentationDocs search serversGrounding (Module 03) that cuts invented APIs.
Your own systemsYour MCP server (Module 16)Start with two or three read-only tools.
  1. Prefer official servers from the vendor of the system, found through the official MCP registry or the vendor's docs.
  2. Every server costs context. Its tool descriptions ride along on every request (Module 02). Connect what this repository needs.
  3. Least privilege. Scoped tokens, read-only database users, one repository rather than the whole organisation.
  4. Approve writes deliberately. Keep create, merge, delete and send tools on "ask".
  5. A server is code you run. Review it like a dependency, pin its version, and test it outside the agent with the MCP Inspector first.
  6. Server output is untrusted. An issue, web page or error message returned by a server can contain prompt-injection text (Module 18).

5. In your five tools

Same servers, different config files. Checked October 2026.

ToolAdd a serverShared with the teamManage
Claude Codeclaude mcp add NAME -- COMMAND or claude mcp add --transport http NAME URL--scope project writes .mcp.json (commit it); local and user scopes stay private/mcp: status, sign-in, tools
Antigravity CLIEdit mcp_config.json.agents/mcp_config.json in the workspace; ~/.gemini/config/mcp_config.json for you/mcp
GitHub Copilot (VS Code)Add to mcp.json (key servers; each needs a type).vscode/mcp.json in the workspaceThe MCP servers view and the tools picker
CursorEdit mcp.json (key mcpServers), or install from the marketplace.cursor/mcp.json in the projectCursor settings: Tools & MCP
Codex CLIcodex mcp add NAME -- COMMAND or codex mcp add NAME --url URL[mcp_servers.NAME] in config.toml/mcp

6. Remember it

Memory hook: "USB-C for AI tools"One standard plug. Build or install a server once, and it works in every tool that speaks MCP. Like any device you plug in, check what it can do before trusting it.
How this hook works: what “USB-C for AI tools” means

What the slogan means, phrase by phrase

“USB-C”
A single standard connector that replaced dozens of special ones. MCP is that standard for connecting systems to AI apps: one protocol instead of a custom integration per tool.
“for AI tools”
The laptop is the host (Claude Code, Cursor…); the devices are MCP servers (GitHub, Postgres, Sentry). Any device fits any laptop.
Implied: check before you plug in
A USB stick from a stranger can be dangerous. A server is code running with your permissions: install from trusted sources, scope its access, approve its writes.

Why this picture fits: it captures both the value (portability: build once, use everywhere) and the risk (anything you plug in runs with your access), the two ideas you need when you decide which servers to connect.

The story → the concept

USBMCP
The laptopThe host: Claude Code, Antigravity, Copilot, Cursor, Codex
The port and protocolMCP, over stdio or Streamable HTTP
A device (printer, drive)An MCP server for one system
What the device can doIts tools, resources and prompts
The device shows up automaticallyThe host lists the server's tools and gives them to the model
A suspicious USB stickAn unreviewed server with broad tokens

Watch it on an example

  1. Your team adds the official Sentry server to .mcp.json (Claude Code) and the same server to .cursor/mcp.json and .vscode/mcp.json.
  2. Everyone, in any of the three tools, can ask "find the cause of yesterday's top error" and the agent reads real stack traces.
  3. The token is read-only and comes from an environment variable, so the agent can't resolve or delete issues, and nothing secret is committed.

The trap it saves you from

Two opposite ones: writing a custom integration per tool (MCP makes that unnecessary), and plugging in every server you find (each one adds context cost and attack surface).

It still works when…

You build your own server for an internal API (Module 16): the same USB-C plug, so your whole team gets it in whatever tool they prefer.

7. Common mistakes

Production write accessA database server with a read-write production user, combined with a prompt injection, is a disaster waiting to happen. Read-only, non-production, scoped.
Secrets written into config filesUse environment variables (${TOKEN}, bearer_token_env_var, or VS Code's prompted inputs). Config files get committed.
Connecting everythingTen servers can add thousands of tokens of tool descriptions to every request and confuse tool choice. Connect per repository, per need.
Installing unknown serversA server runs with your permissions. Prefer official vendors, read what it does, and pin a version.

8. Hands-on lab (roadmap week 10)

  1. Pick three servers your work needs (for example GitHub, your issue tracker, a docs server) from the official registry or the vendors' docs.
  2. Connect them at project scope in tool A using the generator above, and the same three in tool B.
  3. Check the context cost: compare /context (or your tool's equivalent) before and after.
  4. Use them on a real task, such as "summarise the open bugs labelled checkout and find the related code".
  5. Lock it down: make sure write tools ask first, and no token is in a committed file.

9. Self-check quiz

What is MCP's main benefit?

It standardises the connection, so integrations are built once and reused everywhere.

Which MCP feature lets the model perform actions like creating an issue?

Tools are callable actions; resources are data to read; prompts are reusable templates.

Connecting a database server for your agent. Which credentials?

Least privilege: the agent can be tricked, so limit what any server can do.

Why not connect every server you might need?

Each server adds context cost and more chances to pick the wrong tool, plus more attack surface.

10. Go deeper

ResourceTimeWhy
modelcontextprotocol.io30 minThe official introduction, specification and SDKs.
MCP Course (Hugging Face)Self-pacedFree, hands-on, from concepts to building servers.
The MCP registry10 minWhere to find servers, starting with official ones.
MCP in Claude Code and MCP servers in VS Code20 minScopes, sign-in and secrets in two tools.