Cursor Web Search Plugin: MCP Protocol-based Search Service

After doing the first image-generating MCP Server plugin (developing an MCP Server to integrate with Cursor, giving Cursor wings!), the second one is much easier, 1 hour to complete.
Cursor can be used to develop software, but we do not only use them to realize the functions of the software; we can also fill in some content to save the time of operations and product managers. To use this plug-in function directly, you only need to state your requirements. It will automatically search for network resource information according to your needs when necessary, and automatically organize and complete your tasks.
I will directly paste the readme.MD below:
Product Description
A search service based on the MCP protocol implementation, providing a variety of search engine support, Cursor and Claude Desktop can be seamlessly integrated with it.
The use of Python development, support for asynchronous processing and highly concurrent requests, currently supports three search engine options :
-
Brave Search: a foreign company specializing in providing search interface service products
-
Secret Tower (Metaso) Search: the reverse implementation of the Secret Tower AI search interface, unofficial interfaces
-
Bocha (bocha) Search: domestic Search API market share of the highest search API products
Features
-
Support Multi-Search Engines
-
Brave Search: Provides web search and location search.
-
Metaso Search: Provides web search and academic search, supporting both concise and in-depth modes.
-
Boca Search: Provides web search with time range filtering, detailed summarization, and image search.
-
-
Scenarios: Seamless integration with Claude Desktop or Cursor greatly expands the tool's content acquisition capabilities.
-
Modular Design: Each search engine is a standalone module and can be copied separately for use elsewhere.
Choice of Three Search Engines
Only one search engine is available at runtime, so to make it easier for you to choose which one to configure online, I've listed a rough comparison below:
Installation and use
1. Environment Requirements
-
Python 3.10+
-
uv 0.24.0+
-
node.js v20.15.0
-
cursor >=0.45.10 (below this version, mcp server configuration cannot always connect)
-
Scientific Internet access (required only for Brave Search)
2. Download the Code
git clone https://github.com/fengin/search-server.git
3. Enable the Search Engine You Want
Open the root directory of your project and modify the following code in server.py to select the enable type:
# Search engine configuration
SEARCH_ENGINE = os.getenv("SEARCH_ENGINE", "bocha")
where the values correspond to brave, metaso, bocha, can also be configured through the environment variable SEARCH_ENGIN
4. Configure the Corresponding Search Module
There is a config.py file in each of the following three module directories:
-
src\search\proxy\brave
-
src\search\proxy\metaso
-
src\search\proxy\bocha
Modify the configuration of the corresponding config.py file according to your choice.
4.1 brave search Configuration
# Check the API key
BRAVE_API_KEY = os.getenv("BRAVE_API_KEY")
if not BRAVE_API_KEY:
BRAVE_API_KEY = "brave_api_key you've applied"
If you want to use it in Claude Desktop, you can also configure Claude Desktop to pass this parameter through environment variables, but Cursor does not support environment variables at the moment, so you can only change it in this file.
API KEY application address: Brave Search - API
The application threshold is relatively high and requires:
-
Magic (also required for use)
-
Email verification
-
Credit card (can use virtual: https://cardgenerator.org/)
4.2 Metaso Configuration
# Authentication information
METASO_UID = os.getenv("METASO_UID")
METASO_SID = os.getenv("METASO_SID")
if not METASO_UID or not METASO_SID:
METASO_UID = "metaso_uid you acquired"
METASO_SID = "metaso_sid you acquired"
Also, Claude Desktop can be used via environment variables in the MCP Servers configuration.
Acquisition Method for uid and sid :
Go to Secreta AI Search, log in to your account ( we recommend logging in to your account or you may encounter strange restrictions ), then F12 to open Developer Tools and find the uid
and sid
values from Application > Cookies.
Multi-Account Access
Note: It is currently suspected that Secret Tower has a limit on the total number of searches for IP addresses, and it is recommended to include IP rotation
You can provide multiple accounts by the uid-sid and use , modify
the relevant use of the code, each request service will pick one of them, I will subsequently consider.
4.3 Bocha Configuration
BOCHA_API_KEY = os.getenv("BOCHA_API_KEY", "")
if not BOCHA_API_KEY:
BOCHA_API_KEY="bocha_api_key you've applied"
Registration application address: https://open.bochaai.com/
The call is charged by number of times, not cheap, but the search quality is really better.
5. AI Tool Configuration
5.1 Cursor Configuration
-
name: search
-
type: cmd
-
command: uv --directory D:\code\search-server run search
where "D:\code\search-server" is the directory where you pulled down the source code.
5.2 Claude Desktop Configuration
Find the configuration file
Method 1
# widnows
C:\Users\{User}\AppData\Roaming\Claude\claude_desktop_config.json
# mac/linux should be found in the user's home directory.
Method 2
Open the Claude Desktop application and check: Claude Desktop->Menu->Settings->Developer->Edit Config
Edit to add the following MCP Server.
{
"mcpServers": {
"search": {
"command": "uv",
"args": [
"--directory",
"D:\\code\\search-server",
"run",
"search"
],
"env": {
"BRAVE_API_KEY": "API KEY you've applied"
}
}
}
}
Environment variables depend on your needs. If the code has changed, this is not necessary to configure
Cursor will pop up a black window, do not close, do not close, this is the start of the MCP Server process, there is no way to solve the current issue.
Claude Desktop configuration must be restarted after the application to take effect.
5.4 Troubleshooting
After the configuration of Cursor, many people encountered that the MCP Servers inside the configuration are complete, or display the status of the red dot, Tools Not Found, the use of the application will not go to call. That is because the configuration is not setting well.
Most of the possible cases are:
-
The environment is not ready, including the required software and version requirements, see the chapter on the environment.
-
Prepare the environment is not right, like Windows has a cmd terminal, a powershell terminal, there may be installed a gitbash terminal, you open the cmd terminal (cursor is generally this), check the environment, directly run uv --directory D:\code\search-server run search
-
Configuration path/command is not correct, you can open the terminal to run the command to see: uv --directory D:\code\search-server run search
-
Close the black window and restart Cursor if you want to open it again.
-
The Cursor version is too old
6. Use
In your Claude Desktop or Cursor directly your normal work on the line, if necessary, it will automatically call the search interface to obtain the content, for example, you organize the network in 2025 the direction of technological development as a software what content, it will go to call the search tool to obtain network information:
-
After configuring the tool, it will know that it is available inside the information.
-
According to your requirements, it will automatically analyze and determine the need to use the search tool
-
According to the requirements, extract keywords, and call the search tool
-
According to the search return content, the organization of the results you want
One thing you need to pay attention to, in Cursor, you must enable composer's agent mode to work before it will take effect, When you call the tool, you also need to point down the execution.
Technical Insider
Project Structure
search/
├── __init__.py
├── server.py # MCP server implementation
└── proxy/ # Search engine proxy
├── brave/ # Brave search module
│ ├── __init__.py
│ ├── client.py # Core client implementation
│ ├── config.py # Configuration and rate limit
│ └── exceptions.py # Exception definition
├── metaso/ # Metaso search module
│ ├── __init__.py
│ ├── client.py # Core client implementation
│ ├── config.py # Configuration and rate limit
│ └── exceptions.py # Exception definition
├── bocha/ # Bocha search module
│ ├── __init__.py
│ ├── client.py # Core client implementation
│ ├── config.py # Configuration and rate limit
│ └── exceptions.py # Exception definition
├── brave_search.py # Brave MCP tool implementation
├── metaso_search.py # Metaso MCP tool implementation
└── bocha_search.py # Bocha search MCP tool implementation
Interface Parameters
Brave Search engine
-
search
-
Performs web searches with paging and filtering support.
-
Input parameters: query (string)
-
query
(string): search keywords -
count
(number, optional): number of results per page (max 20) -
offset
(number, optional): paging offset (max 9)
-
-
-
location_search
-
Search for location-related information (businesses, restaurants, etc.).
-
Input parameters: query (string)
-
query
(string): location search keywords -
count
(number, optional): number of results (max 20)
-
-
Automatically switches to web search when no results are available
-
Metaso Search Engine
-
search
-
Performs web searches in a variety of modes
-
Input parameters: query (string)
-
query
(string): search keywords -
mode
(string, optional): search mode-
concise
: Concise mode, short and concise answers. -
detail
: in-depth mode, for detailed and comprehensive answers (default) -
research
: research mode, answer in-depth analysis ( currently unsupported, reverse not successful )
-
-
-
-
scholar_search
-
Performs a scholarly search, specifically for finding scholarly resources
-
Input parameters: query (string)
-
query
(string): academic search keywords -
mode
(string, optional): search mode, same as above
-
-
search engine
-
search
-
Performs web searches, supports time range filtering, and detailed summarization.
-
Input parameters: query (string)
-
query
(string): search keywords -
count
(number, optional): number of results (1-10, default 10) -
page
(number, optional): page number, start from 1 -
freshness
(string, optional): time range-
noLimit
: no time limit (default) -
oneDay
: one day -
oneWeek
: one week -
oneMonth
: month -
oneYear
: one year
-
-
summary
(boolean, optional): if or not show summary, default false
-
-
Returns.
-
search statistics (total results, current/total pages, results on this page)
-
Web search results (title, URL, source, summary, publish time)
-
Related image information (size, source, URL)
-
-