mcp-ddg-cs

coderguy-21/mcp-ddg-cs

3.1

If you are the rightful owner of mcp-ddg-cs and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The MCP DuckDuckGo .NET Provider is a C# implementation that integrates DuckDuckGo search results into MCP-compatible applications, with a fallback to Brave Search.

MCP DuckDuckGo .NET Provider

This project is a .NET C# implementation of a DuckDuckGo search provider for the Model Context Protocol (MCP) server. It enables integration of DuckDuckGo search results into MCP-compatible applications.

Features

  • Integrates DuckDuckGo search into MCP server
  • Simple, extensible C# codebase
  • Brave Search fallback: If DuckDuckGo is unavailable or fails, the provider automatically falls back to Brave Search to ensure continued search functionality.
  • Easily adaptable for other search providers

Project Structure

  • Program.cs — Main entry point for the MCP server
  • DuckDuckGoProvider.cs — Implements DuckDuckGo search logic
  • ISearchProvider.cs — Interface for search providers
  • SearchResult.cs — Model for search results
  • SearchTools.cs — Utility functions for search
  • McpServer.csproj — Project file

Getting Started

Prerequisites

Build

# From the project root
dotnet build

Run

dotnet run

Usage

The server will start and listen for MCP requests, using DuckDuckGo as the primary search backend. If DuckDuckGo is unavailable or returns an error, the provider will automatically fall back to Brave Search to provide results. You can adapt or extend the provider by implementing ISearchProvider.

Contributing

Pull requests and issues are welcome! Please open an issue to discuss your ideas or report bugs.

License

MIT License. See LICENSE file for details.