mcpserver

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package mcpserver exposes pano to AI agents over the Model Context Protocol. Every tool is a thin call into the control API client; rendering is tuned for token efficiency and every result ends with a "next:" hint so agents can escalate from list → summary → path → raw without guessing.

Index

Constants

View Source
const Instructions = `` /* 1483-byte string literal not displayed */

Instructions is sent to clients at initialize (kept under 2 KB: Claude Code truncates longer instructions).

Variables

This section is empty.

Functions

func FormatDecrypt

func FormatDecrypt(d api.Decrypt) string

FormatDecrypt renders the decrypt policy with every list in full.

func FormatMobile

func FormatMobile(m api.Mobile) string

FormatMobile renders the LAN listener and every device seen, in full.

func FormatRows

func FormatRows(rows []api.FlowRow) string

FormatRows renders flows as a fixed-column text table.

func FormatRule

func FormatRule(r api.Rule) string

FormatRule renders one rule line.

func FormatStatus

func FormatStatus(st api.Status) string

FormatStatus renders status compactly.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server wraps the MCP server with its dependencies.

func New

func New(c *client.Client, version string, logger *slog.Logger) *Server

New builds the MCP server. version is pano's version string.

func (*Server) HTTPHandler

func (s *Server) HTTPHandler() http.Handler

HTTPHandler returns a Streamable HTTP handler (stateless) for mounting on the daemon's loopback port.

func (*Server) MCP

func (s *Server) MCP() *mcp.Server

MCP returns the underlying server.

func (*Server) ServeStdio

func (s *Server) ServeStdio(ctx context.Context) error

ServeStdio runs over stdin/stdout until ctx is done.

Jump to

Keyboard shortcuts

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