server

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadDotPrompts added in v0.4.1

func LoadDotPrompts(dir string) ([]*mcp.Prompt, error)

LoadDotPrompts loads simple dotprompt-format files (.prompt) from dir (non-recursive). This is a lightweight parser: it extracts YAML frontmatter and the body. It maps frontmatter.input.schema keys to PromptArgument entries.

func LoadExternalPrompts added in v0.4.1

func LoadExternalPrompts(dir string) ([]*mcp.Prompt, error)

LoadExternalPrompts loads prompt definitions from JSON files in dir (non-recursive). Each file should contain a JSON representation of mcp.Prompt.

Types

type MCPServer

type MCPServer struct {

	// RegisteredPrompts caches prompts added via safeAddPrompt for testing/inspection
	RegisteredPrompts []*mcp.Prompt
	// contains filtered or unexported fields
}

MCPServer handles MCP protocol communication

func NewMCPServer

func NewMCPServer(db *database.DBManager) *MCPServer

NewMCPServer creates a new MCP server

func (*MCPServer) Run

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

Run starts the MCP server with stdio transport

func (*MCPServer) RunSSE

func (s *MCPServer) RunSSE(ctx context.Context, addr string, endpoint string) error

RunSSE starts the MCP server over SSE at the given address and endpoint

Jump to

Keyboard shortcuts

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