Help us shape the future of Go! Take the 2026 Go Developer Survey

externalmcp

package
v0.2.24 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package externalmcp hosts MCP servers for rocketclaw integrations.

Index

Constants

View Source
const (
	SessionPromptToolName = "session_prompt"
	ExternalMCPPath       = "/mcp"
)

SessionPromptToolName and ExternalMCPPath define the public external MCP surface.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is an HTTP MCP server.

func StartSessionPromptServer

func StartSessionPromptServer(ctx context.Context, logger *slog.Logger, listenAddr string, users map[string]string, sessionPromptHandler func(context.Context, string, string, string, string, map[string]string, []SessionAttachment) (SessionResult, error)) (*Server, error)

StartSessionPromptServer starts the persistent external MCP HTTP server.

func (*Server) Close

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

Close stops the HTTP server and waits for it to exit.

func (*Server) URL

func (s *Server) URL() string

URL returns the server base URL.

type SessionAttachment

type SessionAttachment struct {
	Name       string `json:"name,omitempty" jsonschema:"display filename for the attachment"`
	MIMEType   string `json:"mime_type,omitempty" jsonschema:"attachment MIME type, for example image/png"`
	DataBase64 string `json:"data_base64" jsonschema:"base64-encoded attachment bytes"`
}

SessionAttachment carries an attachment across the public session_prompt boundary.

type SessionResult

type SessionResult struct {
	ExternalConversationID string              `json:"external_conversation_id" jsonschema:"external conversation ID for this MCP conversation"`
	Agent                  string              `json:"agent" jsonschema:"agent used for this MCP conversation turn"`
	Answer                 string              `json:"answer" jsonschema:"plain-text answer from rocketclaw"`
	Attachments            []SessionAttachment `json:"attachments,omitempty" jsonschema:"attachments returned by rocketclaw"`
}

SessionResult is the app-level result for an external MCP session tool call.

Jump to

Keyboard shortcuts

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