mcpserver

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 16 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 the app use cases as MCP tools and installs the server entry into the configuration of an MCP harness.

Every tool returns the same JSON the CLI prints, and a failure is a tool error whose text is the error envelope. The envelope carries no secret: the app errors are the ones the transport already redacts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(a *app.App, version string) *mcp.Server

NewServer builds the MCP server over the app use cases. Every tool answers with the JSON the corresponding CLI command prints.

func ToolNames

func ToolNames() []string

ToolNames returns the names of the registered tools, in registration order.

Types

type InstallResult

type InstallResult struct {
	// Target is the harness name.
	Target string `json:"target"`
	// Path is the configuration file that was written.
	Path string `json:"path"`
	// Status is installed, updated or unchanged.
	Status string `json:"status"`
}

InstallResult is the outcome of installing the server entry into a harness configuration.

func Install

func Install(target, command string, args []string, home string, getenv func(string) string) (InstallResult, error)

Install writes the MCP server entry of the harness target into its configuration, preserving every other entry.

command is the executable a harness must run and args its arguments. home is the user's home directory and getenv reads the environment, so the caller decides where the harness keeps its files. A target this function does not know is a usage error.

Jump to

Keyboard shortcuts

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