mcpserver

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Overview

Package mcpserver exposes gocrawl over the Model Context Protocol so agentic tools such as Conductor or Claude Code can drive crawls directly. It registers two tools: "crawl" (run a crawl + analysis and return a structured report) and "list_analyzers".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) *mcp.Server

New builds the gocrawl MCP server.

Types

type CrawlInput

type CrawlInput = crawlrequest.Params

CrawlInput is the MCP "crawl" tool input. Optional fields override the defaults. It is an alias for crawlrequest.Params, the mapping shared with the web API.

type CrawlOutput

type CrawlOutput struct {
	Report CrawlReport `json:"report"`
}

CrawlOutput is the MCP "crawl" tool output.

type CrawlReport added in v0.7.0

type CrawlReport struct {
	Seed         string            `json:"seed"`
	StartedAt    string            `json:"started_at"`
	FinishedAt   string            `json:"finished_at"`
	PagesCrawled int               `json:"pages_crawled"`
	Summary      report.Summary    `json:"summary"`
	Issues       []analyze.Issue   `json:"issues"`
	Notes        []string          `json:"notes,omitempty"`
	Coverage     *crawler.Coverage `json:"coverage,omitempty"`
}

CrawlReport mirrors report.Report for the MCP "crawl" tool, minus SiteMap. SiteMap's *sitemapgen.Node is self-referential (Children []*Node), and the go-sdk schema reflector panics on cyclic types when building the tool's output schema. Agents reason over the flat Issues list, not the tree, so it's dropped here; the CLI/web JSON report still includes it.

type ListAnalyzersInput

type ListAnalyzersInput struct{}

ListAnalyzersInput is the (empty) input for the "list_analyzers" tool.

type ListAnalyzersOutput

type ListAnalyzersOutput struct {
	Analyzers []runner.AnalyzerInfo `json:"analyzers"`
}

ListAnalyzersOutput lists the available analyzers.

Jump to

Keyboard shortcuts

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