08 Oct 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:
- Standard Input/ Output
- HTTP/Web Sockets
- 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 Deep Learning
- Feedforward Neural Networks (FNN)
- Convolutional Neural Network (CNN)
- Recurrent Neural Networks (RNN)
- Long short-term memory (LSTM)
- Generative Adversarial Networks (GANs)
No Comments