mcpserver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mcpserver exposes the fetch module as an MCP tool over stdio.

The server is a thin adapter: it decodes the MCP tool call, maps it to a fetch.Params, calls fetch.Fetch, and wraps the result. All logging goes to a file (never stdout, which is the stdio transport — see ADR-0005 row 8).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context) error

Run starts the MCP server over stdio and blocks until the client disconnects. Logging is configured via the WEB_FETCH_LOG environment variable: when set to a file path, logs go there; otherwise the server is silent. Nothing is written to stdout (the stdio transport) under any circumstance.

A closed stdin (client disconnect / EOF) is the normal shutdown path and returns nil rather than an error.

Types

type Deps

type Deps struct {
	Client fetch.HTTPClient
}

Deps holds the injectable dependencies of the server, so tests can supply a fake fetch client instead of the real one.

Jump to

Keyboard shortcuts

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