server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package server implements the MCP server that exposes 3D model generation capabilities as MCP tools over stdio transport.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadInput

type DownloadInput struct {
	TaskID string `json:"taskId" jsonschema:"Task ID of the completed generation"`
	Format string `` /* 181-byte string literal not displayed */
}

DownloadInput is used for the download_model tool.

type EmptyInput

type EmptyInput struct{}

EmptyInput is used for tools that require no parameters.

type Options

type Options struct {
	Backend   string
	OutputDir string
	Version   string
}

Options configures server metadata exposed via MCP tools.

type Server

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

Server wraps an MCP server and routes tool calls to provider implementations.

func New

func New(generator provider.ModelGenerator, status provider.ModelStatus, postproc provider.ModelPostProcessor, models provider.ModelLister, outputDir string) *Server

New creates a Server with the given provider implementations.

func NewWithOptions

func NewWithOptions(generator provider.ModelGenerator, status provider.ModelStatus, postproc provider.ModelPostProcessor, models provider.ModelLister, opts Options) *Server

NewWithOptions creates a Server with explicit metadata about the configured backend and output directory.

func (*Server) MCPServer

func (s *Server) MCPServer() *mcp.Server

MCPServer returns the underlying mcp.Server for testing.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run starts the MCP server on the stdio transport, blocking until the client disconnects or the context is cancelled.

type TaskIDInput

type TaskIDInput struct {
	TaskID string `json:"taskId" jsonschema:"Task ID from a previous generation or post-processing call"`
}

TaskIDInput is used for tools that take only a task ID.

Jump to

Keyboard shortcuts

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