MCP Node DuckDuckGo Server

MCP Node DuckDuckGo Server

By yapweijun1996 GitHub

The MCP Node DuckDuckGo Server is a modular Node.js application that allows developers to integrate and test DuckDuckGo search and web content fetching capabilities through a simple HTTP API. It uses Express to establish endpoints, axios to make outbound HTTP requests, and Cheerio for parsing HTML.

duckduckgo nodejs
Overview

what is MCP Node DuckDuckGo Server?

The MCP Node DuckDuckGo Server is a modular Node.js application that allows developers to integrate and test DuckDuckGo search and web content fetching capabilities through a simple HTTP API.

how to use MCP Node DuckDuckGo Server?

To use the server, clone the repository, install the dependencies, and run the server. You can then access various endpoints to perform searches or fetch content.

key features of MCP Node DuckDuckGo Server?

  • DuckDuckGo Search: Execute search queries and return formatted results.
  • Web Content Fetching: Retrieve and parse text content from any webpage URL.
  • Rate Limiting: Manage request frequency to prevent overload.
  • Extensible MCP Server: Easily add or modify functionality through modules.

use cases of MCP Node DuckDuckGo Server?

  1. Integrating DuckDuckGo search functionality into applications.
  2. Fetching and parsing content from web pages for data analysis.
  3. Building tools that require web scraping capabilities.

FAQ from MCP Node DuckDuckGo Server?

  • What technologies does the server use?

The server uses Node.js, Express, Axios, and Cheerio.

  • How do I start the server?

Run node mcp-node-duckduckgo-server.js after installing the dependencies.

  • Can I contribute to the project?

Yes! Contributions are welcome, and you can fork the repository to add features.

Content

MCP Node DuckDuckGo Server

A Node.js application serving as an MCP server that offers two main tools:

  • Search: Query DuckDuckGo and retrieve formatted search results.
  • Fetch Content: Retrieve and parse text content from any webpage URL.

Table of Contents

Overview

The MCP Node DuckDuckGo Server is a Node.js server that provides a modular interface (via HTTP endpoints) to query DuckDuckGo and fetch webpage content. This project showcases:

  • Express for server creation.
  • Axios for making HTTP requests.
  • Cheerio for parsing HTML.

Features

  • DuckDuckGo Search: Uses a POST API to execute search queries and return DuckDuckGo results formatted for further processing.
  • Web Content Fetching: Retrieves and parses text content from a given URL.
  • Rate Limiting: Provides basic rate limiting to manage the request frequency.
  • Extensible MCP Server: Tools are organized as modules, making it easy to add or modify functionality.

Requirements

  • Node.js (v12 or higher)
  • npm

Installation

  1. Clone the Repository
    Clone the repository from GitHub:

    git clone <repository-url>
    
  2. Navigate to the Project Folder

    cd mcp-node-duckduckgo-server
    
  3. Install Dependencies
    Install required packages using npm:

    npm install express axios cheerio
    

Usage

Starting the Server

Run the server by executing:

node mcp-node-duckduckgo-server.js

You should see a log message similar to:

MCP Server "ddg-search" running on port 3000

Available Endpoints

List Tools

To list all available tools, open a new terminal window and run:

curl http://localhost:3000/tools

This should output a JSON list of registered tools (e.g., "search" and "fetchContent").

Search Tool

Execute a search query using the search tool:

curl -X POST http://localhost:3000/run-tool -H "Content-Type: application/json" -d "{\"toolName\":\"search\",\"params\":{\"query\":\"test query\",\"maxResults\":5}}"

The response will contain the formatted search results from DuckDuckGo.

Fetch Content Tool

Fetch content from a specific webpage:

curl -X POST http://localhost:3000/run-tool -H "Content-Type: application/json" -d "{\"toolName\":\"fetchContent\",\"params\":{\"url\":\"https://www.channelnewsasia.com/singapore/ge2025-general-election-may-3-parliament-dissolved-5064316\"}}"

The server will return a text snippet from the fetched webpage.

Logging and Debugging

  • The server logs informational and error messages to the terminal.
  • Use these logs to debug issues such as timeouts, HTTP errors, or unexpected behavior in responses.

Contributing

Contributions are welcome! If you want to contribute:

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

No tools information available.
Ldoce MCP Server
Ldoce MCP Server by MCP-Mirror

Mirror of

mcp-server nodejs
View Details

This project is a Node.js application designed for use with Claude Desktop. It simulates a CO2 sensor device and provides a JSON-RPC server to interact with the device. The application can run in both simulation mode and real mode, where it connects to a Raspberry Pi Pico via USB to read CO2 levels.

sensor nodejs
View Details

An MCP server for (free!) search results via duckduckgo

duckduckgo search
View Details

-

mcp-node-server-template nodejs
View Details

Mirror of

duckduckgo mcp-server
View Details

A powerful Model Context Protocol (MCP) server for web search and URL content extraction using DuckDuckGo.

duckduckgo web-search
View Details