mcp

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package mcp wires Prism into the Model Context Protocol via mark3labs/mcp-go (D008 parity with Pulse, pinned at v0.54.0).

New(opts) returns a configured *server.MCPServer with four tools registered:

  • prism_plot(spec, format?) → bytes + mime + caption
  • prism_validate(spec) → ok + structured errors
  • prism_describe(spec) → natural-language summary
  • prism_examples_search(query) → list of fixture specs

The server is transport-agnostic; the CLI's `prism mcp` subcommand wraps it in server.ServeStdio for agent-host use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts Options) *server.MCPServer

New constructs an MCP server with all four Prism tools registered. The returned *server.MCPServer is ready to drive via either server.ServeStdio (for the `prism mcp` CLI subcommand) or any other transport mcp-go supports.

Types

type Options

type Options struct {
	PrismServer  *rpc.PrismServer
	ExamplesRoot string
	// ExamplesFS is the file system the examples search walks.
	// Defaults to afero.NewOsFs(). Tests inject an afero.MemMapFs.
	ExamplesFS afero.Fs
}

Options configures a new MCP server instance. ExamplesRoot is the directory the prism_examples_search tool searches; defaults to "testdata/specs/".

Jump to

Keyboard shortcuts

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