mcp

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mcp is the MCP wrapper over the core: bb mcp serves the core's operations as tools over stdio, using the official Go SDK for the protocol. Like the CLI, it parses input, calls one core operation, and renders the result; it holds no domain logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Dir is the root directory: tools find the experiment from here, and
	// every directory a tool is given must stay inside it. Empty means the
	// working directory.
	Dir string
	// ReadOnly registers only the tools that change nothing a user owns:
	// experiment.yaml, project files, install settings, and containers.
	ReadOnly bool
}

Options configures a Server.

type Server

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

Server is the MCP server.

func New

func New(eng *core.Engine, opts Options) (*Server, error)

New builds a server and registers its tools.

func (*Server) Connect

func (s *Server) Connect(ctx context.Context, t sdk.Transport) (*sdk.ServerSession, error)

Connect starts a session on t and returns without waiting; tests use it with in-memory transports.

func (*Server) Run

func (s *Server) Run(ctx context.Context, t sdk.Transport) error

Run serves the protocol on t until the client disconnects or ctx ends.

Jump to

Keyboard shortcuts

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