mcp

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package mcp serves Arnakoff over the Model Context Protocol: an AI assistant checks an input or lists the sources with the same use cases, the same fields and the same wording as the HTTP API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(opts Options) *sdk.Server

NewServer returns the MCP server of opts, with its check and list_sources tools. The SDK logs nothing: a tool's arguments may be personal data.

func Stdio

func Stdio() *sdk.StdioTransport

Stdio returns the transport of a server run by its client, on stdin and stdout, each message bounded by maxFrameBytes.

Types

type Checker

type Checker interface {
	// Check returns the report of in; a source it could not consult is
	// reported unavailable, never an error.
	Check(ctx context.Context, in domain.Input) domain.Report
}

Checker checks an input against the sources.

type Options

type Options struct {
	// Check backs the check tool.
	Check Checker
	// Sources backs the list_sources tool.
	Sources SourceLister
}

Options configures the server.

type SourceLister

type SourceLister interface {
	// Sources returns every source and the state of its data in service.
	Sources() []app.ListedSource
}

SourceLister lists the sources a check consults.

Jump to

Keyboard shortcuts

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