
adenot/mcp-google-search
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
adenot/mcp-google-search - кандидат на сервер MCP, импортированный из https://github.com/adenot/mcp-google-search.
Обзор
adenot/mcp-google-search - кандидат на сервер MCP, импортированный из https://github.com/adenot/mcp-google-search.
Обзор (машинный перевод)
Сервер Model Context Protocol, который предоставляет возможности веб-поиска с использованием API пользовательского поиска Google и функциональности извлечения содержимого веб-страницы.
Настройка
Получение ключа API Google и идентификатора поисковой системы
1.Проект Google Cloud: Перейдите в Google Cloud Console Создать новый проект или выбрать существующий
- Возможность выставления счетов за ваш проект
2.Включить пользовательский поиск API: Перейти в библиотеку API Поиск по запросу «Custom Search API»
- Нажмите “Включить”
- Получить ключ API:
- Иди к проверке.
- Нажмите «Создать учетные данные» > «API Key» Скопируйте ключ API
- (необязательно) Ограничить API-ключ только пользовательским поисковым API
- Создание пользовательской поисковой системы: Перейти к программируемой поисковой системе Введите сайты, которые вы хотите искать (используйте www.google.com для общего поиска в Интернете)
- Нажмите “Создать”
- На следующей странице нажмите “Customize” В настройках включить «Поиск всей сети» Копируйте свой идентификатор поисковой системы (cx)
##Развитие
Установите зависимости:
Создайте сервер:
Для разработки с автоперестройкой:
Особенности
Инструмент поиска
Выполняйте веб-поиск с помощью Google Custom Search API: Поиск по всей сети или конкретным сайтам Контрольное количество результатов (1-10)
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
mcp-google-server A MCP Server for Google Custom Search and Webpage Reading
A Model Context Protocol server that provides web search capabilities using Google Custom Search API and webpage content extraction functionality.
Setup
Getting Google API Key and Search Engine ID
-
Create a Google Cloud Project:
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable billing for your project
-
Enable Custom Search API:
- Go to API Library
- Search for “Custom Search API”
- Click “Enable”
-
Get API Key:
- Go to Credentials
- Click “Create Credentials” > “API Key”
- Copy your API key
- (Optional) Restrict the API key to only Custom Search API
-
Create Custom Search Engine:
- Go to Programmable Search Engine
- Enter the sites you want to search (use www.google.com for general web search)
- Click “Create”
- On the next page, click “Customize”
- In the settings, enable “Search the entire web”
- Copy your Search Engine ID (cx)
Development
Install dependencies:
npm install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
Features
Search Tool
Perform web searches using Google Custom Search API:
- Search the entire web or specific sites
- Control number of results (1-10)
- Get structured results with title, link, and snippet
Webpage Reader Tool
Extract content from any webpage:
- Fetch and parse webpage content
- Extract page title and main text
- Clean content by removing scripts and styles
- Return structured data with title, text, and URL
Installation
Installing via Smithery
To install Google Custom Search Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @adenot/mcp-google-search --client claude
To use with Claude Desktop, add the server config with your Google API credentials:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"google-search": {
"command": "npx",
"args": [
"-y",
"@adenot/mcp-google-search"
],
"env": {
"GOOGLE_API_KEY": "your-api-key-here",
"GOOGLE_SEARCH_ENGINE_ID": "your-search-engine-id-here"
}
}
}
}
Usage
Search Tool
{
"name": "search",
"arguments": {
"query": "your search query",
"num": 5 // optional, default is 5, max is 10
}
}
Webpage Reader Tool
{
"name": "read_webpage",
Установка
npx -y @adenot/mcp-google-searchКонфигурация
{
"mcpServers": {
"google-search": {
"command": "npx",
"args": [
"-y",
"@adenot/mcp-google-search"
],
"env": {
"GOOGLE_API_KEY": "your-api-key-here",
"GOOGLE_SEARCH_ENGINE_ID": "your-search-engine-id-here"
}
}
}
}