mcp

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package mcp implements a Model Context Protocol server over stdio, exposing the CLI's verbs as tools so an MCP-capable agent (Claude, etc.) can drive the Privasys platform natively. Transport is newline-delimited JSON-RPC 2.0 on stdin/stdout (the MCP stdio transport).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Client *api.Client
	Token  string
	Issuer string
}

Deps is the authenticated context a tool handler needs. It is rebuilt per call so tokens refresh transparently.

type DepsFunc

type DepsFunc func(ctx context.Context) (Deps, error)

DepsFunc returns a fresh authenticated Deps (or an error if not logged in).

type Server

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

Server serves MCP over the given reader/writer.

func NewServer

func NewServer(deps DepsFunc, version string) *Server

NewServer builds the server with the full tool surface.

func (*Server) Serve

func (s *Server) Serve(ctx context.Context, in io.Reader, out io.Writer) error

Serve runs the read/dispatch/write loop until EOF or ctx cancellation.

Jump to

Keyboard shortcuts

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