Get the FREE Ultimate OpenClaw Setup Guide →

WebSearchMCPServer

I've used the MCP SDK for C# and .NET to build a Copilot Studio compatible MCP server that leverages Google search.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio donaldmucci-websearchmcpserver docker run -i donaldmucci/websearchmcpserver \
  --env PORT="8080" \
  --env GOOGLE_CSE_ID="your-custom-search-engine-id" \
  --env GOOGLE_API_KEY="your-google-api-key"

How to use

The WebSearchMCPServer provides Copilot Studio compatible MCP endpoints that integrate Google search capabilities into your AI conversations. It leverages Google’s search API to retrieve real-time results and feed them back into the MCP workflow, enabling your agents to query the web and reference live information during sessions. Once running, you can invoke the server through your MCP framework as you would with other MCP servers, sending search prompts and receiving structured results that can be displayed or further analyzed by your agent.

How to install

Prerequisites:

  • Docker installed and running on your host
  • A Google Custom Search JSON API key (GOOGLE_API_KEY) and a CSE ID (GOOGLE_CSE_ID)
  • Optional: a domain or port you want to expose if not using Docker defaults

Installation steps:

  1. Pull and run the container (using Docker):

    docker run -i
    -e GOOGLE_API_KEY="your-google-api-key"
    -e GOOGLE_CSE_ID="your-custom-search-engine-id"
    -e PORT="8080"
    -p 8080:8080
    donaldmucci/websearchmcpserver

    Notes:

    • Replace the environment variables with your actual credentials.
    • The server will listen on port 8080 inside the container; adjust -p if you map a different host port.
  2. Alternative: If you prefer running locally (not via Docker), ensure you have Dockerfile or equivalent .NET setup provided by the creator. Follow the repository’s own build/run instructions if available.

  3. Verification:

    • After starting, visit http://localhost:8080/health or the designated health endpoint to confirm the server is up. If you use a different port, adjust the URL accordingly.

Additional notes

Tips and common issues:

  • Ensure your Google API key and Custom Search Engine ID are correctly configured; invalid credentials will produce API errors.
  • If you encounter rate limits, consider staggering requests or upgrading to higher-quotas in your Google Cloud Console.
  • The MCP payloads may require specific fields or wrappers; consult the server’s API contract to format queries correctly.
  • When using Docker, ensure the host can access the required network endpoints and that any firewalls allow the chosen port.
  • If you modify environment variables, restart the container to apply changes.
  • If you run into cryptographic or TLS errors, verify that the container's time is synchronized and that SSL libraries are up to date.
  • Check logs for guidance: docker logs <container_id>.

Related MCP Servers

Sponsor this space

Reach thousands of developers