How Cursor, Claude Code, and Windsurf Use MCP for Agentic Coding
Cursor, Claude Code, and Windsurf all support MCP - but they implement it differently. Setup, real workflows, and a side-by-side comparison.
Mohammed Kafeel
Machine Learning Researcher
On this page
Developers using AI coding assistants are reporting 55% faster task completion after connecting their tools to external services via MCP. Yet most developers are still copy-pasting data between tabs instead of letting their agent reach out and grab it directly.
That changes today. This guide breaks down exactly how the three leading agentic coding tools - Cursor, Claude Code, and Windsurf - implement the Model Context Protocol.
What Is MCP (Model Context Protocol)?
MCP is an open standard that lets AI models talk to external tools using a single, unified protocol. Build one MCP server and every compatible client can use it.
Anthropic launched MCP on November 25, 2024. The latest spec version is 2025-06-18. Open-source, JSON-RPC 2.0 based, supported by Cursor, Claude Code, Windsurf, VS Code Copilot, and more.
The Problem MCP Solves
Before MCP: M AI models × N tools = M×N custom integrations. MCP collapses that to M+N.
Think of it as "USB-C for AI" - one standard plug. (For how the host, client, and server fit together, see the MCP architecture.)
MCP's Three Core Primitives
- Tools - Executable functions (e.g.,
create_github_issue,query_postgres) - Resources - Read-only data (files, database schemas, API responses)
- Prompts - Templated workflows for multi-step tasks
Transport Types
- STDIO - Runs locally as a subprocess
- HTTP with SSE - Connects to remote servers over the network
What Is Agentic Coding?
Agentic coding is when an AI autonomously plans and executes multi-step coding tasks without you directing every move. Not autocomplete. Not a chatbot. A system that reads your codebase, reasons, and acts.
What a real agent can do with the right MCP setup:
- Read a Jira ticket describing a new feature
- Explore the relevant files in your codebase
- Write the implementation across multiple files
- Run the test suite and fix failures
- Open a pull request on GitHub
Autocomplete vs. Agentic Coding
| Feature | Autocomplete | Agentic Coding |
|---|---|---|
| Scope | Single line or block | Entire codebase |
| Reasoning | None | Multi-step planning |
| Tool use | No | Yes (via MCP) |
| Memory | No | Session-level context |
| Autonomy | Zero | High |
How Cursor Uses MCP
Cursor supports MCP natively in its Agent and Composer modes, letting you connect to GitHub, Jira, Datadog, and more via a simple JSON config file.
Cursor MCP Config
Cursor reads MCP config from two locations:
~/.cursor/mcp.json- Global.cursor/mcp.json- Project-specific (commit to share with team)
Both support STDIO and HTTP transports.
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "your_token_here"
}
}
}
}
Cursor's Agent Mode
Cursor's Composer / Agent Mode with MCP can:
- Read 15–20 files to understand context
- Edit multiple files simultaneously
- Run terminal commands and react to output
- Call MCP tools for external data
Cursor's latest release introduced a 3 Agents Window - orchestrate up to 8 parallel agents simultaneously.
Pre-Built MCP Integrations in Cursor
- Asana - Read and update tasks
- GitHub - Issues, PRs, code review
- Jira - Tickets and sprint data
- Datadog - Logs and metrics
- Browser tools - Web scraping and automation
- Sequential thinking - Multi-step reasoning chains
How Claude Code Uses MCP
Claude Code is Anthropic's CLI-based agentic coding tool, with the most flexible and powerful MCP implementation - supporting four transport types and three configuration scopes.
Claude Code isn't Claude the chatbot. It's a separate terminal tool that runs Claude models to execute real coding tasks.
Claude Code MCP Config
.mcp.json- Project-scoped, committed to git~/.claude.json- User-scoped, across all projects
CLI Commands
# Add an MCP server
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
# List configured servers
claude mcp list
# Remove a server
claude mcp remove sentry
Four Transport Types
- HTTP (streamable-http) - Recommended for remote
- SSE - Deprecated; use HTTP
- STDIO - Local processes
- WebSocket - Persistent bidirectional connections
Real Examples
Sentry error monitoring:
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
Then ask: "What are the most common errors in the last 24 hours?"
GitHub code review:
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \
--header "Authorization: Bearer YOUR_GITHUB_PAT"
Then ask: "Review PR #456 and suggest improvements."
PostgreSQL queries:
claude mcp add --transport stdio db -- npx -y @bytebase/dbhub \
--dsn "postgresql://readonly:pass@prod.db.com:5432/analytics"
Then ask: "What's our total revenue this month?" (For a deeper walkthrough of connecting Claude Code to internal tools, see our dedicated guide.)
MCP Resources via @ Mentions
Can you analyze @github:issue://123 and suggest a fix?
Reliability Features
- OAuth 2.0 for remote servers
- Auto-reconnect with exponential backoff (1s to 32s, 5 attempts)
- Dynamic tool updates via
list_changednotifications
How Windsurf Uses MCP
Windsurf has the most beginner-friendly MCP experience with a visual marketplace UI that lets you install MCP servers without touching a config file.
Windsurf's agentic AI is called Cascade.
Windsurf MCP Setup
Two options:
- Visual UI - Settings → MCP Servers, browse marketplace, click Install
- Config file - Edit JSON directly
Supported Transports
STDIO and SSE.
Popular MCP Servers in Windsurf's Marketplace
- GitHub - Issues, PRs, code review
- Slack - Read and post messages
- Notion - Read and update docs
- Browser automation
- File system - Advanced file operations
Side-by-Side Comparison
| Feature | Cursor | Claude Code | Windsurf |
|---|---|---|---|
| MCP Config Method | JSON file | CLI + JSON file | UI + JSON file |
| Transports Supported | STDIO, HTTP | STDIO, HTTP, SSE, WebSocket | STDIO, SSE |
| Agent Mode Name | Composer / Agent Mode | Claude Code (CLI) | Cascade |
| Parallel Agents | Up to 8 | N/A | N/A |
| MCP Marketplace | No | No | Yes (visual UI) |
| Best For | Power users, IDE-native | Terminal/CLI workflows | Beginners, visual setup |
| Shared Config (team) | .cursor/mcp.json via git |
.mcp.json via git |
Shared workspace settings |
Bottom line: Claude Code for terminal users. Windsurf's marketplace for smoothest onboarding. Cursor for IDE-native power with parallel agents.
Set Up Your First MCP Server (GitHub Example)
In Cursor
Step 1: Create .cursor/mcp.json in your project root.
Step 2: Add the GitHub MCP server config:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "your_token_here"
}
}
}
}
Step 3: Restart Cursor.
Step 4: Open Agent Mode and type: "List my open GitHub issues."
In Claude Code
Step 1: Run in terminal:
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \
--header "Authorization: Bearer YOUR_GITHUB_PAT"
Step 2: Verify:
claude mcp list
Step 3: Start a session and say: "Review PR #456 and suggest improvements."
In Windsurf
Step 1: Open Settings → MCP Servers.
Step 2: Search for "GitHub" in the marketplace.
Step 3: Click Install and enter your GitHub PAT.
Step 4: Open Cascade and say: "Show me my open pull requests."
Real-World Agentic Coding Workflows with MCP
Workflow 1: The Full Dev Loop
Tools: Cursor + GitHub MCP + Jira MCP
Agent reads a Jira ticket describing a bug. Explores relevant files, writes the fix, runs the test suite, opens a GitHub PR.
Workflow 2: The Data-Driven Debug
Tools: Claude Code + Sentry MCP + PostgreSQL MCP
Ask Claude Code: "What errors happened in the last 24 hours and which users were affected?" The agent queries Sentry, hits PostgreSQL, returns a formatted report.
Workflow 3: The Design-to-Code Pipeline
Tools: Windsurf + Figma MCP + Slack MCP
A designer updates a Figma component. Cascade reads the new design via Figma MCP, updates the React component, posts a Slack message with the diff.
Limitations and Things to Watch Out For
Security matters. MCP servers run locally with access to your tokens and environment. Don't commit API keys to .mcp.json.
Not all MCP servers are production-ready. Check GitHub stars, last commit date, and open issues before installing. (When no existing server fits, you can always build your own MCP server.)
Agentic loops can go wrong. Always review agent actions before committing. Use Cursor's approval gates and Claude Code's checkpoint system.
Context window limits still apply. Very large codebases may need chunking.
SSE transport is deprecated in Claude Code. Use HTTP instead.
Windsurf's MCP marketplace is growing but not exhaustive. Niche integrations still need manual JSON configuration.
FAQ
What is MCP in coding?
MCP (Model Context Protocol) is an open standard from Anthropic that lets AI coding tools connect to external services like GitHub, Jira, and databases using a single, unified protocol.
Does Cursor support MCP?
Yes. Cursor supports MCP via a JSON config file and uses it in Agent/Composer Mode to connect to tools like GitHub, Jira, and Datadog. Supports STDIO and HTTP transports.
Is Claude Code the same as Claude?
No. Claude is Anthropic's AI model (the chatbot). Claude Code is a separate CLI tool that uses Claude models to perform agentic coding tasks in your terminal.
Which tool has the easiest MCP setup?
Windsurf - thanks to its visual MCP marketplace. Claude Code is most powerful for CLI users. Cursor sits in the middle.
Can I use MCP with multiple tools at once?
Yes. You can run multiple MCP servers simultaneously in all three tools.
Is MCP free to use?
MCP itself is free and open-source (Apache 2.0 licensed). Cursor, Claude Code, and Windsurf all have free tiers and paid plans around $20/month.
What is agentic coding?
When an AI autonomously plans and executes multi-step coding tasks - reading files, writing code, running tests, using external tools - without you directing every step.
Useful Sources
Keep reading
Connecting Claude Code to Internal Tools with MCP: A Developer's Guide
A hands-on guide to connecting Claude Code to your internal tools via MCP — setup, real-world use cases, security best practices, and troubleshooting for developers.
How to Wrap a REST API as an MCP Server for AI Agents
A hands-on Python tutorial for wrapping any REST API as an MCP server so AI agents like Claude can discover and call your tools at runtime.
MCP Integration for Salesforce, SAP, and NetSuite: A Practical Guide
A step-by-step guide to MCP integration for Salesforce, SAP, and NetSuite - setup, security, use cases, and connecting AI agents to your enterprise systems.



