Published on: 2/6/2025
A comprehensive guide on configuring and using MCP (Model Context Protocol) in Cursor IDE. Learn how to set up MCP Servers through practical examples, including detailed steps for Web Search and Brave Search configuration. From basic concepts to practical applications, help developers quickly master Cursor's AI-enhanced features.
Complete Guide to Cursor's MCP Feature
What is MCP (Model Context Protocol)?
MCP (Model Context Protocol) is an open standard protocol launched by Anthropic that provides developers with a powerful tool to establish secure bidirectional connections between data sources and AI-driven tools.
To better understand MCP, we can use a simple analogy: if AI is like a computer, then MCP is similar to the USB protocol, and MCP Servers are like various USB devices (such as cameras, microphones, etc.). By implementing MCP Servers, we can easily connect AI to various data sources, greatly expanding its functionality.
References:
Cursor MCP Server Configuration Guide
1. Adding an MCP Server
- Navigate to
Cursor Settings
>Features
>MCP
- Click the
+ Add New MCP Server
button - In the configuration window:
- Select transport type:
stdio
: for standard input/outputsse
: for server-sent events
- Configure server information:
- Set an easily recognizable nickname (
Name
) - Based on transport type, fill in:
stdio
: Enter executable commandsse
: Enter server URL
- Set an easily recognizable nickname (
- Select transport type:
- After adding, the server will appear in the MCP server list
- You may need to manually click the refresh button to update the tool list
2. Using MCP Tools
When using MCP tools in Composer, you can:
- Let Composer Agent automatically select appropriate tools
- Explicitly specify which tool to use
- View detailed information about tool calls
- Manage tool calls:
- Check call parameters
- Decide whether to approve calls
- View call results
Web Search Configuration Guide
Configuring Web Search MCP Server
- Visit the Smithery platform:
- Option 1: Open https://smithery.ai and search for
Web Research
- Option 2: Directly visit https://smithery.ai/server/@mzxrai/mcp-webresearch
- Option 1: Open https://smithery.ai and search for
- Find and copy the Cursor installation command in the "Installation" section:
npx -y @smithery/cli@latest run @mzxrai/mcp-webresearch --config "{}"
- Add MCP Server in Cursor:
- Open
Cursor Settings
>Features
>MCP Servers
- Click
+ Add New MCP Server
- Select
command
type - Paste the installation command
- Name the server
Web Search
- Open
Practical Application of Web Search
When trying to use Web Search, you might encounter regional restrictions. Here's a practical search example:
Search for "cursor mcp server" and list the Top 5 trending keywords
In some regions, Google search might be restricted, resulting in search failure:
Failed to perform search: page.evaluate: Error: No search results found.
To resolve this issue, we can use Brave Search as an alternative.
Brave Search Configuration Guide
Getting a Brave Search API Key
- Visit https://brave.com/search/api/ and register an account
- Complete email verification
- Log in to your account
- Choose a subscription plan (credit card required even for free plan)
- Create a new key in the API Keys page
- Save the generated API Key
Configuring Brave Search MCP Server
- Visit https://smithery.ai/server/@smithery-ai/brave-search
- Find the Cursor installation command and replace the API Key:
npx -y @smithery/cli@latest run @smithery-ai/brave-search --config "{\"braveApiKey\":\"YOUR_API_KEY\"}"
Brave Search Usage Example
Using the same search prompt:
Search for "cursor mcp server" and list the Top 5 trending keywords
The search results show these five popular topics:
-
Model Context Protocol (MCP) Integration
- Core communication protocol for implementing Claude AI with desktop applications through Cursor IDE
-
Custom MCP Server Development
- Building and sharing custom MCP servers in Cursor for automated development tasks
-
MCP Server Templates
- Templates and toolsets for creating custom tools for Cursor IDE
-
Database Integration
- MCP servers supporting database operations, allowing AI models to perform database queries and management
-
Desktop Application Integration
- Seamless integration of AI capabilities with desktop software through MCP
Future Prospects
While MCP Server configuration requires some technical foundation, the convenience and efficiency improvements it brings are significant. Through MCP, we can transform Cursor into a more powerful productivity tool. Here are some promising directions to explore:
- Project management automation
- SEO content generation and optimization
- AI-assisted image generation
- Database integration and management