mcp

package
v0.99.15 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Overview

Package mcp serves Flowbot capabilities over Streamable HTTP at /mcp.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(app *fiber.App, auditor audit.Auditor)

Register mounts Streamable HTTP /mcp when mcp.enabled is true.

Types

type Identity

type Identity struct {
	UID       types.Uid
	Scopes    []string
	IP        string
	UserAgent string
}

Identity is the authenticated MCP caller (API token, never a web session).

type ToolSpec

type ToolSpec struct {
	Name        string
	Group       string
	Operation   string
	Description string
	Mutation    bool
	Kind        string
	Input       []hub.ParamDef
	Scopes      []string
}

ToolSpec is one MCP tool advertised on /mcp.

func BuildCatalog

func BuildCatalog(descs []hub.Descriptor, include, exclude []string) []ToolSpec

BuildCatalog returns capability, pipeline/workflow/function, and hub tools after deny-list and mcp.include / mcp.exclude filters.

func FilterByScopes

func FilterByScopes(specs []ToolSpec, scopes []string) []ToolSpec

FilterByScopes keeps tools the token is allowed to call.

func (ToolSpec) Allowed

func (s ToolSpec) Allowed(scopes []string) bool

Allowed reports whether the token may call spec.

Jump to

Keyboard shortcuts

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