mcpserver

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 31 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 mcpserver exposes a SupaCraft project to AI agents over MCP (stdio). Every write goes through the same validate → save → apply path, and a change that fails validation is not saved: the agent gets the issues back and supacraft.json stays as it was.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, opts Options) error

Run serves MCP over stdio until the client disconnects or ctx ends.

Types

type Options

type Options struct {
	Dir     string
	APIURL  string // base URL of the running API, used by call_endpoint
	Version string
	// Reload is called after a successful apply so an in-process API server
	// sees the new config immediately. May be nil.
	Reload func(context.Context)
	// Started starts the API once init_project created the project (the
	// server was started in a directory without one) and returns its
	// Reload. May be nil.
	Started func(context.Context) (func(context.Context), error)
}

Options configures the MCP server.

Jump to

Keyboard shortcuts

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