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 ¶
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.