Web fetch and search MCP Server
About
Provides web search, Wikipedia search, and web content fetching capabilities using OCaml.
Details
- Author
- mseri
- Categories
- Search, Other, Knowledge Base
Jump to
Setup
Install Web fetch and search MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/mseri/snf-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
Provides web search, Wikipedia search, and web content fetching capabilities using OCaml.
A Model Context Protocol (MCP) server that provides web search, Wikipedia search, and web content fetching capabilities, written in OCaml using the eio asynchronous runtime.
- DuckDuckGo Search: Search the web using DuckDuckGo's search engine
- Wikipedia Search: Search Wikipedia for articles and content
- Web Content Fetching: Fetch and parse content from web pages, with support for both cleaned-up HTML and Markdown formats
- Rate Limiting: Built-in rate limiting to respect service limits
- MCP Protocol: Fully compatible with the Model Context Protocol specification (vendoringhttps://tangled.sh/@anil.recoil.org/ocaml-mcp/)
- Asynchronous: Built on Eio for efficient concurrent operations
Search DuckDuckGo and return formatted results.
- query(string, required): The search query string
- max_results(integer, optional): Maximum number of results to return (default: 10)
{ "query": "OCaml programming language", "max_results": 5 }
Search Wikipedia and return formatted results.
- query(string, required): The search query string
- max_results(integer, optional): Maximum number of results to return (default: 10)
{ "query": "OCaml programming language", "max_results": 5 }
Fetch and parse content from a webpage URL.
- url(string, required): The webpage URL to fetch content from
- max_length(integer, optional): Maximum length (in bytes) of content to return (default: 8192). Set-1to disable length limit.
- start_from(integer, optional): Byte offset to start returning content from (default: 0)
{ "url": "https://example.com/article", "max_length": 16384, "start_from": 1024 }
Fetch and parse content from a webpage URL as Markdown.
- url(string, required): The webpage URL to fetch content from
- max_length(integer, optional): Maximum length (in bytes) of content to return (default: 8192). Set-1to disable length limit.
- start_from(integer, optional): Byte offset to start returning content from (default: 0)
{ "url": "https://example.com/article", "max_length": 16384, "start_from": 1024 }
Thesnf-mcpbinary supports two modes of operation:
- HTTP Server Mode(default): Listens on a network port
- Standard I/O Mode: Communicates through stdin/stdout
Caveat: the installed binary is calledsnf-mcp
Start the MCP server in HTTP mode on port 3000:
Use Standard I/O mode (useful for integrating with LLM clients):
When installed via OPAM, you can run it directly:
snf_mcp [--serve PORT | --stdio] --serve Run http server, listening on PORT --stdio Use stdio for communication instead of port (default) --debug Enable debug logging --verbose Enable verbose logging --quiet Suppress non-error logs (default) -help Display this list of options --help Display this list of options
When running in HTTP mode, you can test if the server is working by sending MCP protocol messages using curl.
Then, on a different terminal, you can usecurlto interact with the server. Here are some example requests:
curl -X POST http://localhost:8080 -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }'
curl -X POST http://localhost:8080 -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "search", "arguments": { "query": "OCaml programming language", "max_results": 3 } } }'
curl -X POST http://localhost:8080 -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "fetch_content", "arguments": { "url": "https://ocaml.org" } } }'
curl -X POST http://localhost:8080 -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": { "name": "search_wikipedia", "arguments": { "query": "OCaml programming language", "max_results": 3 } } }'
curl -X POST http://localhost:8080 -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": { "name": "fetch_markdown", "arguments": { "url": "https://ocaml.org" } } }'
When using stdio mode, you can pipe JSON-RPC requests to the binary:
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | dune exec snf-mcp | jq
echo '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"search","arguments":{"query":"OCaml programming language"}},"id":2}' | dune exec snf-mcp | jq
echo '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"search_wikipedia","arguments":{"query":"OCaml programming language"}},"id":3}' | dune exec snf-mcp | jq
echo '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"fetch_content","arguments":{"url":"https://ocaml.org"}},"id":4}' | dune exec snf-mcp | jq
echo '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"fetch_markdown","arguments":{"url":"https://ocaml.org"}},"id":5}' | dune exec snf-mcp | jq
This mode is particularly useful when integrating with LLM clients that communicate over stdin/stdout.
- Clone the repository
- Install dependencies and build:
$ cd snf_mcp $ opam install . --deps-only $ dune build $ dune install
This will make thesnf-mcpbinary available in your PATH.
This server can be integrated with any MCP-compatible client. Configure your client to connect to this server using the appropriate transport method. Below we show how to configure the stdio version, the remote version is very similar. Keep in mind that this is early software and not recommended for production or to be exposed on unprotected networks.
then edit (or create)~/.llm-tools-mcp/mcp.jsonwith
{ "mcpServers": { "snf_mcp": { "command": "/path/to/snf-mcp", "args": [ "--stdio" ] } } }
Edit the json file from the interface adding the same json entry as in the LLM CLI example above. See also theofficial documentation.
Use thefull pathto snf_mcp as command, and--stdioas the only argument. See also theofficial documentation.
Note,I was only able to configure stdio-based mcp serverswith Jan.
The server implements rate limiting to be respectful to external services:
- Search requests (DuckDuckGo and Wikipedia): Limited to 30 requests per minute
- Content fetching: Limited to 20 requests per minute
If you encounter errors or timeout messages, you might be hitting the rate limits. The server will automatically wait when rate limits are reached, but external services might still block requests if they detect automated usage.
DuckDuckGo's search results are parsed from the HTML response. If search results appear incorrect or incomplete, it might be due to:
- DuckDuckGo changing their HTML structure
- Bot detection preventing proper results
- Issues with the search query format
Try rephrasing your query or checking if DuckDuckGo's service is functioning normally.
Thefetch_markdowntool tries to use thetrafilaturaPython library if it's available on your system, as it produces higher quality text extraction. Iftrafilaturais not found, it falls back tojina reader.
For best results, consider installingtrafilatura, for example in one of the following 3 ways:
uv tool install trafilatura # Method 1: Using uv tool pipx install trafilatura # Method 2: Using pipx pip install trafilatura # Method 3: Using pip``
Search global news using natural language. Webz.io News Search API returns the most relevant articles and content, with filters for source, country, language, date, sentiment, and category.
Fetch, convert, and search AWS documentation pages, with recommendations for related content.
Search campgrounds around the world on campertunity, check availability, and provide booking links.
The Ferryhopper MCP Server exposes ferry routes, schedules and booking redirects so an AI assistant can discover connections across Europe and the Mediterranean and send users to Ferryhopper to complete bookings.
All-in-One SEO & Web Intelligence Toolkit API from FetchSERP.
MCP server that provides read-only access to HyperKitty, the web-based email archive component of Mailman 3.
At Sunrise Apps, we believe AI agents should be limitless, especially when it comes to visual data. We created ImageSorcery to bridge the critical gap in AI's ability to interact with and manipulate images directly, all while upholding the highest standards of privacy and security.
Just Domain is the domain registrar for businesses built with AI. Its remote MCP server checks availability and returns first-year and renewal pricing, plus a link to register on justdomain.ai, with DNS and WHOIS privacy in the same place. No account, no API key, read only. Endpoint: https://mcp.justdomain.ai/
Research tools, including a Sqlite-backed document stash
Semantic search over 9 free-license stock photo sources. Hosted remote server with OAuth — no API key to paste.
SerpApi MCP Server for Google and other search engine results
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




