mcpserver

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package mcpserver is Ripen's MCP surface: stdio, tools only, and a strict subset of the CLI. Every tool maps to a CLI verb with the same guard, the same parameters, and the same Response envelope as its payload, so an agent and an operator are looking at one system rather than two.

Two things are absent by construction, not by permission check. Apply mode has no tool, and neither does clearing the Circuit breaker: those are decisions for a person at a terminal. And in the default read-only mode the write tools are never registered and the write path is never built, so the process holds no credentials and opens no clients.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	App *app.App
	// EnableWrites is a process flag, never a tool parameter: what a
	// caller may do is decided when the server starts.
	EnableWrites bool
	// Stream receives the Event stream. It is stderr in production;
	// stdout belongs to the protocol alone.
	Stream io.Writer
}

Options configures the MCP server.

type Server

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

Server is a built MCP server and whatever it needs closing.

func New

func New(options Options) (*Server, error)

New builds the server and registers its tools. Registration is the filter: a read-only server has no write tools to refuse, because they were never added.

func (*Server) Run

func (s *Server) Run(ctx context.Context, transport mcp.Transport) error

Run serves until the transport closes or the context ends.

func (*Server) Tools

func (s *Server) Tools() []string

Tools lists the registered tool names. Registration is the whole read-only guarantee: what is not here was never added.

Jump to

Keyboard shortcuts

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