In the previous tutorial, MCP Fundamentals for SDETs, we introduced MCP — Model Context Protocol — and learned why AI applications need a standardized way to interact with external tools and systems. Now we go one level deeper into the three most important architectural concepts in MCP: the MCP Host, the MCP Client, and the MCP Server. If you clearly understand these three components, technologies such as Playwright MCP, GitHub Copilot agents, database MCP servers, GitHub integrations and Agentic AI testing become much easier to understand.
MCP Host
MCP Client
MCP ServerIn this tutorial we cover what each component is, Host vs Client vs Server, how they communicate, who starts the connection, how capability discovery works, what happens when an AI invokes a tool, one Host connecting to multiple MCP servers, local vs remote MCP servers, Playwright MCP architecture, enterprise SDET examples, security boundaries, common misconceptions and the complete request/response lifecycle.
1. Start With the Big Picture
The easiest architecture to remember is a straight vertical chain. Each layer hands work to the layer below it, and results travel back up.
USER
│
▼
MCP HOST
│
▼
MCP CLIENT
│
│ MCP
▼
MCP SERVER
│
▼
EXTERNAL CAPABILITYFor Playwright-based browser interaction, the chain becomes concrete.
Developer / SDET
│
▼
AI Application
MCP HOST
│
▼
MCP CLIENT
│
│ MCP
▼
Playwright MCP Server
│
▼
Playwright
│
▼
Browser
│
▼
Application Under TestThe important question to keep in mind throughout this tutorial is: what responsibility belongs to each layer?
2. What Is an MCP Host?
The MCP Host is the application or AI environment that coordinates the overall MCP experience. The user interacts with the host.
USER
│
▼
┌────────────────────────────┐
│ MCP HOST │
│ │
│ AI / Agent Environment │
│ │
│ MCP Client Connections │
└────────────────────────────┘The host can manage things such as user interaction, AI/model interaction, MCP server connections, permissions, available capabilities, context, tool execution workflows and security boundaries.
3. MCP Host Example
Imagine an SDET working inside an AI-enabled development environment. The SDET asks:
Open the QA application and verify
that the login page is working.The host receives that request.
SDET
│
│ "Test the login page"
▼
MCP Host
│
├── AI reasoning
│
├── MCP connections
│
└── Available capabilitiesThe host itself does not necessarily know how to operate a browser. Instead, it can have a connection to an MCP server that exposes browser capabilities.
4. What Is an MCP Client?
This is where many beginners get confused. The MCP Client is not normally another application that the SDET manually opens. It is a protocol component used by the host to communicate with an MCP server.
HOST
│
▼
CLIENT
│
│ MCP
▼
SERVERThe client's job is communication. It participates in establishing MCP communication, negotiating protocol capabilities, discovering server capabilities, sending requests, receiving responses and passing results back into the host environment.
5. Where Does the MCP Client Live?
Conceptually, the MCP client exists on the host side.
┌───────────────────────────────┐
│ MCP HOST │
│ │
│ AI / Agent Environment │
│ │
│ ┌───────────────┐ │
│ │ MCP CLIENT │ │
│ └───────┬───────┘ │
└───────────────┼───────────────┘
│
│ MCP
▼
┌───────────────┐
│ MCP SERVER │
└───────────────┘This distinction matters. Do not think "Host = Computer, Client = AI, Server = Internet". That is not the MCP architecture. Instead, think in terms of responsibilities.
HOST
Coordinates the experience
CLIENT
Handles MCP communication
SERVER
Exposes capabilities6. What Is an MCP Server?
An MCP Server is a program or service that exposes capabilities through MCP. Those capabilities can include Tools, Resources and Prompts. For testing, an MCP server might provide access to browser operations, database queries, repository information, files, issue tracking and internal engineering systems.
MCP CLIENT
│
│ MCP
▼
┌──────────────────────────┐
│ MCP SERVER │
│ │
│ Tools │
│ Resources │
│ Prompts │
└────────────┬─────────────┘
│
▼
External System7. The Server Is an Adapter Layer
A useful way for SDETs to understand an MCP server is to think of it as an adapter. Suppose you have PostgreSQL. The AI model does not directly communicate with PostgreSQL.
AI
│
▼
MCP Client
│
▼
Database MCP Server
│
▼
PostgreSQLThe MCP server understands how to interact with the underlying system and exposes appropriate capabilities through MCP. The same idea applies to a browser.
AI
│
▼
MCP Client
│
▼
Playwright MCP Server
│
▼
Playwright
│
▼
Browser8. Host vs Client vs Server
- MCP Host — coordinates the AI application and MCP environment.
- MCP Client — communicates with a specific MCP server.
- MCP Server — exposes capabilities through MCP.
- External System — performs or stores the actual underlying work/data.
HOST
= Where the AI experience is coordinated
CLIENT
= How the host communicates through MCP
SERVER
= Where MCP capabilities are exposed
EXTERNAL SYSTEM
= What ultimately performs/provides the underlying functionality9. One Host Can Connect to Multiple Servers
This is extremely important for enterprise Agentic AI architectures. Imagine your AI testing environment needs browser access, GitHub, a database, Jira and file access. You do not necessarily build one giant MCP server.
MCP HOST
│
┌─────────────────┼─────────────────┐
│ │ │
▼ ▼ ▼
MCP Client MCP Client MCP Client
│ │ │
▼ ▼ ▼
Playwright MCP GitHub MCP Database MCP
Server Server Server
│ │ │
▼ ▼ ▼
Browser GitHub Repo PostgreSQL AI HOST
│
┌──────────┬───────┼───────┬──────────┐
│ │ │ │ │
▼ ▼ ▼ ▼ ▼
Browser GitHub DB Jira Files
MCP MCP MCP MCP MCPThis creates a tool-connected AI environment.
10. Why Multiple Clients?
A useful conceptual model is that the host maintains client connections to servers.
HOST
│
├── Client A ── Playwright MCP Server
│
├── Client B ── GitHub MCP Server
│
└── Client C ── Database MCP ServerThis helps maintain separation between different server connections. For enterprise environments, this separation can also support better security, permission control, isolation, configuration, auditing and lifecycle management.
11. How Does an MCP Connection Start?
Before an AI can use server capabilities, the client and server need to establish communication. A simplified lifecycle:
MCP Client
│
│ Connect
▼
MCP Server
│
│ Initialization
▼
Protocol / Capability Negotiation
│
▼
Connection ReadyThe client and server exchange information about what they support. This is important because different implementations may expose different capabilities.
12. Initialization
When an MCP connection begins, initialization allows both sides to understand important protocol information.
CLIENT
│
│ initialize
▼
SERVER
│
│ server information
│ supported capabilities
▼
CLIENTCLIENT
│
▼
SERVER
READYNow the host can work with the capabilities exposed through that connection.
13. Capability Discovery
Suppose a Playwright MCP server exposes browser-related tools. The AI should not have to blindly guess what operations exist. The MCP client can discover capabilities exposed by the server.
Client
│
│ "What tools are available?"
▼
Server
│
▼
Available Toolsbrowser_navigate
browser_click
browser_type
browser_snapshotThe exact names and capabilities depend on the server implementation.
14. Why Tool Discovery Matters
Without discovery, an AI application would need hard-coded knowledge of every possible integration: browser integration, database integration, GitHub integration, Jira integration, cloud integration — each could expose different operations. With MCP, the server can describe the capabilities it provides.
MCP SERVER
"I provide these capabilities"
↓
MCP CLIENT
↓
AI ENVIRONMENTThis is one of the important architectural benefits of MCP.
15. What Happens When the AI Uses a Tool?
Now we get to the most interesting part. Suppose the user says "Open the login page." The AI determines that browser navigation is required.
USER
│
│ "Open login page"
▼
HOST
│
▼
AI MODEL
│
│ decides browser navigation is needed
▼
MCP CLIENT
│
│ tool request
▼
PLAYWRIGHT MCP SERVER
│
▼
PLAYWRIGHT
│
▼
BROWSER
│
▼
LOGIN PAGEThe result then travels back.
LOGIN PAGE
│
▼
BROWSER
│
▼
PLAYWRIGHT
│
▼
MCP SERVER
│
│ result
▼
MCP CLIENT
│
▼
AIThe AI can now reason about what happened.
16. Complete Request/Response Loop
This is one of the most important diagrams in this tutorial.
USER GOAL
│
▼
HOST
│
▼
AI REASONING
│
▼
SELECT CAPABILITY
│
▼
MCP CLIENT
│
▼
MCP SERVER
│
▼
EXECUTE TOOL
│
▼
EXTERNAL SYSTEM
│
▼
RESULT
│
▼
MCP SERVER
│
▼
MCP CLIENT
│
▼
AI OBSERVATION
│
▼
REASON AGAINThis can become a loop.
Reason
↓
Act
↓
Observe
↓
Reason
↓
Act
↓
Observe
↓
Validate17. Playwright MCP Example
Suppose the SDET provides this goal: "Verify that a user can log in and reach the dashboard." The agent might reason:
Need application URL
↓
Need browser
↓
Navigate to login
↓
Inspect page
↓
Enter username
↓
Enter password
↓
Click Login
↓
Observe resulting page
↓
Verify dashboardSDET
│
▼
AI Host
│
▼
AI Reasoning
│
▼
MCP Client
│
▼
Playwright MCP Server
│
▼
Playwright
│
▼
Browser
│
▼
Application18. Traditional Playwright Comparison
test('user can login', async ({ page }) => {
await page.goto('/login');
await page.getByLabel('Email')
.fill('user@example.com');
await page.getByLabel('Password')
.fill(process.env.TEST_PASSWORD!);
await page.getByRole('button', {
name: 'Login'
}).click();
await expect(page)
.toHaveURL(/dashboard/);
});Here, the engineer has explicitly defined Navigate, Fill, Fill, Click, Assert — the sequence is predetermined. With an AI + MCP workflow, the user may instead provide the goal: "Verify that a valid user can log in." The AI reasons about which available capabilities should be used. That is a major architectural difference.
19. Local MCP Server
An MCP server can run locally.
Developer Machine
┌─────────────────────────────────┐
│ │
│ AI Host │
│ │ │
│ ▼ │
│ MCP Client │
│ │ │
│ ▼ │
│ Local MCP Server │
│ │ │
│ ▼ │
│ Local Tool / Application │
│ │
└─────────────────────────────────┘This can be useful for developer workflows involving local tools and resources.
20. Remote MCP Server
An MCP server can also be available remotely when supported by the deployment and transport architecture.
Developer Machine
AI Host
│
MCP Client
│
│ Network
▼
──────────────────────────
Remote Environment
MCP Server
│
▼
Enterprise SystemRemote access makes authentication, authorization, network security and governance especially important.
21. Local vs Remote
- Local MCP Server — runs near/on the client machine; useful for local tools; local process communication may be used; smaller network attack surface; often developer-focused.
- Remote MCP Server — runs in another environment; useful for centralized services; network transport may be used; requires stronger network controls; can support shared enterprise capabilities.
Neither approach is automatically better. The right architecture depends on the use case.
22. Example: Database MCP Server
Imagine the AI needs to validate whether a product was actually stored in PostgreSQL.
AI Host
│
▼
MCP Client
│
▼
Database MCP Server
│
▼
PostgreSQLThe agent might want to perform a validation conceptually equivalent to:
SELECT *
FROM products
WHERE product_id = 101;The database server could expose a controlled query capability. The AI does not need direct unrestricted database administration access.
23. Example: GitHub MCP Server
Suppose a test fails and the agent needs repository context.
AI Agent
│
▼
MCP Client
│
▼
GitHub MCP Server
│
▼
RepositoryThe AI might retrieve information such as test files, application source, configuration, recent code changes and pull request information. The capabilities depend on the server and the permissions granted.
24. Example: Jira MCP Server
Now imagine the agent discovers a defect.
Testing Agent
│
▼
MCP Client
│
▼
Jira MCP Server
│
▼
JiraDepending on available capabilities and authorization, the workflow might support operations such as: Read Story, Read Acceptance Criteria, Search Existing Bugs, Create Defect, Update Issue. This starts to demonstrate why MCP can be powerful for enterprise Quality Engineering.
25. Multiple Servers in One Testing Workflow
Now combine the systems. Suppose the goal is: "Validate PRODUCT-101 end to end." The AI may need Jira (read requirement), GitHub (understand implementation), Browser (test UI), Database (validate data), and Jira again (report defect).
AI AGENT
│
MCP HOST
│
┌────────────┬───────┼───────┬────────────┐
│ │ │ │ │
▼ ▼ ▼ ▼ ▼
Playwright GitHub Jira Database Files
Client Client Client Client Client
│ │ │ │ │
▼ ▼ ▼ ▼ ▼
Playwright GitHub Jira DB File
MCP Server MCP MCP MCP MCP
│
▼
Browser26. The Host Coordinates — Servers Specialize
This principle is worth remembering.
HOST
=
Coordination
SERVERS
=
Specialization AI HOST
│
┌───────────┼───────────┐
│ │ │
▼ ▼ ▼
Browser GitHub Database
Server Server Server
Browser Source Data
Expert Expert ExpertEach server can expose a focused set of capabilities.
27. Security Boundary Between Host and Server
This is extremely important in enterprise environments. Just because a server exposes a capability does not mean every agent should automatically receive unrestricted access.
Testing Agent
│
▼
Database MCP Server
│
▼
Production DatabaseIf the server allows unrestricted destructive queries, the risk is significant. Instead:
Testing Agent
│
▼
Database MCP Server
│
▼
Read-only Credentials
│
▼
QA Database28. Server Permissions Matter
Imagine two database servers. Server A exposes only SELECT. Server B exposes SELECT, INSERT, UPDATE, DELETE and DROP. These are not equivalent from a security perspective. The AI may be identical — the difference is the capabilities and permissions exposed to it.
Server A:
SELECT
Server B:
SELECT
INSERT
UPDATE
DELETE
DROP29. Authentication vs Authorization
These concepts are especially important for remote or enterprise MCP deployments. Authentication asks "Who are you?" Authorization asks "What are you allowed to do?"
AI Testing Environment
│
▼
Authenticate
│
▼
Identity Confirmed
│
▼
Authorize
│
├── Read Jira Story ✓
├── Read QA Database ✓
├── Create QA Test Data ✓
└── Delete Production DB ✗30. Human Approval Can Sit Above Tool Execution
For sensitive operations, the host or surrounding agent platform can enforce approval policies.
AI
│
▼
Proposed Action
│
▼
Risk Check
│
├───────────────┐
│ │
▼ ▼
LOW HIGH
│ │
▼ ▼
Execute Human ApprovalRead QA page
→ Execute
Query QA database
→ Execute
Delete production record
→ Human approval / deny31. Common Misconception: MCP Server Is the AI
Wrong:
MCP Server = AI Agent
Correct:
AI / Agent
│
▼
MCP
│
▼
MCP ServerThe MCP server exposes capabilities. The AI performs the reasoning.
32. Common Misconception: MCP Server Replaces the API
MCP does not replace REST APIs. An MCP server may actually use an existing API underneath.
AI
│
▼
MCP Client
│
▼
Jira MCP Server
│
▼
Jira REST API
│
▼
Jira BackendMCP provides the AI-facing integration layer. The underlying application architecture can remain unchanged.
33. Common Misconception: MCP Client Performs the Real Work
Usually, the client is primarily responsible for MCP communication. The actual capability is provided on the server side or by the external system behind it.
CLIENT
= Communicates
SERVER
= Exposes capability
TOOL / SYSTEM
= Performs underlying operation34. Common Misconception: One MCP Server Does Everything
Technically, a server can expose multiple capabilities. But enterprise architecture often benefits from separation.
Instead of:
GIANT MCP SERVER
Browser
Database
GitHub
Jira
AWS
Files
CI/CD
EverythingPrefer:
Browser MCP
GitHub MCP
Database MCP
Jira MCP
Cloud MCPThis can improve security, ownership, maintainability, permission boundaries, auditability and scalability.
35. What Happens When a Tool Fails?
Suppose the AI asks the browser server to click Login, but the button is not available.
AI
│
▼
MCP Client
│
▼
Playwright MCP Server
│
▼
Attempt Click
│
▼
FAILURE
│
▼
Error / Result
│
▼
MCP Client
│
▼
AINow the AI can reason about the observation.
Button not found
↓
Inspect page
↓
Maybe page did not load
↓
Check current state
↓
Find correct control
↓
Retry appropriate actionThis observation loop is what makes tool-enabled agents interesting for testing.
36. Host, Client and Server in an Agentic Loop
Putting everything together:
USER GOAL
│
▼
MCP HOST
│
▼
AI REASONING
│
▼
MCP CLIENT
│
▼
MCP SERVER
│
▼
TOOL
│
▼
EXTERNAL SYSTEM
│
▼
OBSERVATION
│
▼
MCP SERVER
│
▼
MCP CLIENT
│
▼
HOST
│
▼
AI REASONING
│
┌────┴────┐
│ │
Continue CompleteThat is one of the core architectures behind tool-enabled agentic workflows.
37. Enterprise Playwright Testing Architecture
For a professional Quality Engineering environment:
HUMAN SDET
│
▼
AI / AGENT HOST
│
┌─────────────────┼──────────────────┐
│ │ │
▼ ▼ ▼
Browser Client GitHub Client Database Client
│ │ │
▼ ▼ ▼
Playwright MCP GitHub MCP DB MCP
Server Server Server
│ │ │
▼ ▼ ▼
Playwright Repository PostgreSQL
│
▼
Browser
│
▼
Application Under TestThen your deterministic automation can continue existing separately.
GitHub Actions
│
▼
Playwright Test Suite
│
▼
Browser / API
│
▼
ApplicationThe two approaches can complement each other.
38. A Real SDET Workflow
Suppose a new Jira story says: "As an administrator, I should be able to create a product." The AI-assisted testing workflow could be:
- Read Jira story
- Understand acceptance criteria
- Inspect relevant application code
- Determine test scenarios
- Open application
- Login as admin
- Navigate to Products
- Create product
- Validate UI result
- Validate API behavior
- Validate database record
- Investigate failures
- Collect evidence
- Create defect if authorized
- Produce testing summary
Different MCP servers can provide different pieces of this workflow.
Jira MCP
↓
Requirements
GitHub MCP
↓
Code Context
Playwright MCP
↓
Browser Testing
Database MCP
↓
Data Validation
Jira MCP
↓
Defect Management39. Host, Client and Server Interview Explanation
If an interviewer asks: "Explain MCP Host, Client, and Server" — a strong short answer is: An MCP Host is the AI application or environment coordinating the user experience and MCP connections. An MCP Client is the protocol component on the host side that communicates with an MCP Server. The MCP Server exposes capabilities such as tools, resources and prompts. The server may then interact with an external system such as Playwright, GitHub, Jira or a database.
User
↓
Host
↓
Client
↓
MCP
↓
Server
↓
External SystemThen draw the chain above — that demonstrates the architecture clearly.
40. Easy Way to Remember It
Use this analogy. Imagine a restaurant.
CUSTOMER
= User
RESTAURANT
= Host environment
WAITER
= Client
KITCHEN
= Server
KITCHEN EQUIPMENT
= Underlying toolsThe customer requests something. The waiter communicates the request. The kitchen provides the capability to fulfill it. The result returns to the customer. It is not a perfect technical analogy, but it helps beginners remember the responsibilities.
41. MCP Architecture Cheat Sheet
MCP HOST
────────────────────────
Runs/co-ordinates AI experience
Manages MCP connections
Provides user-facing environment
MCP CLIENT
────────────────────────
Lives on host side conceptually
Communicates using MCP
Discovers capabilities
Sends requests
Receives responses
MCP SERVER
────────────────────────
Exposes MCP capabilities
Provides tools/resources/prompts
Connects to underlying systems
EXTERNAL SYSTEM
────────────────────────
Browser
Database
GitHub
Jira
Files
Cloud
Enterprise services42. The Architecture You Should Memorize
For MCP fundamentals:
USER
│
▼
MCP HOST
│
▼
MCP CLIENT
│
│ MCP
▼
MCP SERVER
│
▼
EXTERNAL SYSTEMFor Playwright:
SDET
│
▼
AI HOST
│
▼
MCP CLIENT
│
▼
PLAYWRIGHT MCP SERVER
│
▼
PLAYWRIGHT
│
▼
BROWSER
│
▼
APPLICATIONFor enterprise Agentic Quality Engineering:
SDET
│
▼
AI AGENT
│
MCP HOST
│
┌─────────────────┼─────────────────┐
│ │ │
▼ ▼ ▼
Playwright Client GitHub Client DB Client
│ │ │
▼ ▼ ▼
Playwright MCP GitHub MCP Database MCP
Server Server Server
│ │ │
▼ ▼ ▼
Browser Repository PostgreSQL
│
▼
AUT43. Final Takeaway
The most important thing is to separate the responsibilities.
HOST
= Coordinates
CLIENT
= Communicates
SERVER
= Exposes capabilities
TOOL / EXTERNAL SYSTEM
= Performs the underlying work
AI
= Reasons and decides
HUMAN
= Provides judgment and governanceWhen an SDET says "Test the checkout functionality", a tool-enabled architecture can conceptually become:
SDET
↓
AI Host
↓
Reasoning
↓
MCP Client
↓
MCP Server
↓
Tool
↓
Application
↓
Observation
↓
AI Reasoning
↓
Next ActionOnce you understand this flow, Playwright MCP and Agentic AI testing stop looking mysterious. They become an architecture made of understandable components.
Complete professional Playwright + TypeScript enterprise framework
Production-grade architecture, fixtures, reporters and CI/CD — ready to run.
Get Playwright tutorials in your inbox
Weekly tips, real-world examples, and framework patterns – no spam, unsubscribe anytime.
Playwright Framework Series
View all →- 1Getting Started with Playwright: Installation, Setup, and Your First Test
- 2Playwright Locators: The Complete Guide with Real-World Examples
- 3Playwright Actions: Complete Guide to Click, Fill, Hover, Keyboard, Mouse & File Upload
- 4Playwright Assertions Complete Guide: Web-First Assertions, Auto-Retry & Custom Matchers
- 5Playwright Auto Waiting: The Complete Guide with Real-World Examples
- 6Playwright Fixtures: The Complete Guide with Real-World Examples
- 7Playwright Browser Context & Multiple Tabs: The Complete Guide with Real-World Examples
- 8Playwright Authentication & Session Management: Complete Guide with Enterprise Examples
- 9Playwright Network Interception & API Mocking: Complete Guide with Real-World Examples
- 10Playwright Page Object Model (POM): The Complete Guide with Enterprise Examples
- 11Page Object Model with Playwright: A Practical Guide
- 12How to Build a Robust Professional Playwright Framework from Scratch (Step-by-Step)
- 13Building an Enterprise Playwright Framework from Scratch
API Testing Series
View all →- 1Part 1 : Playwright API Testing Tutorial: Build Enterprise-Level API Automation Framework
- 2Part 2: Playwright API Testing Tutorial: Setting Up Project & Sending Your First API Request
- 3Part 3: Mastering CRUD Operations in Playwright API Testing
- 4Part 4: Authentication in Playwright API Testing (Bearer Token, JWT, API Key & Reusable Fixtures)
- 5Part 5: Building an Enterprise-Level Playwright API Automation Framework
- 6Part 6: API Models, Schema Validation & Test Data Management in Playwright
- 7Part 7: Custom Fixtures, Hooks, Logging & Parallel Execution in Playwright API Testing
- 8Part 8: Building a Production-Ready Playwright API Framework (Environment Management, CI/CD, Reporting & Best Practices)
- 9Part 9: Advanced Playwright API Testing Techniques for Enterprise Automation
- 10Part 10: Building a Complete Enterprise Playwright API Automation Framework (Final Part)
- 11Playwright Backend Testing Tutorial – REST API, GraphQL, WebSocket, Kafka, Database & Microservices