Previously in This Series
In the previous episodes, you learned about what MCP is, understood the Client-Server architecture, built your first MCP Server, and explored the three core capabilities (Tools, Resources, and Prompts). Now it is time to see how those servers actually connect to a real AI model.
This is one of the most important episodes in the series. Up until now, we only built servers — now we will see how the client side works and which models and applications support MCP.
Claude Desktop — The Native Home of MCP
When we talk about MCP, the first thing you need to know is Claude Desktop. Anthropic, the creator of MCP, implemented the protocol directly inside the Claude desktop application. This means Claude Desktop is a native MCP Host.
What does that mean in practice? When you install Claude Desktop, it already has the ability to connect to MCP Servers out of the box. No extra plugins or complex configuration needed. You just tell it which servers you want.
The Configuration File: claude_desktop_config.json
The heart of connecting MCP to Claude Desktop is a simple JSON file called claude_desktop_config.json. This file lives in Claude Desktop’s configuration directory:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
The structure is straightforward. Each MCP Server you want to use is defined inside the mcpServers section:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/Documents"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}
Let me break down each part:
- The key (like
filesystem): A name you choose. This appears in the Claude Desktop interface - command: The command used to run the server (usually
npxorpython) - args: Arguments passed to the command
- env: Environment variables like tokens and API keys
After saving this file and restarting Claude Desktop, the servers become active. You will see a tool icon in the chat window where you can browse available tools.
How Do You Know a Server Is Connected?
When you open Claude Desktop with properly configured servers, a tool icon (usually shaped like a hammer or wrench) appears at the bottom of the chat window. Click it to see the list of tools from each server. For example, if you connected the filesystem server, you will see tools like read_file, write_file, and list_directory.
From there, simply ask Claude to do something. Type “list the files in my Documents folder” and Claude will automatically decide to use the list_directory tool.
Claude Code — MCP for Developers
If you are a developer, you probably spend most of your time in the terminal and code editor. Claude Code (available in VS Code and JetBrains) is another MCP Host that works directly inside your development environment.
Claude Code supports MCP just like Claude Desktop, but with one key difference: its environment is command-line and code-centric. MCP tools integrate directly into your coding workflow.
Setting Up MCP in Claude Code
In Claude Code, you define MCP servers in a .mcp.json file. This file can live in your project root (for project-specific settings) or in ~/.claude/ (for global settings):
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
}
}
}
The key difference is that Claude Code uses MCP tools directly within your conversation. If a database server is connected, you can say “pull the last 10 orders from the orders table” and Claude Code will execute the query right there.
Can Other Models Use MCP?
This is one of the most common questions I hear: “Is MCP only for Claude?” The short answer: No!
MCP is an open-source protocol. Anthropic created it, but does not have exclusive ownership. Anyone can use it. And the good news is that many applications and platforms are adding MCP support.
The MCP Ecosystem
Let us look at who supports MCP:
Native Support:
- Claude Desktop — as we discussed
- Claude Code — development environment
- Cursor — AI-powered code editor with direct MCP support
- Windsurf — another AI-enhanced editor
- Zed — fast editor with MCP support
Plugin-Based Support:
- VS Code — through various extensions
- JetBrains IDEs — via third-party plugins
Compatible but Unofficial:
- Since MCP is an open standard, any application can write an MCP Client and connect any model to it. For instance, an app using OpenAI GPT can add an MCP Client layer and benefit from MCP servers
An Important Note About Language Models
One critical point to understand: the language model itself (like GPT-4 or Claude) does not need to “support MCP” directly. MCP is a communication protocol implemented at the application layer, not the model layer.
What does this mean? If your application has an MCP Client, it can connect any model to it. The model just needs Tool Use (function calling) capability — which most modern models have.
So when you hear “this app supports MCP,” it means the app has an MCP Client. The underlying model can be anything.
Multiple MCP Servers at Once
One of the most powerful features of MCP is that you are not limited to a single server. You can connect multiple MCP Servers to one Host simultaneously. And this is where things get really exciting.
Imagine you have these servers active at the same time:
- Filesystem server — access to local files
- GitHub server — access to repositories
- PostgreSQL server — access to your database
- Slack server — send messages
Now you can tell Claude: “Check the latest commit on the main repo, pull today’s sales stats from the database, write a summary, and post it to Slack.” Claude uses all four servers to accomplish this task!
Managing Multiple Servers
When multiple servers are active, Claude (or whatever model you are using) decides on its own which server and which tool to use. Just state your request and the model selects the best tool based on the available tool list.
However, there is a tradeoff: the more tools you have active, the more context window is consumed (because tool descriptions must be sent to the model). So it is best to only activate servers you actually need.
Advanced Configuration
Transport Types — Communication Methods
MCP has two primary methods for communication between Client and Server:
1. stdio (Standard Input/Output): The server runs as a local process and communicates through stdin/stdout. This is ideal for local servers and is what you saw in the examples above.
2. SSE (Server-Sent Events): The server is accessible over HTTP. This is suitable for remote and cloud-based servers. You can have an MCP Server on the internet and connect from anywhere.
{
"mcpServers": {
"remote-db": {
"url": "https://mcp.example.com/db",
"transport": "sse"
}
}
}
Environment Variables
Many MCP servers need sensitive information — tokens, passwords, API keys. The best practice is to pass these through env in the configuration and never hardcode them in server code:
{
"mcpServers": {
"database": {
"command": "python",
"args": ["my_db_server.py"],
"env": {
"DB_HOST": "localhost",
"DB_PASSWORD": "secret_password",
"DB_NAME": "myapp"
}
}
}
}
This is an important security principle that we will explore further in the next episode.
A Real-World Scenario
Let me paint a real-world picture so you can see how all of this comes together.
Imagine you have a software development team. Team members use Claude Desktop with these MCP servers configured:
- GitHub server: for reviewing Pull Requests and reading code
- Jira server: for task management
- Database server: for running reporting queries
- Slack server: for sending notifications
The team lead can tell Claude: “Review PR #123, find the related Jira task, check if the changes affect database performance, and post a summary to #dev.” Claude uses all four servers: reads code from GitHub, finds the task in Jira, runs test queries on the database, and posts results to Slack. Without the team lead writing a single line of code.
Summary and Next Steps
In this episode, you learned:
- How Claude Desktop natively supports MCP and how to configure it
- How Claude Code integrates MCP into the development environment
- MCP is an open standard, not limited to Claude
- You can use multiple servers simultaneously
- Two transport types exist (stdio and SSE)
Now that you know how to connect MCP to applications, an important question arises: what about security? When you give AI access to your files, database, and services, what risks exist? In the next episode, we will dive deep into MCP security and best practices.