websearch

package module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 1 Imported by: 0

README

Web Search Model-Context-Protocol (MCP) Server

websearch is Model Context Protocol (MCP) server to search web content within agentic workflows. It focuse on search within content platform and providers rather than generic search.

Features

  • Search accross content platforms: Query across Wikipedia, DuckDuckGo, Hacker News, and others
  • MCP Integration: Native support for Model Context Protocol servers
  • CLI Tools: Command-line interface for direct usage
  • Markdown Output: Convert web content to clean markdown format

Installation

Build from sources

Requires Go installed.

go install github.com/fogfish/websearch/cmd/websearch@latest

Quick Start

Enable discovery of HackerNews in VS Code using MCP

{
  "servers": {
    "hackernews": {
      "command": "websearch",
      "args": [
        "serve",
        "--provider",
        "hackernews"
      ],
      "env": {}
    }
  }
}

The utlity is also enables search in command cline

websearch search --provider wikipedia "artificial intelligence"

Supported Content Platforms

On our future development list

Extract Web Content

Extract content from a URL

websearch extract https://example.com

Contributing

websearch is MIT licensed and accepts contributions via GitHub pull requests:

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Adding New Providers

  1. Implement the provider interface in internal/{provider}/
  2. Add provider constant to internal/service/types.go
  3. Update CLI flags and help text

License

See LICENSE

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fact

type Fact struct {
	// Unique identifier for the fact, document, or resource.
	ID string `json:"id,omitempty"`

	// Category or group the fact belongs to.
	Category string `json:"category,omitempty"`

	// Human-readable headline, title about the fact.
	Title string `json:"title,omitempty"`

	// Short description or abstract of the fact.
	Snippet string `json:"snippet,omitempty"`

	// Url to the resource represented by the fact.
	Url string `json:"url,omitempty"`

	// Date when the fact was created, published, or indexed.
	Date *time.Time `json:"date,omitempty"`
}

Fact represents a single search result fact. The type acts as denominator for various search engines.

func OnlyLatest added in v0.0.4

func OnlyLatest(wnd string, facts []Fact) []Fact

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL