MCP – Servers, clients, and transports

MCP Architecture includes clients, servers, and transports. Let us understand about MCP Servers, Clients, and Transport Communication Channels with a JSON-like code snippet. Before that, let us understand the concepts using the following video:

MCP Clients (AI Applications)

Role: The AI interface that users interact with,

{
  "client": "Cursor AI",
  "role": "Coordinate conversations and manage MCP servers",
  "responsibilities": [
    "User interface management",
    "Server lifecycle control", 
    "Request routing",
    "Response processing"
  ]
}

Examples:

  • Cursor AI (like our example setup)
  • ChatGPT
  • Claude Desktop
  • Any AI application implementing the MCP client

MCP Servers (Data/Tool Providers)

Role: Specialized services that provide data or tools

{
  "server": "FireCrawl",
  "role": "Web scraping capabilities", 
  "capabilities": [
    "Scrape website content",
    "Extract structured data",
    "Handle dynamic content"
  ]
}

Server Types:

  • Data Servers(FireCrawl, databases, APIs)
  • Tool Servers(calculators, image processors)
  • Hybrid Servers(both data and tools)

Transports: Communication Channels

Definition: How clients and servers communicate

Common Transport Types

The most common transports are:

  1. Standard Input/ Output
  2. HTTP/Web Sockets
  3. SSH

Let us understand them one by one:

1. stdio (Standard Input/Output)

{
  "command": "npx -y firecrawl-mcp",
  "args": [],
  "env": {"FIRECRAWL_API_KEY": "..."}
}
  • Most common for local development
  • Simple and reliable
  • Used in our FireCrawl example

2. HTTP/WebSockets

{
  "command": "npx -y firecrawl-mcp",
  "args": [],
  "env": {"FIRECRAWL_API_KEY": "..."}
}
{
  "url": "http://localhost:3000/mcp",
  "headers": {"Authorization": "Bearer ..."}
}
  • For remote servers
  • Better for production
  • Enables scaling

3. SSH

  • For secure remote connections
  • Enterprise environments

Transport Configuration (Our Example)

{
  "mcpServers": {
    "firecrawl": {
      "command": "cmd /c set FIRECRAWL_API_KEY=fc-d98db442115347998are901339289dda && npx -y firecrawl-mcp",
      "args": [],
      "env": {}
    }
  }
}

This uses the stdio transport with environment variable setup

If you liked the tutorial, spread the word and share the link and our website, Studyopedia, with others.


For Videos, Join Our YouTube Channel: Join Now


Read More:

What is MCP Architecture
Standard vs Custom MCP Servers
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment