The project is in a healthy, maintained state
A minimal MCP (Model Context Protocol) server that exposes Ask::Tools::WebFetch as a callable tool over stdio. Designed for use with clients that support MCP (ZCode, Claude Code, etc.), it fetches a URL and returns clean markdown via the local pure-Ruby backend, with an automatic Jina Reader fallback.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 5.25
~> 13.0
~> 3.26

Runtime

>= 0.4.3
 Project Readme

ask-web-fetch-mcp

Gem Version

A minimal MCP (Model Context Protocol) server that exposes Ask::Tools::WebFetch as a callable tool over stdio. Designed for use with clients that support MCP (ZCode, Claude Code, etc.), it fetches a URL and returns clean markdown for LLM consumption — via the local pure-Ruby backend by default, with an automatic Jina Reader fallback for JS-rendered or blocked pages.

Installation

gem "ask-web-fetch-mcp"

Usage

Run the server:

ask-web-fetch-mcp

The server listens for JSON-RPC messages on stdin and writes responses to stdout — the standard MCP stdio transport. Register it as an MCP server in your client configuration:

{
  "mcp": {
    "servers": {
      "ask-web-fetch-mcp": {
        "type": "stdio",
        "command": "ask-web-fetch-mcp",
        "args": []
      }
    }
  }
}

The exposed tool is named ask_web_fetch (the ask_ prefix avoids collisions with client-side tools of the same name, matching ask-web-search-mcp). It accepts a url argument and an optional max_chars, and returns the page content as markdown:

{"jsonrpc":"2.0","id":1,"method":"tools/call",
 "params":{"name":"ask_web_fetch","arguments":{"url":"https://www.ruby-lang.org/en/"}}}

Configuration

The ask-web-fetch backend chain applies unchanged. Optional environment variables:

  • JINA_API_KEY — enables the Jina fallback with higher rate limits
  • DEBUG=1 — ask-mcp debug logging on stderr

Full documentation

The full ask-rb documentation lives at https://ask-rb.github.io/ask-docs. Core: Web Fetch covers ask-web-fetch in depth. API reference: https://ask-rb.github.io/ask-docs/reference/api.

Development

bundle install
bundle exec rake test

License

MIT