web-mcp-server

web-mcp-server

MCP server that exposes web_search and web_fetch tools, allowing LLM applications to search the web via DuckDuckGo and fetch page content as cleaned markdown.

Category
Visit Server

README

web-mcp-server

MCP server that exposes web_search, web_fetch, and research tools, allowing LLM applications to search the web, fetch page content, and research ArXiv papers.

Tools

web_search

Search the web via DuckDuckGo.

Parameter Type Default Description
query str Search query
max_results int 10 Max results to return (capped at 30)

Returns a list of {title, url, description}.

web_fetch

Fetch a URL and return cleaned markdown content.

Parameter Type Default Description
url str URL to fetch
max_length int -1 Max characters of markdown output to return. -1 means no limit (full content).

Returns {content, title, url, content_type}.

research

Search ArXiv papers, fetch HTML content, chunk, and return the most relevant chunks ranked by BM25.

Parameter Type Default Description
query str Research query
max_search_results int 15 Number of ArXiv search results to consider
max_papers int 3 Number of papers to fetch and analyze
max_chunks int 15 Number of top relevant chunks to return

Returns {query, sources, chunks, total_chunks_analyzed}.

Deep Research Prompt

The server exposes a deep_research prompt via the MCP protocol. Clients can discover and call it with a query parameter to get a system prompt for iterative deep research.

Usage: Call deep_research(query="...") to get a prompt that guides an LLM agent to orchestrate web_search, web_fetch, and research in multi-round investigation following the CoSearch deep search pattern.

Quickstart

# Install dependencies
uv sync

# Run the server (SSE on port 8642, default)
uv run python -m src.server

# Run with streamable HTTP transport
TRANSPORT=streamable-http uv run python -m src.server

Environment Variables

Variable Default Description
HOST 0.0.0.0 Server bind address
PORT 8642 Server port
TRANSPORT sse Transport protocol: sse or streamable-http

Health Check

A health check endpoint is available at the root path:

curl http://localhost:8642/
# {"status": "ok"}

Connect via Claude Code

# SSE (default)
claude mcp add web-tools http://localhost:8642/sse

# Streamable HTTP
claude mcp add --transport http web-tools http://localhost:8642/mcp

Connect via MCP Inspector

npx -y @modelcontextprotocol/inspector
# Connect to http://localhost:8642/sse (SSE) or http://localhost:8642/mcp (streamable HTTP) in the UI

Project Structure

src/
├── server.py            # MCP server setup + tool/prompt registration
├── tools/
│   ├── web_search.py    # DuckDuckGo search logic
│   ├── web_fetch.py     # URL fetch, HTML cleaning, markdown conversion
│   └── research.py      # ArXiv paper search, fetch, chunk, BM25 ranking
└── utils/
    └── html.py          # HTML title extraction

Requirements

  • Python >= 3.10
  • uv (recommended) or pip

Dependencies

Package Purpose
mcp[cli] Official MCP Python SDK
ddgs DuckDuckGo search
httpx Async HTTP client
beautifulsoup4 HTML parsing and cleaning
markdownify HTML-to-markdown conversion
rank-bm25 BM25 document ranking
nltk Text tokenization

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured