mcp

package
v1.239.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateSessionInput

type CreateSessionInput struct {
	Environment map[string]string `json:"environment,omitempty" jsonschema:"Environment variables for the session"`
	Tags        map[string]string `json:"tags,omitempty" jsonschema:"Tags for the session"`
	Repository  string            `json:"repository,omitempty" jsonschema:"Repository to clone (e.g., 'owner/repo' or 'https://github.com/owner/repo')"`
}

CreateSessionInput represents input for create_session tool

type CreateSessionOutput

type CreateSessionOutput struct {
	SessionID string `json:"session_id" jsonschema:"Created session ID"`
}

CreateSessionOutput represents output for create_session tool

type DeleteSessionInput

type DeleteSessionInput struct {
	SessionID string `json:"session_id" jsonschema:"Session ID to delete"`
}

DeleteSessionInput represents input for delete_session tool

type DeleteSessionOutput

type DeleteSessionOutput struct {
	Message   string `json:"message" jsonschema:"Success message"`
	SessionID string `json:"session_id" jsonschema:"Deleted session ID"`
}

DeleteSessionOutput represents output for delete_session tool

type GetMessagesInput

type GetMessagesInput struct {
	SessionID string `json:"session_id" jsonschema:"Session ID to get messages from"`
}

GetMessagesInput represents input for get_messages tool

type GetMessagesOutput

type GetMessagesOutput struct {
	Messages []MessageOutput `json:"messages" jsonschema:"List of messages"`
}

GetMessagesOutput represents output for get_messages tool

type GetStatusInput

type GetStatusInput struct {
	SessionID string `json:"session_id" jsonschema:"Session ID to get status for"`
}

GetStatusInput represents input for get_session_status tool

type GetStatusOutput

type GetStatusOutput struct {
	Status string `json:"status" jsonschema:"Session status"`
}

GetStatusOutput represents output for get_session_status tool

type ListSessionsInput

type ListSessionsInput struct {
	Status string            `json:"status,omitempty" jsonschema:"Filter by session status"`
	Tags   map[string]string `json:"tags,omitempty" jsonschema:"Filter by tags"`
}

ListSessionsInput represents input for list_sessions tool

type ListSessionsOutput

type ListSessionsOutput struct {
	Sessions []SessionOutput `json:"sessions" jsonschema:"List of sessions"`
}

ListSessionsOutput represents output for list_sessions tool

type MCPHandler

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

MCPHandler implements the CustomHandler interface for MCP endpoints

func NewMCPHandler

func NewMCPHandler(server *app.Server) *MCPHandler

NewMCPHandler creates a new MCP handler for the /mcp endpoint

func (*MCPHandler) GetName

func (h *MCPHandler) GetName() string

GetName returns the name of this handler for logging

func (*MCPHandler) RegisterRoutes

func (h *MCPHandler) RegisterRoutes(e *echo.Echo, server *app.Server) error

RegisterRoutes registers the /mcp endpoint with Echo

type MCPServer

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

MCPServer wraps the MCP server and use cases

func NewMCPServer

func NewMCPServer(sessionManager repositories.SessionManager, shareRepo repositories.ShareRepository, authenticatedUserID string, authenticatedTeams []string, authenticatedGithubToken string, opts *mcp.ServerOptions) *MCPServer

NewMCPServer creates a new MCP server instance

func (*MCPServer) GetServer

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

GetServer returns the underlying MCP server

func (*MCPServer) RegisterTools

func (s *MCPServer) RegisterTools()

RegisterTools registers all MCP tools

type MessageOutput

type MessageOutput struct {
	Role      string    `json:"role" jsonschema:"Message role"`
	Content   string    `json:"content" jsonschema:"Message content"`
	Timestamp time.Time `json:"timestamp" jsonschema:"Message timestamp"`
}

MessageOutput represents a message in the output

type SendMessageInput

type SendMessageInput struct {
	SessionID string `json:"session_id" jsonschema:"Session ID to send message to"`
	Message   string `json:"message" jsonschema:"Message content to send"`
	Type      string `json:"type,omitempty" jsonschema:"Message type (user or raw)"`
}

SendMessageInput represents input for send_message tool

type SendMessageOutput

type SendMessageOutput struct {
	MessageID string `json:"message_id" jsonschema:"Sent message ID"`
}

SendMessageOutput represents output for send_message tool

type SessionOutput

type SessionOutput struct {
	SessionID string            `json:"session_id" jsonschema:"Session ID"`
	UserID    string            `json:"user_id" jsonschema:"User ID"`
	Status    string            `json:"status" jsonschema:"Session status"`
	StartedAt time.Time         `json:"started_at" jsonschema:"When the session was started"`
	Port      int               `json:"port" jsonschema:"Port number"`
	Tags      map[string]string `json:"tags,omitempty" jsonschema:"Session tags"`
}

SessionOutput represents a session in the output

Jump to

Keyboard shortcuts

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