mcp¶
import "github.com/jbcom/radioactive-ralph/internal/mcp"
Package mcp wraps modelcontextprotocol/go-sdk to expose Ralph’s plan-DAG and variant-pool surface as MCP tools. Claude Code talks to the binary through this server over stdio; the binary remains the durable product surface and MCP is the structured control plane.
Index¶
type Options¶
Options configures Server creation.
type Options struct {
// Store is the plandag handle backing every plan.* tool.
Store *plandag.Store
// Pool is the variantpool handle backing every variant.* tool.
Pool *variantpool.Pool
// SessionID is the plandag session this server runs under. Both
// the plandag CRUD tools and the variantpool tools are scoped
// to this session.
SessionID string
// ServerInfo identifies us in the MCP handshake.
ServerInfo *mcpsdk.Implementation
}
type Server¶
Server bundles the registered MCP server with its options.
type Server struct {
// contains filtered or unexported fields
}
func New¶
func New(o Options) (*Server, error)
New builds an MCP server with every Ralph tool registered.
func (*Server) MCPServer¶
func (s *Server) MCPServer() *mcpsdk.Server
MCPServer returns the underlying SDK server. Useful for tests that drive the server via in-memory transports.
func (*Server) ServeStdio¶
func (s *Server) ServeStdio(ctx context.Context) error
ServeStdio runs the MCP server over the stdio transport. Blocks until the client closes the connection or ctx is canceled.
Used by the portable mode CLI (`radioactive_ralph serve –mcp`). One process = one MCP session; the spawning Claude session owns the lifetime.
Generated by gomarkdoc