MS

mseri/snf-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

8 stars 0 forks Качество 53 Тренд 24

A Model Context Protocol server for DuckDuckGo search and web content fetching (using ocaml-mcp by avsm)

Обзор

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. - : Search the web using DuckDuckGo's search engine - : Search Wikipedia for articles and content - : Fetch and parse content from web pages, with support for both cleaned-up HTML and Markdown formats - : Built-in rate limiting to respect service limits - : Fully compatible with the Model Context Protocol specification (vendoring https://tangled.sh/@anil.recoil.org/ocaml-mcp/) - : 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) Search Wikipedia and return formatted results.

README

Показан фрагмент оригинального README. Открыть оригинал.

Web fetch and search MCP Server

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.

Features

  • 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 (vendoring )
  • Asynchronous: Built on Eio for efficient concurrent operations

Tools Provided

search

Search DuckDuckGo and return formatted results.

Parameters:

  • query (string, required): The search query string
  • max_results (integer, optional): Maximum number of results to return (default: 10)

Example:

{
  "query": "OCaml programming language",
  "max_results": 5
}

search_wikipedia

Search Wikipedia and return formatted results.

Parameters:

  • query (string, required): The search query string
  • max_results (integer, optional): Maximum number of results to return (default: 10)

Example:

{
  "query": "OCaml programming language",
  "max_results": 5
}

fetch_content

Fetch and parse content from a webpage URL.

Parameters:

  • 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 -1 to disable length limit.
  • start_from (integer, optional): Byte offset to start returning content from (default: 0)

Example:

{
  "url": "https://example.com/article",
  "max_length": 16384,
  "start_from": 1024
}

fetch_markdown

Fetch and parse content from a webpage URL as Markdown.

Parameters:

  • 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 -1 to disable length limit.
  • start_from (integer, optional): Byte offset to start returning content from (default: 0)

Example:

{
  "url": "https://example.com/article",
  "max_length": 16384,
  "start_from": 1024
}

Usage

Running the Server

The snf-mcp binary supports two modes of operation:

  1. HTTP Server Mode (default): Listens on a network port
  2. Standard I/O Mode: Communicates through stdin/stdout

Caveat: the installed binary is called snf-mcp

Start the MCP server in HTTP mode on port 3000:

dune exec snf-mcp -- --serve 3000

Use Standard I/O mode (useful for integrating with LLM clients):

dune exec snf-mcp

When installed via OPAM, you can run it directly:

snf_mcp [--serve PORT | --stdio]
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →