This MCP server provides a straightforward way to integrate Google search functionality within your applications using the Model Context Protocol, without requiring any API keys.
Getting started with the Web Search MCP Server requires just a few simple steps:
npm install
npm run build
Add the server to your MCP configuration file:
For VSCode (Claude Dev Extension):
{
"mcpServers": {
"web-search": {
"command": "node",
"args": ["/path/to/web-search/build/index.js"]
}
}
}
For Claude Desktop:
{
"mcpServers": {
"web-search": {
"command": "node",
"args": ["/path/to/web-search/build/index.js"]
}
}
}
The server provides a single tool called search
that you can use to perform web searches.
The search tool accepts the following parameters:
{
"query": string, // The search query
"limit": number // Optional: Number of results to return (default: 5, max: 10)
}
To use the search functionality:
use_mcp_tool({
server_name: "web-search",
tool_name: "search",
arguments: {
query: "your search query",
limit: 3 // optional
}
})
The search results are returned as a structured array:
[
{
"title": "Example Search Result",
"url": "https://example.com",
"description": "Description of the search result..."
}
]
When using this tool, be aware of these constraints:
Rate Limiting: Google may temporarily block excessive requests. Keep searches at a reasonable frequency and use the limit parameter wisely.
Result Accuracy: The tool depends on Google's HTML structure, which might change. Some results may have incomplete metadata.
Legal Considerations: This tool is for personal use. Ensure you respect Google's terms of service and implement appropriate rate limiting.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.