MCPInstall
web-mcp logo

web-mcp

by zgagnon 1 stars zgagnon/web-mcp

a try at writing an mcp server. might replace one of my emacs tools

READMEmain

Web MCP Server

A Model Context Protocol (MCP) server that provides web search and content retrieval capabilities for AI assistants.

Features

The server offers two primary tools:

  • search_duckduckgo: Performs web searches using DuckDuckGo and returns URLs of the search results
  • read_url: Fetches and processes content from URLs, removing HTML markup for better readability

Setup

# Install dependencies
npm install

# Development (with auto-reload)
npm run dev

# Production build
npm run build
npm start

Running locally

use

npx https://zgagnon.com/webmcp

or

nix run github:zgagnon.com/webmcp

API

search_duckduckgo

Performs a web search using DuckDuckGo and returns only the URLs of the search results.

Input:

  • query (string, required): The search query to be executed
  • limit (number, optional): Maximum number of results to return (default: 10)

Output:

  • A list of URLs matching the search query

read_url

Fetches and returns the text content of a specified URL, with HTML markup removed. Uses Mozilla's Readability to extract meaningful content.

Input:

  • url (string, required): The URL to fetch content from
  • useReadabilityMode (boolean, optional): Whether to use Mozilla's Readability to extract the main content (default: true)
  • maxLength (number, optional): Maximum length of returned content in characters (default: 10000)

Output:

  • The plain text content from the URL, potentially truncated to fit within context windows

Error Handling

The server will return an error if:

  • Invalid arguments are provided to any tool
  • URL fetching fails
  • Search execution fails

Implementation Details

The server uses:

  • JSDOM and Mozilla's Readability for HTML processing and content extraction
  • Node-fetch for HTTP requests
  • Zod for schema validation

More Developer Tools MCP servers

Similar servers from the same category.

Sourcebot

sourcebot-dev

Enables code search across multiple repository hosts including GitHub, GitLab, Gitea, Gerrit, and Bitbucket with advanced filtering options for exploring large codebases through natural language queries.

searchgit

CodeAlive

codealive-ai

Provides a bridge to CodeAlive's platform for semantic code search, repository exploration, and context-aware chat completions that leverage deep understanding of entire codebases including documentation and dependencies.

search

Provides a secure, sandboxed environment for executing Python, Node.js, and shell commands in ephemeral containers with file management capabilities for code testing, visualization, and data analysis.

filesystemdatabase

NovaCV

lightbaby

Integrates with NovaCV API to generate, analyze, and convert resumes in various formats without dealing with complex document formatting

PDFSupport+5