mcp

package
v2.16.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 17 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

Index

Constants

This section is empty.

Variables

View Source
var ReadTools = []string{
	"events_list", "events_facets", "event_get", "sentry_event", "vardump_get", "queue_jobs",
	"profiler_summary", "profiler_top", "profiler_call_graph",
	"mock_rules_list", "mock_rule_get", "mock_rule_preview", "mock_requests_list", "mock_template_helpers",
	"xdebug_sessions", "xdebug_location", "xdebug_stack", "xdebug_variables", "xdebug_property", "xdebug_breakpoints",
	"xdebug_traces", "xdebug_trace_summary", "xdebug_trace_calls", "xdebug_trace_call",
}

ReadTools are the tools a read-only server keeps. Every tool is in one of the two lists (a test checks), so a new tool is classified on purpose.

View Source
var WriteTools = []string{
	"event_delete",
	"mock_rule_create", "mock_rule_update", "mock_rule_delete",
	"mock_rule_from_request", "mock_import_openapi", "mock_group_delete",
	"xdebug_step", "xdebug_continue", "xdebug_stop", "xdebug_wait",
	"xdebug_breakpoint_set", "xdebug_breakpoint_remove", "xdebug_eval",
}

WriteTools are the tools that change data or drive a debug session: a read-only server drops them, so they are neither listed nor callable.

Functions

func MakeReadOnly added in v2.15.0

func MakeReadOnly(server *sdkmcp.Server)

MakeReadOnly removes the write tools from the server.

func NewServer

func NewServer(db *sql.DB, store event.Store, providers ...ToolProvider) *sdkmcp.Server

NewServer creates an MCP server with all Buggregator tools registered, plus the tools of the given providers.

func RunProxy

func RunProxy(socketPath string) error

RunProxy connects stdin/stdout to a running Buggregator's MCP Unix socket. This is the "buggregator mcp" subcommand — a thin bridge for MCP clients.

func StartHTTP

func StartHTTP(ctx context.Context, addr, authToken string, server *sdkmcp.Server) error

StartHTTP runs the MCP server over HTTP (Streamable HTTP / SSE). This enables remote MCP access for AI assistants over the network. If authToken is non-empty, requests must include "Authorization: Bearer <token>".

func StartListener

func StartListener(ctx context.Context, socketPath string, server *sdkmcp.Server) error

StartListener accepts MCP connections on a Unix socket. Each connection becomes an independent MCP session. Blocks until ctx is cancelled.

Types

type ToolProvider

type ToolProvider interface {
	RegisterMCPTools(server *sdkmcp.Server)
}

ToolProvider is implemented by modules that add their own MCP tools.

Jump to

Keyboard shortcuts

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