mcpField
M
MCP Node DuckDuckGo Server

MCP Node DuckDuckGo Server

Local
github.com/yapweijun1996Search0Updated 80w ago

About MCP Node DuckDuckGo Server

A Node.js MCP server for developers who need DuckDuckGo search and webpage text extraction through HTTP endpoints. Its modular tools include basic rate limiting.

Key features

  1. 01DuckDuckGo search
  2. 02Fetch and parse webpage text
  3. 03Basic request rate limiting
  4. 04Modular tool structure

Use cases

  1. 01Retrieve formatted search results
  2. 02Extract text from a webpage
  3. 03Manage search request frequency

MCP support

It exposes search and fetchContent tools to MCP clients, with HTTP endpoints for listing and invoking them.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.