agent

package
v0.0.0-...-33f0207 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package agent exposes cloudscraper-go to AI agents as an MCP server: tools an LLM can call to fetch anti-bot–protected pages (as clean Markdown) and read their cookies. Built on the official github.com/modelcontextprotocol/go-sdk.

It depends only on a small Scraper interface, so the tools are unit-tested end-to-end over an in-memory MCP transport, with no network.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(s Scraper) *mcp.Server

NewServer builds an MCP server exposing the cloudscraper tools backed by s.

Types

type Scraper

type Scraper interface {
	Get(ctx context.Context, url string) (status int, header http.Header, body []byte, err error)
	Cookies(url string) ([]*http.Cookie, error)
}

Scraper is the capability the MCP tools need. *cloudscraper.Client satisfies it via a thin adapter (see cmd/cloudscraper).

Jump to

Keyboard shortcuts

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