Skip to main content
Glama
limklister

MCP Google Custom Search Server

by limklister

MCP Google 맞춤 검색 서버

Google의 맞춤 검색 API를 통해 웹 검색 기능을 제공하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버를 통해 언어 학습 모델(LLM)은 표준화된 인터페이스를 사용하여 웹 검색을 수행할 수 있습니다.

🌟 특징

  • Google 맞춤 검색 API와의 원활한 통합

  • MCP(Model Context Protocol) 호환 서버 구현

  • TypeScript를 사용한 유형 안전 구현

  • 환경 변수 구성

  • Zod를 사용한 입력 검증

  • 구성 가능한 검색 결과(쿼리당 최대 10개)

  • 제목, URL, 설명을 포함한 형식화된 검색 결과

  • 오류 처리 및 검증

  • Claude Desktop 및 기타 MCP 클라이언트와 호환 가능

Related MCP server: MCP Server for Google Search

📋 필수 조건

시작하기 전에 다음 사항을 확인하세요.

  1. 사용자 지정 검색 API가 활성화된 Google Cloud 프로젝트

  2. 사용자 정의 검색 엔진 ID

  3. 지역 개발 요구 사항:

    • Node.js(v18 이상)

    • npm(Node.js와 함께 제공)

🚀 빠른 시작

  1. 저장소를 복제합니다.

    지엑스피1

  2. 종속성 설치:

    npm install
  3. .env 파일을 만듭니다.

    GOOGLE_API_KEY=your-api-key GOOGLE_SEARCH_ENGINE_ID=your-search-engine-id
  4. 서버를 빌드하세요:

    npm run build
  5. 서버를 시작합니다:

    npm start

🔧 구성

환경 변수

변하기 쉬운

설명

필수의

구글 API 키

Google 맞춤 검색 API 키

구글 검색 엔진 ID

사용자 정의 검색 엔진 ID

Claude 데스크톱 통합

Claude Desktop 구성 파일(일반적으로 ~/Library/Application Support/Claude/claude_desktop_config.json 에 위치)에 다음 구성을 추가합니다.

{ "mcpServers": { "google-search": { "command": "node", "args": [ "/absolute/path/to/mcp-google-custom-search-server/build/index.js" ], "env": { "GOOGLE_API_KEY": "your-api-key", "GOOGLE_SEARCH_ENGINE_ID": "your-search-engine-id" } } } }

📖 API 참조

사용 가능한 도구

찾다

Google 맞춤 검색 API를 사용하여 웹 검색을 수행합니다.

매개변수:

  • query (문자열, 필수): 실행할 검색 쿼리

  • numResults (숫자, 선택 사항): 반환할 결과 수

    • 기본값: 5

    • 최대: 10

응답 예시:

Result 1: Title: Example Search Result URL: https://example.com Description: This is an example search result description --- Result 2: ...

🛠️ 개발

프로젝트 구조

mcp-google-custom-search-server/ ├── src/ │ └── index.ts # Main server implementation ├── build/ # Compiled JavaScript output ├── .env # Environment variables ├── package.json # Project dependencies and scripts ├── tsconfig.json # TypeScript configuration └── README.md # Project documentation

사용 가능한 스크립트

  • npm run build : TypeScript를 JavaScript로 컴파일

  • npm start : MCP 서버 시작

  • npm run dev : 개발을 위한 감시 모드

테스트

  1. MCP Inspector 사용:

    npx @modelcontextprotocol/inspector node build/index.js
  2. 예제 쿼리를 사용한 수동 테스트:

    # After starting the server {"jsonrpc":"2.0","id":1,"method":"callTool","params":{"name":"search","arguments":{"query":"example search"}}}

📝 라이센스

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

🙏 감사의 말

  • 모델 컨텍스트 프로토콜(MCP) 로 구축됨

  • Google의 맞춤 검색 API를 사용합니다

  • LLM 애플리케이션에서 더 나은 검색 기능에 대한 필요성에서 영감을 얻었습니다.

One-click Deploy
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/limklister/mcp-google-custom-search-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server