Documentation
¶
Overview ¶
Package mcpserver is the built-in MCP server at /mcp (streamable HTTP, stateless). It offers the same operations as the REST API, with the same tokens and scopes, so an agent can see what is alerting, gather the evidence in one call, act on it and leave notes, and work on machines through the SSH channel with tools shaped like its own (run a command, read, write and edit a file). Every write and every session is audited and echoed to the alert chat.
Index ¶
Constants ¶
const Instructions = `` /* 1783-byte string literal not displayed */
Instructions tell an agent what the server is for and how to use it well.
const MonitorInstructions = `` /* 809-byte string literal not displayed */
MonitorInstructions follow Instructions when the server has the monitors.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
Handler returns the MCP endpoint, guarded by bearer credentials: a token, or an OAuth access token a person allowed a client to hold (package oauth). A request without one, or with one that does not verify, gets a 401 whose WWW-Authenticate names the protected resource metadata (RFC 9728), so that an MCP client can sign in through the browser.
Types ¶
type Option ¶
type Option func(*options)
Option changes what the server offers.
func WithMonitors ¶
WithMonitors adds the monitor tools, which read and change the monitors Beacon holds.
func WithResourceMetadata ¶
WithResourceMetadata names, for a request, the protected resource metadata (RFC 9728) that a 401 points to, so that an MCP client can find where to sign in (package oauth).