How AI Connects to Your Systems

Model Context Protocol (MCP) โ€” the open standard that turns AI from a chatbot into a system that can query databases, call APIs, and take actions.

๐Ÿ“– Day 3 Reference โšก Interactive ๐Ÿ”Œ MCP

๐Ÿ’ก Why Does AI Need MCP?

Without MCP, AI can only work with text you paste into it. It can't look things up, check databases, or take actions in your systems. MCP changes that.

๐Ÿ“‹

Without MCP

Export CSV โ†’ paste into chat โ†’ AI analyzes what you gave it. Manual, one-at-a-time.

๐Ÿ”Œ

With MCP

AI queries your database directly, gets exactly what it needs, analyzes live data. Automatic.

๐Ÿ”Œ

USB-C for AI

Just as USB-C connects any device to any peripheral, MCP connects any AI to any data source.

๐ŸŒ

Open Standard

Works with Claude, ChatGPT, Kiro, Cursor, VS Code โ€” build once, connect everywhere.

๐Ÿฆ What MCP Means for Finance Teams

Your team works with databases, spreadsheets, document stores, and internal APIs every day. MCP lets AI access these systems the same way you do โ€” but faster.

Today (Manual)With MCP (Automated)
Export merchant data to CSV, paste into AIAI queries merchant database directly
Open 50 invoices one by oneAI scans the invoice folder automatically
Check compliance status in 3 different systemsAI checks all 3 systems in one request
Copy transaction data, format it, paste itAI runs SQL query, gets exactly what it needs
Manually send Slack alert when issue foundAI sends the alert automatically via MCP
๐Ÿ’ก
Key insight: MCP doesn't replace your systems โ€” it connects AI to them. Your databases, APIs, and tools stay exactly where they are. MCP just gives AI a way to talk to them.

โšก API vs MCP โ€” What's the Difference?

Both APIs and MCP let systems talk to each other. But they solve different problems and work at different levels. Here's the clearest way to think about it:

๐Ÿ”Œ

API (Application Programming Interface)

A contract between two systems. "Send me this request, I'll give you this response." Designed for programs to talk to programs.

๐Ÿง 

MCP (Model Context Protocol)

A contract between AI and systems. "Here are the tools I offer โ€” the AI decides when and how to use them." Designed for AI to discover and use capabilities.

The Key Difference: Who Decides?

AspectTraditional APIMCP
Who calls it?A developer writes code: fetch('/api/merchants')The AI decides on its own: "I need merchant data, let me call read_query"
DiscoveryDeveloper reads API docs, writes integration codeAI asks the server "what tools do you have?" and figures it out
FlexibilityFixed endpoints โ€” each use case needs a specific API callAI composes tools dynamically โ€” same tools, infinite use cases
Who builds it?Developers build and maintain integrationsConfigure once, AI handles the rest
Error handlingDeveloper codes retry logic, error parsingAI reads the error, adjusts its approach, tries again

๐Ÿฆ AnyCompany Example: Getting Merchant Data

๐Ÿ”Œ With a Traditional API

A developer writes this code:

// Developer writes this const resp = await fetch( '/api/merchants?risk=RED' ); const data = await resp.json(); // Then format, display, handle errors...

Requires: developer time, API knowledge, error handling code, maintenance when API changes.

๐Ÿง  With MCP

You just ask in plain English:

// You type this in Kiro: "Show me all RED-rated merchants with their chargeback rates" // AI automatically: โ†’ tools/call read_query SELECT * FROM merchants WHERE risk_rating = 'RED'

Requires: MCP server configured (one-time JSON file). No code, no API knowledge needed.

๐Ÿ’ก
The analogy: An API is like a vending machine โ€” you press the exact button for what you want. MCP is like a personal assistant with access to the vending machine โ€” you say "I'm thirsty" and they figure out which button to press.

๐Ÿค They Work Together, Not Against Each Other

MCP doesn't replace APIs โ€” it wraps them so AI can use them. Many MCP servers are just thin wrappers around existing APIs.

ScenarioUse API directlyUse MCP
Building a web app that shows merchant dataโœ… Yes โ€” your app code calls the APIโŒ No โ€” apps don't need AI reasoning
AI agent that investigates fraud patternsโŒ No โ€” AI can't call APIs on its ownโœ… Yes โ€” AI discovers and calls tools
Automated report that pulls from 3 databasesโš ๏ธ Possible but needs custom codeโœ… Yes โ€” AI queries all 3 via MCP
Slack bot that responds to commandsโœ… Yes โ€” fixed command โ†’ fixed responseโœ… Also works โ€” AI reasons about the request
Dashboard with real-time chartsโœ… Yes โ€” direct data pipelineโŒ No โ€” MCP is for AI, not dashboards
๐Ÿ”‘
Rule of thumb: If a human or program knows exactly what data it needs โ†’ use an API. If an AI needs to figure out what data it needs based on a question โ†’ use MCP. In practice, MCP servers often call APIs under the hood โ€” you just don't have to write the integration code.

๐Ÿ”ง MCP Architecture

MCP follows a simple client-server pattern. The AI application (Kiro) is the host. It creates clients that connect to servers. Each server provides access to a specific data source or tool.

๐Ÿค– MCP Host Kiro / Claude / Cursor
โ†’
๐Ÿ”— MCP Client One per server
โ†’
๐Ÿ—„๏ธ MCP Server Database / API / Files

Three Core Primitives

Every MCP server can expose three types of capabilities:

๐Ÿ”จ

Tools

Actions the AI can perform: run a SQL query, call an API, send a message. The AI decides when to use them.

๐Ÿ“ฆ

Resources

Data the AI can read: file contents, database schemas, API responses. Like giving the AI access to a document.

๐Ÿ’ฌ

Prompts

Reusable templates that structure how the AI interacts with the server. Like pre-built query patterns.

โš™๏ธ How Connection Works

When you configure an MCP server in Kiro, here's what happens under the hood:

StepWhat happensYou see
1. ConfigureYou add the server to .kiro/settings/mcp.jsonEdit a JSON file
2. ConnectKiro launches the MCP server process and negotiates capabilitiesGreen checkmark โœ… in MCP panel
3. DiscoverKiro asks the server "what tools do you have?" via tools/listTool names appear in the panel
4. UseWhen you ask a question, Kiro decides which tool to call and sends a tools/call requestAI response includes data from the server
๐Ÿ”
Two transport modes: MCP servers can run locally (on your machine, using stdio โ€” like the SQLite server in the lab) or remotely (on a server, using HTTP โ€” like a cloud API). The protocol is the same either way.

๐ŸŽฎ MCP Message Flow โ€” Interactive Demo

Watch messages flow through the full MCP architecture as you ask a question. Each step shows exactly what's happening between components.

Message Flow

Step 0 / 0
๐Ÿ‘ค
You
Plain English
๐Ÿค–
Kiro (Host)
AI reasoning
๐Ÿ”—
MCP Client
JSON-RPC 2.0
โš™๏ธ
MCP Server
mcp-server-sqlite
๐Ÿ—„๏ธ
Database
anycompany.db
Press Play or Step Forward to watch the message flow.

๐Ÿฆ MCP Servers for Finance Teams

These are the most common MCP servers your team would use. You specify what connections are needed in the Agent Design Canvas โ€” your tech team configures the actual servers.

MCP ServerConnects toFinance use caseSetup
SQLite / PostgreSQLDatabasesQuery merchant data, transaction history, compliance recordsConfig only
FilesystemFile directoriesProcess folders of invoices, scan regulatory documentsConfig only
Slack / TeamsTeam messagingSend alerts when RED-rated merchant detectedAPI key
Google Drive / S3Document storageRead policy documents for RAG groundingOAuth / IAM
Email (SMTP)Email systemsSend compliance reports, escalation alertsSMTP config
Custom REST APIInternal servicesCall risk scoring engine, KYC verificationCustom build
๐Ÿ’ก
You design the recipe, your tech team sets up the kitchen. In the Agent Design Canvas, you specify "MCP connections needed: merchant database, Slack for alerts." Your engineering team then configures the actual MCP servers. The open-source community has pre-built servers for most common systems.

โš™๏ธ Configuration Example

This is what an MCP configuration looks like in Kiro. It's a simple JSON file โ€” no code required:

// .kiro/settings/mcp.json { "mcpServers": { "anycompany-db": { "command": "uvx", "args": ["mcp-server-sqlite", "--db-path", "./anycompany.db"], "autoApprove": ["read_query", "list_tables"] } } }

That's it โ€” 7 lines of JSON. Kiro launches the SQLite MCP server, connects to it, and you can start querying the database in plain English.

๐Ÿ”— The Complete Kiro Stack

MCP is the fourth and final layer of the Kiro automation stack. Here's how all 4 layers work together:

๐Ÿ“‹ Steering
Global rules
โ†’
๐Ÿ› ๏ธ Skills
On-demand expertise
โ†’
โšก Hooks
Auto-triggers
โ†’
๐Ÿ”Œ MCP
Data connections

How They Work Together โ€” Fraud Detection Example

LayerWhat it doesIn the fraud detection workflow
SteeringSets global rulesSGD currency, no PII, GREEN/AMBER/RED ratings
SkillDefines the investigation processFraud Investigation Lead persona, 6-section report format, guardrails
HookTriggers automaticallyNew .alert file โ†’ run fraud investigation skill
MCPConnects to dataSQLite server โ†’ query merchant profile, transactions, compliance alerts
๐Ÿ”
The full automation loop: Alert file arrives (external system) โ†’ Hook detects it โ†’ Skill activates โ†’ MCP queries the database โ†’ Report generated โ†’ Human reviews the recommendation. The AI handles the investigation; you make the decision.

๐Ÿ—บ๏ธ Your 3-Day Journey

DayWhat you learnedWhat you built
Day 1What AI can do, responsible AI, use casesUnderstanding + GenAI playbook
Day 2Prompt engineering techniquesReusable prompt templates
Day 3Agentic AI, skills, hooks, MCPWorking agent with database connection

The thread: Day 1's responsible AI โ†’ enforced by Day 3's guardrails. Day 2's prompt templates โ†’ become Day 3's skills. Day 2's RAG grounding โ†’ becomes Day 3's MCP connections. Everything builds on what came before.