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 ConfigInstructions = `` /* 944-byte string literal not displayed */
ConfigInstructions follow Instructions when the server has the configuration tools.
const Instructions = `` /* 3461-byte string literal not displayed */
Instructions tell an agent what the server is for, how its six domains are organised, and how to use the write tools, resources and prompts responsibly.
const StatusInstructions = `` /* 652-byte string literal not displayed */
StatusInstructions follow Instructions when the server has the status pages.
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 WithConfig ¶
WithConfig adds the tools that read and change the configuration 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).
func WithSettings ¶
WithSettings enables the system settings MCP tools backed by m.
func WithStatus ¶
WithStatus adds the tool that reads the public status pages.